[IMP] web_editor: reduce the timeout for chatgpt calls

The timeout for calls to the OLG API in the editor was set to 300
seconds, which is far too long for a chatbot. This reduces it to 30s.

closes odoo/odoo#141135

Signed-off-by: Nicolas Bayet (nby) <nby@odoo.com>
This commit is contained in:
Antoine Guenet
2023-11-06 12:32:04 +00:00
parent 9976d707f0
commit 8e0f1e08ac
+1 -1
View File
@@ -774,7 +774,7 @@ class Web_Editor(http.Controller):
'prompt': prompt,
'conversation_history': conversation_history or [],
'version': release.version,
}, timeout=300)
}, timeout=30)
if response['status'] == 'success':
return response['content']
elif response['status'] == 'error_prompt_too_long':