feat: Add web search results handling and enhance knowledge retrieval features

- Introduced a new endpoint to fetch chunks by ID, improving access to specific knowledge base entries.
- Updated tool result types to include web search results, enhancing the display capabilities in the chat component.
- Enhanced the AgentStreamDisplay component to support rendering web search results with improved HTML formatting.
- Implemented logic for managing web search result summaries and citations, ensuring a cohesive user experience.
- Refactored session management to accommodate new web search functionalities, improving overall system integration.
This commit is contained in:
wizardchen
2025-11-11 22:26:59 +08:00
parent d2adc38baf
commit 14d0e663cc
25 changed files with 1317 additions and 650 deletions
+2
View File
@@ -101,6 +101,8 @@ func RegisterChunkRoutes(r *gin.RouterGroup, handler *handler.ChunkHandler) {
{
// 获取分块列表
chunks.GET("/:knowledge_id", handler.ListKnowledgeChunks)
// 通过chunk_id获取单个chunk(不需要knowledge_id)
chunks.GET("/by-id/:id", handler.GetChunkByIDOnly)
// 删除分块
chunks.DELETE("/:knowledge_id/:id", handler.DeleteChunk)
// 删除知识下的所有分块