Merge pull request #1080 from iorisa/fixbug/issue/1076

fixbug: #1076
This commit is contained in:
Alexander Wu 2024-03-23 17:08:04 +08:00 committed by GitHub
commit ac755e7668
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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