bisheng icon indicating copy to clipboard operation
bisheng copied to clipboard

api 第一次调用能能到 session_id,第二次调用传入 user_input 即超时无返回

Open NC-yjt opened this issue 1 year ago • 7 comments

第一次调用 http://127.0.0.1:3001/api/v2/workflow/invoke { "workflow_id":"15c8a69ad35c41da9eb39f4aed6fec7f", "stream":false } 返回 {"status_code":200,"status_message":"SUCCESS","data":{"session_id":"bda9c8a9a98f48ea899217a1770e1d0e_async_task_id","events":[{"event":"guide_question","message_id":null,"status":"end","node_id":"start_ed09a","node_execution_id":"12c86cf8b83245cd85ba2eec69daa5e8","output_schema":{"message":[""],"reasoning_content":null,"output_key":null,"files":null,"source_url":null,"extra":null},"input_schema":null},{"event":"input","message_id":"118","status":"end","node_id":"input_167e3","node_execution_id":null,"output_schema":null,"input_schema":{"input_type":"dialog_input","value":[{"key":"user_input","type":"text","value":"","label":null,"multiple":false,"required":true,"options":null,"file_type":null},{"key":"dialog_files_content","type":"dialog_file","value":[],"label":"上传文件内容","multiple":false,"required":false,"options":null,"file_type":null},{"key":"dialog_file_accept","type":"dialog_file_accept","value":"image","label":"上传文件类型","multiple":false,"required":false,"options":null,"file_type":null}]}}]}}

第二调用:http://127.0.0.1:3001/api/v2/workflow/invoke {"workflow_id":"15c8a69ad35c41da9eb39f4aed6fec7f","stream":false,"input":{"input_167e3":{"user_input":"创造一个科幻小故事500字内"}},"message_id":"129","session_id":"f95ab4c907b54a06a757149cd44f7135_async_task_id"} 则出现超时:

504GatewayTime-out

504GatewayTime-out


nginx/1.29.1

请问应该如何控制或者如何请求

NC-yjt avatar Sep 04 '25 06:09 NC-yjt

看起来"message_id和session_id 对应不上啊,还有确保工作流运行正常,且已经保存

sara2398 avatar Sep 05 '25 02:09 sara2398

看起来"message_id和session_id 对应不上啊,还有确保工作流运行正常,且已经保存

是的,展示为示例,实际上的请求是有对应的,工作流单独测试正常,有通过免登录进行调用,结果正常,通过api 调用方式异常,请问有api 调用demo 吗?

NC-yjt avatar Sep 05 '25 02:09 NC-yjt

demo 上不可用的哈,私有化部署的可以。 你把调用不通的全部东西截图一下

sara2398 avatar Sep 08 '25 03:09 sara2398

demo 上不可用的哈,私有化部署的可以。 你把调用不通的全部东西截图一下

Image [11结果.txt](https://github.com/user-attachments/files/22200698/11.txt) Image

NC-yjt avatar Sep 08 '25 03:09 NC-yjt

这个txt看不了啊,把第一次请求的全部返回贴出来看看,把你的工作流也贴一下

sara2398 avatar Sep 17 '25 07:09 sara2398

txt这个看不了啊,把第一个请求的全部贴出来看看,把你的工作流程也贴一下

你好,是nginx 问题,把超时时间加长就可以,之前是配置没有生效

NC-yjt avatar Sep 17 '25 11:09 NC-yjt

好的, 解决了就OK

sara2398 avatar Sep 22 '25 03:09 sara2398