mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2025-12-29 09: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
6868906ecb
commit
9d89640e8a
1 changed files with 2 additions and 0 deletions
|
|
@ -68,6 +68,8 @@ async def openai_chatbot(_, ctx: Message, strings):
|
|||
stream=True,
|
||||
)
|
||||
async for chunk in response:
|
||||
if not chunk.choices[0].delta:
|
||||
continue
|
||||
num += 1
|
||||
answer += chunk.choices[0].delta.content
|
||||
if num == 30:
|
||||
|
|
|
|||
Loading…
Reference in a new issue