config

package
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithConfig

func WithConfig(ctx context.Context, config *Config) context.Context

WithConfig returns a new context with the provided config

Types

type Config

type Config struct {
	ChatGPTApiUrl string `json:"chatGPTAPiUrl"`
	SystemMessage string `json:"systemMessage"`
}

func CreateAndValidateConfig

func CreateAndValidateConfig() Config

func FromContext

func FromContext(ctx context.Context) (*Config, bool)

FromContext extracts the config from the context, if available

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL