fix(workflow): add reasoning content, suggested questions, citations and audio status support
- Introduce `reasoning_content`, `suggested_questions`, `citations`, and `audio_status` fields in conversation and app response schemas - Conditionally set `audio_status` to `"pending"` only when `audio_url` is present - Replace `model_dump` override with `@model_serializer(mode="wrap")` for cleaner serialization logic - Change knowledge base validation failure from `RuntimeError` to warning + `continue` to avoid halting retrieval on invalid KB
This commit is contained in:
@@ -334,7 +334,8 @@ class KnowledgeRetrievalNode(BaseNode):
|
||||
for kb_config in knowledge_bases:
|
||||
db_knowledge = knowledge_repository.get_knowledge_by_id(db=db, knowledge_id=kb_config.kb_id)
|
||||
if not (db_knowledge and db_knowledge.chunk_num > 0 and db_knowledge.status == 1):
|
||||
raise RuntimeError("The knowledge base does not exist or access is denied.")
|
||||
logger.warning("The knowledge base does not exist or access is denied.")
|
||||
continue
|
||||
tasks.append(self.knowledge_retrieval(db, query, db_knowledge, kb_config))
|
||||
if tasks:
|
||||
result = await asyncio.gather(*tasks)
|
||||
|
||||
Reference in New Issue
Block a user