feat: Implement FAQ functionality in Knowledge Base
- Added support for creating and managing FAQ knowledge bases, including new API endpoints for listing, upserting, updating, and deleting FAQ entries. - Enhanced the frontend to allow users to create FAQ knowledge bases and manage FAQ entries with a dedicated interface. - Introduced new types and configurations for FAQ handling in the backend, ensuring proper indexing and retrieval of FAQ entries. - Updated localization files to include new strings related to FAQ management in multiple languages. - Refactored existing components to accommodate the new FAQ features, improving user experience and functionality.
This commit is contained in:
@@ -645,14 +645,16 @@ func (s *sessionService) KnowledgeQAByEvent(ctx context.Context,
|
||||
fallbackID := generateEventID("fallback")
|
||||
if err := chatManage.EventBus.Emit(ctx, types.Event{
|
||||
ID: fallbackID,
|
||||
Type: types.EventType(event.EventAgentThought),
|
||||
Type: types.EventType(event.EventAgentFinalAnswer),
|
||||
SessionID: chatManage.SessionID,
|
||||
Data: event.AgentThoughtData{
|
||||
Data: event.AgentFinalAnswerData{
|
||||
Content: chatManage.FallbackResponse,
|
||||
Done: true,
|
||||
},
|
||||
}); err != nil {
|
||||
logger.Errorf(ctx, "Failed to emit fallback answer event: %v", err)
|
||||
} else {
|
||||
logger.Infof(ctx, "Fallback answer event emitted successfully")
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user