From f31d2a198e903c3042dad6be22067075341f09be Mon Sep 17 00:00:00 2001 From: Wei-Jianan Date: Fri, 17 May 2024 11:42:57 +0800 Subject: [PATCH] [fix] use config.stream inside BaseLLM other than global --- metagpt/provider/base_llm.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/metagpt/provider/base_llm.py b/metagpt/provider/base_llm.py index f444e32ba..aae00f60d 100644 --- a/metagpt/provider/base_llm.py +++ b/metagpt/provider/base_llm.py @@ -22,7 +22,6 @@ from tenacity import ( wait_random_exponential, ) -from metagpt.config2 import config from metagpt.configs.llm_config import LLMConfig from metagpt.const import LLM_API_TIMEOUT, USE_CONFIG_TIMEOUT from metagpt.logs import logger @@ -148,7 +147,7 @@ class BaseLLM(ABC): else: message.extend(msg) if stream is None: - stream = config.llm.stream + stream = self.config.stream logger.debug(message) rsp = await self.acompletion_text(message, stream=stream, timeout=self.get_timeout(timeout)) return rsp