Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
ai
/
ai-workflow
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 3a875b9f
authored
May 27, 2026
by
sunqi02
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix(agent_hub): 更新消息处理逻辑以支持多种消息类型的内容拼接
1 parent
72a7a6ec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
workspace/agent-admin/backend/app/api/v1/endpoints/agent_hub.py
workspace/agent-admin/backend/app/api/v1/endpoints/agent_hub.py
View file @
3a875b9
...
@@ -69,11 +69,11 @@ async def chat(
...
@@ -69,11 +69,11 @@ async def chat(
if
not
session_id
:
if
not
session_id
:
raise
HTTPException
(
status_code
=
400
,
detail
=
"group.group_contact_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
=
[]
text_parts
=
[]
file_url
:
Optional
[
str
]
=
None
file_url
:
Optional
[
str
]
=
None
for
msg
in
request
.
messages
:
for
msg
in
request
.
messages
:
if
msg
.
msg_type
==
"text"
:
if
msg
.
msg_type
in
(
"text"
,
"other"
,
"file"
)
:
if
msg
.
msg_content
:
if
msg
.
msg_content
:
text_parts
.
append
(
msg
.
msg_content
)
text_parts
.
append
(
msg
.
msg_content
)
elif
msg
.
msg_type
==
"image"
:
elif
msg
.
msg_type
==
"image"
:
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment