Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadEnv ¶
func LoadEnv() error
LoadEnv loads .env file from current working directory. Silently ignores if file not found, returns error for other failures.
func NewArtifactStorage ¶ added in v0.10.0
func NewArtifactStorage(ctx context.Context, cfg *config.Config, logger *slog.Logger) (files.Storage, error)
NewArtifactStorage selects the artifact blob backend from config: an artifacts.s3 block switches to S3, otherwise the local disk store backs StoragePath. Capability-driven, so the home deployment (no s3 block) is byte-identical to before.
Types ¶
type Services ¶
type Services struct {
// All agents
EnricherAgent *enricher.Enricher
ReactorAgent *reactor.Reactor
SplitterAgent *splitter.Splitter
MergerAgent *merger.Merger
ArchivistAgent *archivist.Archivist
RerankerAgent *reranker.Reranker
ExtractorAgent *extractor.Extractor
LaplaceAgent *laplace.Laplace
// Services
MemoryService *memory.Service
RAGService *rag.Service
ContextService *agent.ContextService
AgentLogger *agentlog.Logger
AgentExecutor *agent.Executor
Translator *i18n.Translator
FileStorage files.Storage
LLMClient llm.Client
}
Services holds all initialized services and agents. This struct is returned by SetupServices to provide all dependencies in a single call, eliminating code duplication between main bot and testbot.
func SetupServices ¶
func SetupServices( ctx context.Context, logger *slog.Logger, cfg *config.Config, store *storage.Store, client llm.Client, translator *i18n.Translator, ) (*Services, error)
SetupServices initializes all core services and agents. This function is called by both the main bot and testbot to eliminate ~150 lines of duplicated code.
The caller is responsible for: - Starting the RAG service (ragService.Start(ctx)) - Stopping services when done (ragService.Stop(), store.Close())