Fixes.
This commit is contained in:
parent
7bf91cdf7e
commit
eb8fef13ff
2 changed files with 4 additions and 0 deletions
Binary file not shown.
4
py/ai.py
4
py/ai.py
|
@ -12,6 +12,8 @@ class AI:
|
||||||
options={"temperature": 0.8},
|
options={"temperature": 0.8},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
return_class.ai_response[access_token] = ""
|
||||||
|
|
||||||
for chunk in stream:
|
for chunk in stream:
|
||||||
print(chunk['message']['content'])
|
print(chunk['message']['content'])
|
||||||
return_class.ai_response[access_token] += chunk['message']['content']
|
return_class.ai_response[access_token] += chunk['message']['content']
|
||||||
|
@ -28,5 +30,7 @@ class AI:
|
||||||
messages=messages
|
messages=messages
|
||||||
)
|
)
|
||||||
|
|
||||||
|
return_class.ai_response[access_token] = ""
|
||||||
|
|
||||||
for chunk in stream_response:
|
for chunk in stream_response:
|
||||||
return_class.ai_response[access_token] += chunk.data.choices[0].delta.content
|
return_class.ai_response[access_token] += chunk.data.choices[0].delta.content
|
||||||
|
|
Loading…
Reference in a new issue