mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2025-12-29 17:44:50 +00:00
Sync with latest openai lib
Signed-off-by: Yasir Aris M <git@yasirdev.my.id>
This commit is contained in:
parent
9d89640e8a
commit
15923766fe
1 changed files with 1 additions and 1 deletions
|
|
@ -68,7 +68,7 @@ async def openai_chatbot(_, ctx: Message, strings):
|
||||||
stream=True,
|
stream=True,
|
||||||
)
|
)
|
||||||
async for chunk in response:
|
async for chunk in response:
|
||||||
if not chunk.choices[0].delta:
|
if not chunk.choices[0].delta or chunk.choices[0].delta.role:
|
||||||
continue
|
continue
|
||||||
num += 1
|
num += 1
|
||||||
answer += chunk.choices[0].delta.content
|
answer += chunk.choices[0].delta.content
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue