MetaGPT
MetaGPT copied to clipboard
stream field in LLMConfig does not work
Bug description ~/.metagpt/config2.yaml
llm:
stream: False
does not affect the way to call llm.aask. Bug solved method
class BaseLLM(ABC):
async def aask(
self,
msg: Union[str, list[dict[str, str]]],
system_msgs: Optional[list[str]] = None,
format_msgs: Optional[list[dict[str, str]]] = None,
images: Optional[Union[str, list[str]]] = None,
timeout=USE_CONFIG_TIMEOUT,
stream=None,
) -> str:
if stream is None:
stream = config.llm.stream
rsp = await self.acompletion_text(message, stream=stream, timeout=self.get_timeout(timeout))