写成屎山了

This commit is contained in:
2026-06-18 08:35:09 +08:00
parent 45822fd333
commit fcd230cb5b
7 changed files with 186 additions and 44 deletions
+8 -7
View File
@@ -18,17 +18,18 @@ import (
"gorm.io/gorm"
)
// SystemPromptStore is the interface for getting the system prompt
type SystemPromptStore interface {
// ToolConfigStore is the interface for getting tool configuration
type ToolConfigStore interface {
GetLLMPrimaryConfigSystemPrompt() (string, error)
GetLLMPrimaryConfigEnableTool() (bool, error)
}
// Config holds the AI service configuration
type Config struct {
LLMProviders []llm.ProviderConfig
DataDir string
Enabled bool
SystemPromptStore SystemPromptStore
LLMProviders []llm.ProviderConfig
DataDir string
Enabled bool
ToolConfigStore ToolConfigStore
}
// Service manages all AI-related components
@@ -97,7 +98,7 @@ func NewService(cfg Config, db *gorm.DB, botSender autoreply.BotSender) (*Servic
convStore,
msgQueue,
botSender,
cfg.SystemPromptStore,
cfg.ToolConfigStore,
)
return &Service{