diff --git a/py/__pycache__/ai.cpython-312.pyc b/py/__pycache__/ai.cpython-312.pyc index 998a499..ff29eb9 100644 Binary files a/py/__pycache__/ai.cpython-312.pyc and b/py/__pycache__/ai.cpython-312.pyc differ diff --git a/py/ai.py b/py/ai.py index 900b2ff..ae5d692 100644 --- a/py/ai.py +++ b/py/ai.py @@ -12,6 +12,8 @@ class AI: options={"temperature": 0.8}, ) + return_class.ai_response[access_token] = "" + for chunk in stream: print(chunk['message']['content']) return_class.ai_response[access_token] += chunk['message']['content'] @@ -28,5 +30,7 @@ class AI: messages=messages ) + return_class.ai_response[access_token] = "" + for chunk in stream_response: return_class.ai_response[access_token] += chunk.data.choices[0].delta.content