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 7006d493
authored
Jun 04, 2026
by
sunqi02
Committed by
胡悦
Jul 06, 2026
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat: update send_test.sh to read group and agents from test_request.json for single message
1 parent
f9daae51
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
24 deletions
workspace/agent-admin/backend/send_test.sh
workspace/agent-admin/backend/test_request.json
workspace/agent-admin/backend/send_test.sh
View file @
7006d49
...
@@ -42,31 +42,28 @@ if [ -z "$1" ]; then
...
@@ -42,31 +42,28 @@ if [ -z "$1" ]; then
echo
"=========================================="
echo
"=========================================="
else
else
# ── 有参数:
发送单条文本消息
──
# ── 有参数:
读取 test_request.json 的 group+agents,替换 messages 为单条文本
──
QUERY
=
"
$1
"
QUERY
=
"
$1
"
GROUP_ID
=
"
${
2
:-
EFD61E74ABE87CE0CE0C8D3529ED8B9E5194F219CF554649F1C4F9C615435A82
}
"
MSG_TIME
=
$(
date -u +
"%Y-%m-%dT%H:%M:%SZ"
)
MSG_TIME
=
$(
date -u +
"%Y-%m-%dT%H:%M:%SZ"
)
JSON_FILE
=
"
${
SCRIPT_DIR
}
/test_request.json"
if
[
! -f
"
$JSON_FILE
"
]
;
then
echo
"错误: 找不到
${
JSON_FILE
}
"
exit
1
fi
echo
"=========================================="
echo
"=========================================="
echo
" 发送单条测试消息"
echo
" 发送单条测试消息"
echo
"=========================================="
echo
"=========================================="
echo
""
echo
""
echo
"提问:
${
QUERY
}
"
echo
"提问:
${
QUERY
}
"
echo
"群组:
${
GROUP_ID
}
"
echo
""
echo
""
PAYLOAD
=
$(
python3 -c
"
PAYLOAD
=
$(
python3 -c
"
import json, sys
import json, sys
print(json.dumps({
with open('
${
JSON_FILE
}
') as f:
'group': {
base = json.load(f)
'group_contact_id': '
${
GROUP_ID
}
',
base['messages'] = [{
'group_name': '测试群'
},
'agents': [
{'agent_id': 11, 'bot_id': 'ABE6E30E3476E955853410C13E38C1065194F219CF554649F1C4F9C615435A82', 'is_steward': True},
{'agent_id': 17, 'bot_id': 'd53d00b08f8b4e22844ecfd0bb12e343', 'is_steward': False}
],
'messages': [{
'msg_id': 'm1',
'msg_id': 'm1',
'msg_time': '
${
MSG_TIME
}
',
'msg_time': '
${
MSG_TIME
}
',
'sender_id': 'user_001',
'sender_id': 'user_001',
...
@@ -74,8 +71,8 @@ print(json.dumps({
...
@@ -74,8 +71,8 @@ print(json.dumps({
'msg_type': 'text',
'msg_type': 'text',
'msg_content': sys.argv[1],
'msg_content': sys.argv[1],
'payload': {}
'payload': {}
}]
}]
}
, ensure_ascii=False, indent=2))
print(json.dumps(base
, ensure_ascii=False, indent=2))
"
"
$QUERY
"
)
"
"
$QUERY
"
)
echo
"--- 请求体 ---"
echo
"--- 请求体 ---"
...
...
workspace/agent-admin/backend/test_request.json
View file @
7006d49
...
@@ -25,15 +25,6 @@
...
@@ -25,15 +25,6 @@
"msg_type"
:
"file"
,
"msg_type"
:
"file"
,
"msg_content"
:
"https://glsk-agentic-test.oss-cn-shenzhen.aliyuncs.com/meeting-minutes%2Faudio%2F1219%E4%BA%8C%E6%89%8B%E8%BD%A6%E4%BE%8B%E4%BC%9A%EF%BC%88%E8%B5%B5%E6%80%BB%EF%BC%89.mp3"
,
"msg_content"
:
"https://glsk-agentic-test.oss-cn-shenzhen.aliyuncs.com/meeting-minutes%2Faudio%2F1219%E4%BA%8C%E6%89%8B%E8%BD%A6%E4%BE%8B%E4%BC%9A%EF%BC%88%E8%B5%B5%E6%80%BB%EF%BC%89.mp3"
,
"payload"
:
{}
"payload"
:
{}
},
{
"msg_id"
:
"m4"
,
"msg_time"
:
"2026-05-26T10:00:00Z"
,
"sender_id"
:
""
,
"sender_name"
:
"孙奇"
,
"msg_type"
:
"text"
,
"msg_content"
:
"请帮我总结一下这次会议的内容和结论"
,
"payload"
:
{}
}
}
]
]
}
}
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