MetaGPT icon indicating copy to clipboard operation
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.

Open redlion99 opened this issue 1 year ago • 1 comments

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.

redlion99 avatar Mar 13 '24 03:03 redlion99

#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:

iorisa avatar Mar 14 '24 08:03 iorisa

close for duplicate

geekan avatar Mar 21 '24 03:03 geekan