mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-24 14:15:17 +02:00
Update openai_api.py
This commit is contained in:
parent
3f12954e55
commit
ba1866f7ca
1 changed files with 1 additions and 1 deletions
|
|
@ -142,7 +142,7 @@ class OpenAILLM(BaseLLM):
|
|||
async def acompletion_text(self, messages: list[dict], stream=False, timeout=3) -> str:
|
||||
"""when streaming, print each token in place."""
|
||||
if stream:
|
||||
await self._achat_completion_stream(messages, timeout=timeout)
|
||||
return await self._achat_completion_stream(messages, timeout=timeout)
|
||||
|
||||
rsp = await self._achat_completion(messages, timeout=timeout)
|
||||
return self.get_choice_text(rsp)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue