profile

package
v0.100.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Profile

type Profile struct {
	// Unified LLM configuration (OpenAI-compatible protocol)
	// All providers (zai, deepseek, openai, siliconflow, ollama) use the same config
	ALLMProvider string // Provider identifier: zai, deepseek, openai, siliconflow, dashscope, openrouter, ollama
	ALLMAPIKey   string // Unified LLM API key
	ALLMBaseURL  string // Unified LLM base URL (optional, has default per provider)
	ALLMModel    string // Model name: glm-4.7, deepseek-chat, gpt-4o, etc.
	ALLMTimeout  int    // LLM request timeout in seconds (default: 120)

	// Embedding configuration
	AIEmbeddingProvider string
	AIEmbeddingModel    string
	AIEmbeddingAPIKey   string
	AIEmbeddingBaseURL  string

	// Reranker configuration
	AIRerankProvider string
	AIRerankModel    string
	AIRerankAPIKey   string
	AIRerankBaseURL  string

	// Intent Classifier configuration
	AIIntentProvider string
	AIIntentModel    string
	AIIntentAPIKey   string
	AIIntentBaseURL  string

	// Other configurations
	TikaServerURL      string
	UNIXSock           string
	Mode               string
	DSN                string
	Driver             string
	Version            string
	InstanceURL        string
	OCRLanguages       string
	Addr               string
	TessdataPath       string
	Data               string
	TesseractPath      string
	Port               int
	OCREnabled         bool
	TextExtractEnabled bool
	AIEnabled          bool
}

Profile is configuration to start main server.

func (*Profile) FromEnv

func (p *Profile) FromEnv()

FromEnv loads configuration from environment variables.

func (*Profile) IsAIEnabled

func (p *Profile) IsAIEnabled() bool

IsAIEnabled returns true if AI is enabled and LLM API key is configured.

func (*Profile) IsDev

func (p *Profile) IsDev() bool

func (*Profile) Validate

func (p *Profile) Validate() error

Jump to

Keyboard shortcuts

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