Commit 3a875b9f by sunqi02

fix(agent_hub): 更新消息处理逻辑以支持多种消息类型的内容拼接

1 parent 72a7a6ec
......@@ -69,11 +69,11 @@ async def chat(
if not session_id:
raise HTTPException(status_code=400, detail="group.group_contact_id 不能为空")
# 1. 提取 query:text 消息的 msg_content 用 \n 拼接
# 1. 提取 query:text/other/file 消息的 msg_content 用 \n 拼接
text_parts = []
file_url: Optional[str] = None
for msg in request.messages:
if msg.msg_type == "text":
if msg.msg_type in ("text", "other", "file"):
if msg.msg_content:
text_parts.append(msg.msg_content)
elif msg.msg_type == "image":
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!