Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Services ¶
type Services struct {
// All agents
EnricherAgent *enricher.Enricher
SplitterAgent *splitter.Splitter
MergerAgent *merger.Merger
ArchivistAgent *archivist.Archivist
RerankerAgent *reranker.Reranker
LaplaceAgent *laplace.Laplace
// Services
MemoryService *memory.Service
RAGService *rag.Service
ContextService *agent.ContextService
AgentLogger *agentlog.Logger
AgentExecutor *agent.Executor
Translator *i18n.Translator
}
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.SQLiteStore, client openrouter.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())
Click to show internal directories.
Click to hide internal directories.