Documentation
¶
Index ¶
- Variables
- func JSONSchema() ([]byte, error)
- func SetLogLevel(cfg *Config)
- type AuthConfig
- type AvailableIndexes
- type AzureOpenAIConfig
- type Config
- type CustomPromptsConfig
- type DataConfig
- type DocumentExtractorsConfig
- type EmbeddingsConfig
- type EntityExtractorConfig
- type ExtractorPromptsConfig
- type ExtractorsConfig
- type IntentExtractorConfig
- type LLM
- type LogConfig
- type MemoryConfig
- type MessageExtractorsConfig
- type NLP
- type OpenTelemetryConfig
- type PostgresConfig
- type ServerConfig
- type StoreConfig
- type SummarizerConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Version = "dev" CommitHash = "n/a" BuildTime = "n/a" VersionString = fmt.Sprintf("%s-%s (%s)", Version, CommitHash, BuildTime) )
View Source
var EnvVars = map[string]string{
"llm.anthropic_api_key": "ZEP_ANTHROPIC_API_KEY",
"llm.openai_api_key": "ZEP_OPENAI_API_KEY",
"auth.secret": "ZEP_AUTH_SECRET",
"development": "ZEP_DEVELOPMENT",
}
EnvVars is a set of secrets that should be stored in the environment, not config file
View Source
var (
ErrGeneratedSchemaIsNil = errors.New("generated JSON Schema is nil")
)
Functions ¶
func JSONSchema ¶ added in v0.17.0
func SetLogLevel ¶
func SetLogLevel(cfg *Config)
SetLogLevel sets the log level based on the config file. Defaults to INFO if not set or invalid
Types ¶
type AuthConfig ¶ added in v0.7.1
type AvailableIndexes ¶ added in v0.13.0
type AzureOpenAIConfig ¶ added in v0.11.0
type Config ¶
type Config struct {
LLM LLM `mapstructure:"llm"`
NLP NLP `mapstructure:"nlp"`
Memory MemoryConfig `mapstructure:"memory"`
Extractors ExtractorsConfig `mapstructure:"extractors"`
Store StoreConfig `mapstructure:"store"`
Server ServerConfig `mapstructure:"server"`
Log LogConfig `mapstructure:"log"`
Auth AuthConfig `mapstructure:"auth"`
OpenTelemetry OpenTelemetryConfig `mapstructure:"opentelemetry"`
DataConfig DataConfig `mapstructure:"data"`
Development bool `mapstructure:"development"`
CustomPrompts CustomPromptsConfig `mapstructure:"custom_prompts"`
}
Config holds the configuration of the application Use cmd.NewConfig to create a new instance
func LoadConfig ¶
LoadConfig loads the config file and ENV variables into a Config struct
type CustomPromptsConfig ¶ added in v0.13.0
type CustomPromptsConfig struct {
SummarizerPrompts ExtractorPromptsConfig `mapstructure:"summarizer_prompts"`
}
type DataConfig ¶ added in v0.7.1
type DataConfig struct {
// PurgeEvery is the period between hard deletes, in minutes.
// If set to 0, hard deletes will not be performed.
PurgeEvery int `mapstructure:"purge_every"`
}
type DocumentExtractorsConfig ¶ added in v0.9.0
type DocumentExtractorsConfig struct {
Embeddings EmbeddingsConfig `mapstructure:"embeddings"`
}
type EmbeddingsConfig ¶
type EntityExtractorConfig ¶ added in v0.5.0
type EntityExtractorConfig struct {
Enabled bool `mapstructure:"enabled"`
}
type ExtractorPromptsConfig ¶ added in v0.13.0
type ExtractorsConfig ¶
type ExtractorsConfig struct {
Messages MessageExtractorsConfig `mapstructure:"messages"`
Documents DocumentExtractorsConfig `mapstructure:"documents"`
}
type IntentExtractorConfig ¶ added in v0.7.0
type IntentExtractorConfig struct {
Enabled bool `mapstructure:"enabled"`
}
type LLM ¶
type LLM struct {
Service string `mapstructure:"service"`
Model string `mapstructure:"model"`
AnthropicAPIKey string `mapstructure:"anthropic_api_key"`
OpenAIAPIKey string `mapstructure:"openai_api_key"`
AzureOpenAIEndpoint string `mapstructure:"azure_openai_endpoint"`
AzureOpenAIModel AzureOpenAIConfig `mapstructure:"azure_openai"`
OpenAIEndpoint string `mapstructure:"openai_endpoint"`
OpenAIOrgID string `mapstructure:"openai_org_id"`
}
type MemoryConfig ¶
type MemoryConfig struct {
MessageWindow int `mapstructure:"message_window"`
}
type MessageExtractorsConfig ¶ added in v0.9.0
type MessageExtractorsConfig struct {
Summarizer SummarizerConfig `mapstructure:"summarizer"`
Embeddings EmbeddingsConfig `mapstructure:"embeddings"`
Entities EntityExtractorConfig `mapstructure:"entities"`
Intent IntentExtractorConfig `mapstructure:"intent"`
}
MessageExtractorsConfig holds the configuration for all extractors
type OpenTelemetryConfig ¶ added in v0.19.0
type OpenTelemetryConfig struct {
Enabled bool `mapstructure:"enabled"`
}
type PostgresConfig ¶
type PostgresConfig struct {
DSN string `mapstructure:"dsn"`
AvailableIndexes AvailableIndexes `mapstructure:"available_indexes"`
}
type ServerConfig ¶
type StoreConfig ¶ added in v0.9.0
type StoreConfig struct {
Type string `mapstructure:"type"`
Postgres PostgresConfig `mapstructure:"postgres"`
}
type SummarizerConfig ¶
type SummarizerConfig struct {
Enabled bool `mapstructure:"enabled"`
Embeddings EmbeddingsConfig `mapstructure:"embeddings"`
Entities EntityExtractorConfig `mapstructure:"entities"`
}
Click to show internal directories.
Click to hide internal directories.