feat(agent): enhance suggested questions API with tag scopes
Update the SuggestedQuestionsRequest to include TagScopes for better filtering of knowledge items based on their parent knowledge bases. Modify related API documentation and frontend interfaces to accommodate the new structure. Ensure backend services handle the new tag scope logic correctly, including tests for the updated functionality.
This commit is contained in:
@@ -50,10 +50,11 @@ func agentHasKnowledgeScope(config *types.AgentConfig) bool {
|
||||
if config == nil {
|
||||
return false
|
||||
}
|
||||
if len(config.KnowledgeBases) > 0 || len(config.KnowledgeIDs) > 0 {
|
||||
return true
|
||||
}
|
||||
return len(config.SearchTargets) > 0
|
||||
return types.HasKnowledgeRetrievalScope(
|
||||
config.SearchTargets,
|
||||
config.KnowledgeBases,
|
||||
config.KnowledgeIDs,
|
||||
)
|
||||
}
|
||||
|
||||
// knowledgeBaseIDsForPrompt returns KB IDs to show in runtime_context metadata.
|
||||
|
||||
Reference in New Issue
Block a user