MetaGPT
MetaGPT copied to clipboard
If the result of Action ask can be returned in streaming format, users don't have to wait for all data to be ready before seeing the results.
I'm providing a user interaction interface for the Agent. If the result of Action ask can be returned in streaming format, users don't have to wait for all data to be ready before seeing the results.
#998
Starting from version 0.7, Action._aask defaults to stream mode."
async def _aask(self, prompt: str, system_msgs: Optional[list[str]] = None) -> str:
"""Append default prefix"""
return await self.llm.aask(prompt, system_msgs)
async def aask(
self,
msg: str,
system_msgs: Optional[list[str]] = None,
format_msgs: Optional[list[dict[str, str]]] = None,
images: Optional[Union[str, list[str]]] = None,
timeout=3,
stream=True,
) -> str:
close for duplicate