config

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeepCopyJSON

func DeepCopyJSON[T any](src T) (T, error)

DeepCopyJSON creates a deep copy of JSON-serializable structs

func OpenAIConfigFromServiceConfig

func OpenAIConfigFromServiceConfig(serviceConfig llm.ServiceConfig, botConfig llm.BotConfig) openai.Config

Types

type Config

type Config struct {
	Services                 []llm.ServiceConfig              `json:"services"`
	Bots                     []llm.BotConfig                  `json:"bots"`
	DefaultBotName           string                           `json:"defaultBotName"`
	TranscriptGenerator      string                           `json:"transcriptBackend"`
	EnableLLMTrace           bool                             `json:"enableLLMTrace"`
	EnableTokenUsageLogging  bool                             `json:"enableTokenUsageLogging"`
	AllowedUpstreamHostnames string                           `json:"allowedUpstreamHostnames"`
	AllowUnsafeLinks         bool                             `json:"allowUnsafeLinks"`
	EmbeddingSearchConfig    embeddings.EmbeddingSearchConfig `json:"embeddingSearchConfig"`
	MCP                      mcp.Config                       `json:"mcp"`
}

func (*Config) Clone

func (c *Config) Clone() *Config

func (*Config) GetServiceByID added in v1.5.0

func (c *Config) GetServiceByID(id string) (llm.ServiceConfig, bool)

GetServiceByID returns the service configuration for the given ID

type Container

type Container struct {
	// contains filtered or unexported fields
}
func (c *Container) AllowUnsafeLinks() bool

func (*Container) Config

func (c *Container) Config() *Config

Config retruns the whole configuration readonly. Avoid using this method, prefer using config though interfaces.

func (*Container) EmbeddingSearchConfig

func (c *Container) EmbeddingSearchConfig() embeddings.EmbeddingSearchConfig

func (*Container) EnableLLMLogging

func (c *Container) EnableLLMLogging() bool

func (*Container) EnableTokenUsageLogging added in v1.4.0

func (c *Container) EnableTokenUsageLogging() bool

func (*Container) GetBots

func (c *Container) GetBots() []llm.BotConfig

func (*Container) GetDefaultBotName

func (c *Container) GetDefaultBotName() string

func (*Container) GetEnableLLMTrace

func (c *Container) GetEnableLLMTrace() bool

func (*Container) GetServiceByID added in v1.5.0

func (c *Container) GetServiceByID(id string) (llm.ServiceConfig, bool)

GetServiceByID returns the service configuration for the given ID

func (*Container) GetTranscriptGenerator

func (c *Container) GetTranscriptGenerator() string

func (*Container) MCP

func (c *Container) MCP() mcp.Config

func (*Container) RegisterUpdateListener

func (c *Container) RegisterUpdateListener(listener UpdateListener)

func (*Container) Update

func (c *Container) Update(newConfig *Config)

Updates the current configuration The new configuration is deep-copied to ensure the new and old configurations are independent of each other.

type UpdateListener

type UpdateListener func()

Jump to

Keyboard shortcuts

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