feat: Refactor agent configuration by removing deprecated parameters and enhancing conversation model management
- Removed the `thinkingModelId` and `rerankModelId` from agent configuration, streamlining the settings structure. - Introduced a new `conversationModels` interface to manage summary and rerank model IDs. - Updated related UI components and API logic to accommodate the changes in agent configuration. - Enhanced localization for new conversation model settings in English, Russian, and Chinese.
This commit is contained in:
@@ -15,8 +15,6 @@ type AgentConfig struct {
|
||||
ReflectionEnabled bool `json:"reflection_enabled"` // Whether to enable reflection
|
||||
AllowedTools []string `json:"allowed_tools"` // List of allowed tool names
|
||||
Temperature float64 `json:"temperature"` // LLM temperature for agent
|
||||
ThinkingModelID string `json:"thinking_model_id"` // Model ID for reasoning
|
||||
RerankModelID string `json:"rerank_model_id"` // Model ID for reranking search results
|
||||
KnowledgeBases []string `json:"knowledge_bases"` // Accessible knowledge base IDs
|
||||
SystemPromptWebEnabled string `json:"system_prompt_web_enabled,omitempty"` // Custom prompt when web search is enabled
|
||||
SystemPromptWebDisabled string `json:"system_prompt_web_disabled,omitempty"` // Custom prompt when web search is disabled
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
|
||||
"github.com/Tencent/WeKnora/internal/event"
|
||||
"github.com/Tencent/WeKnora/internal/models/chat"
|
||||
"github.com/Tencent/WeKnora/internal/models/rerank"
|
||||
"github.com/Tencent/WeKnora/internal/types"
|
||||
)
|
||||
|
||||
@@ -26,7 +27,7 @@ type AgentEngine interface {
|
||||
// AgentService defines the interface for agent-related operations
|
||||
type AgentService interface {
|
||||
// CreateAgentEngine creates an agent engine with the given configuration, EventBus, and ContextManager
|
||||
CreateAgentEngine(ctx context.Context, config *types.AgentConfig, eventBus *event.EventBus, contextManager ContextManager, sessionID string, sessionService SessionService) (AgentEngine, error)
|
||||
CreateAgentEngine(ctx context.Context, config *types.AgentConfig, chatModel chat.Chat, rerankModel rerank.Reranker, eventBus *event.EventBus, contextManager ContextManager, sessionID string, sessionService SessionService) (AgentEngine, error)
|
||||
|
||||
// ValidateConfig validates an agent configuration
|
||||
ValidateConfig(config *types.AgentConfig) error
|
||||
|
||||
Reference in New Issue
Block a user