feat: Enhance agent service and session management with web search capabilities

- Updated AgentConfig to include web search settings, allowing for dynamic configuration of web search features.
- Refactored AgentService to accept SessionService, enabling better management of session-specific web search states.
- Implemented methods in SessionService for handling temporary knowledge base states related to web search.
- Enhanced PluginSearch to utilize SessionService for managing web search state, improving integration with the overall system.
- Updated container setup to ensure proper dependency injection for the new web search service and session management functionalities.
This commit is contained in:
wizardchen
2025-11-11 14:25:20 +08:00
parent 5e0651c26f
commit d2adc38baf
13 changed files with 453 additions and 160 deletions
+4 -4
View File
@@ -53,10 +53,10 @@ func NewChunkExtractService(
chunkRepo interfaces.ChunkRepository,
graphEngine interfaces.RetrieveGraphRepository,
) interfaces.Extracter {
generator := chatpipline.NewQAPromptGenerator(chatpipline.NewFormater(), config.ExtractManager.ExtractGraph)
ctx := context.Background()
logger.Debugf(ctx, "chunk extract system prompt: %s", generator.System(ctx))
logger.Debugf(ctx, "chunk extract user prompt: %s", generator.User(ctx, "demo"))
// generator := chatpipline.NewQAPromptGenerator(chatpipline.NewFormater(), config.ExtractManager.ExtractGraph)
// ctx := context.Background()
// logger.Debugf(ctx, "chunk extract system prompt: %s", generator.System(ctx))
// logger.Debugf(ctx, "chunk extract user prompt: %s", generator.User(ctx, "demo"))
return &ChunkExtractService{
template: config.ExtractManager.ExtractGraph,
modelService: modelService,