Let the agent talk while there's pre-set param. (#4423)

### What problem does this PR solve?

#4385

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Kevin Hu 2025-01-09 14:07:57 +08:00 committed by GitHub
parent f86d8906e7
commit f892d7d426
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -170,9 +170,9 @@ def agent_completions(tenant_id, agent_id):
dsl = cvs[0].dsl
if not isinstance(dsl, str):
dsl = json.dumps(dsl)
canvas = Canvas(dsl, tenant_id)
if canvas.get_preset_param():
req["question"] = ""
#canvas = Canvas(dsl, tenant_id)
#if canvas.get_preset_param():
# req["question"] = ""
conv = API4ConversationService.query(id=req["session_id"], dialog_id=agent_id)
if not conv:
return get_error_data_result(f"You don't own the session {req['session_id']}")