From 89b263a2fb47ccd37a5d287e74f91e70899ce430 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8E=98=E6=9D=83=20=E9=A9=AC?= Date: Sat, 23 Mar 2024 13:24:23 +0800 Subject: [PATCH] fixbug: #1076 --- metagpt/provider/human_provider.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/metagpt/provider/human_provider.py b/metagpt/provider/human_provider.py index f205ecd1f..824acd345 100644 --- a/metagpt/provider/human_provider.py +++ b/metagpt/provider/human_provider.py @@ -6,7 +6,7 @@ Author: garylin2099 from typing import Optional from metagpt.configs.llm_config import LLMConfig -from metagpt.const import USE_CONFIG_TIMEOUT +from metagpt.const import LLM_API_TIMEOUT, USE_CONFIG_TIMEOUT from metagpt.logs import logger from metagpt.provider.base_llm import BaseLLM @@ -49,3 +49,6 @@ class HumanProvider(BaseLLM): async def acompletion_text(self, messages: list[dict], stream=False, timeout=USE_CONFIG_TIMEOUT) -> str: """dummy implementation of abstract method in base""" return "" + + def get_timeout(self, timeout: int) -> int: + return timeout or LLM_API_TIMEOUT