mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-08 15:05:17 +02:00
[fix] use config.stream inside BaseLLM other than global
This commit is contained in:
parent
8f209bfeb5
commit
f31d2a198e
1 changed files with 1 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue