From 043517717e98d698765c278a7cdd6748237efbbf Mon Sep 17 00:00:00 2001 From: takatost Date: Wed, 24 Jan 2024 21:53:29 +0800 Subject: [PATCH] fix: minimax request timeout (#2185) --- .../model_providers/minimax/llm/chat_completion.py | 2 +- .../model_providers/minimax/llm/chat_completion_pro.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/core/model_runtime/model_providers/minimax/llm/chat_completion.py b/api/core/model_runtime/model_providers/minimax/llm/chat_completion.py index c35100ec07..f688b348e5 100644 --- a/api/core/model_runtime/model_providers/minimax/llm/chat_completion.py +++ b/api/core/model_runtime/model_providers/minimax/llm/chat_completion.py @@ -78,7 +78,7 @@ class MinimaxChatCompletion(object): try: response = post( - url=url, data=dumps(body), headers=headers, stream=stream, timeout=10) + url=url, data=dumps(body), headers=headers, stream=stream, timeout=(10, 300)) except Exception as e: raise InternalServerError(e) diff --git a/api/core/model_runtime/model_providers/minimax/llm/chat_completion_pro.py b/api/core/model_runtime/model_providers/minimax/llm/chat_completion_pro.py index 51b1a4da27..71b337e152 100644 --- a/api/core/model_runtime/model_providers/minimax/llm/chat_completion_pro.py +++ b/api/core/model_runtime/model_providers/minimax/llm/chat_completion_pro.py @@ -84,7 +84,7 @@ class MinimaxChatCompletionPro(object): try: response = post( - url=url, data=dumps(body), headers=headers, stream=stream, timeout=10) + url=url, data=dumps(body), headers=headers, stream=stream, timeout=(10, 300)) except Exception as e: raise InternalServerError(e)