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:
@@ -125,7 +125,6 @@ func (s *AgentStep) GetObservations() []string {
|
||||
type AgentState struct {
|
||||
CurrentRound int `json:"current_round"` // Current round number
|
||||
RoundSteps []AgentStep `json:"round_steps"` // All steps taken so far in the current round
|
||||
Plan []string `json:"plan,omitempty"` // Execution plan (if planning enabled)
|
||||
IsComplete bool `json:"is_complete"` // Whether agent has finished
|
||||
FinalAnswer string `json:"final_answer"` // The final answer to the query
|
||||
KnowledgeRefs []*SearchResult `json:"knowledge_refs"` // Collected knowledge references
|
||||
|
||||
@@ -19,7 +19,7 @@ type AgentStreamEvent struct {
|
||||
|
||||
// AgentEngine defines the interface for agent execution engine
|
||||
type AgentEngine interface {
|
||||
// ExecuteStreamWithHistory executes the agent with conversation history and returns a stream of events
|
||||
// Execute executes the agent with conversation history and returns a stream of events
|
||||
Execute(ctx context.Context, sessionID, messageID, query string, llmContext []chat.Message) (*types.AgentState, error)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user