Merge branch 'test' into prod
This commit is contained in:
commit
b3c6ebad2e
2 files changed
+3
-2
No files matched your search
@@ -303,7 +303,7 @@ def test_agent(id):
|
||||
payload = {'inputs': {'query': '系统连通性测试,请简短回复OK。'}, 'response_mode': 'blocking', 'user': 'admin_test'}
|
||||
else:
|
||||
request_url = DifyService._build_chat_messages_url(base_url)
|
||||
payload = {'inputs': {}, 'query': '系统连通性测试,请简短回复OK。', 'response_mode': 'blocking', 'conversation_id': '', 'user': 'admin_test'}
|
||||
payload = {'inputs': {}, 'query': '系统连通性测试,请简短回复OK。', 'response_mode': 'blocking', 'user': 'admin_test'}
|
||||
headers = {'Authorization': f'Bearer {agent.dify_api_key}', 'Content-Type': 'application/json'}
|
||||
try:
|
||||
resp = requests.post(request_url, headers=headers, json=payload, timeout=(5, 25))
|
||||
|
||||
@@ -525,9 +525,10 @@ class DifyService:
|
||||
'inputs': {},
|
||||
'query': query,
|
||||
'response_mode': 'streaming',
|
||||
'conversation_id': normalized_conversation_id,
|
||||
'user': str(user_id),
|
||||
}
|
||||
if normalized_conversation_id:
|
||||
payload['conversation_id'] = normalized_conversation_id
|
||||
if files:
|
||||
payload['files'] = files
|
||||
|
||||
|
||||
Reference in new issue
Block a user