config

package
v0.4.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 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