Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stream field in LLMConfig does not work #1257

Closed
Wei-Jianan opened this issue May 9, 2024 · 0 comments
Closed

stream field in LLMConfig does not work #1257

Wei-Jianan opened this issue May 9, 2024 · 0 comments

Comments

@Wei-Jianan
Copy link
Contributor

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))
       
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant