Spaces:
Running
Running
Upload main.py
Browse files
main.py
CHANGED
@@ -637,8 +637,8 @@ def chatgpt3_turbo(item: Chatgpt3Texts):
|
|
637 |
)
|
638 |
if isinstance(chat_completion, dict):
|
639 |
answer = chat_completion.choices[0].message.content
|
640 |
-
answer = ""
|
641 |
else:
|
|
|
642 |
for token in chat_completion:
|
643 |
content = token["choices"][0]["delta"].get("content")
|
644 |
if content is not None:
|
@@ -674,8 +674,8 @@ def chatgpt4_turbo(
|
|
674 |
)
|
675 |
if isinstance(chat_completion, dict):
|
676 |
answer = chat_completion.choices[0].message.content
|
677 |
-
answer = ""
|
678 |
else:
|
|
|
679 |
for token in chat_completion:
|
680 |
content = token["choices"][0]["delta"].get("content")
|
681 |
if content is not None:
|
|
|
637 |
)
|
638 |
if isinstance(chat_completion, dict):
|
639 |
answer = chat_completion.choices[0].message.content
|
|
|
640 |
else:
|
641 |
+
answer = ""
|
642 |
for token in chat_completion:
|
643 |
content = token["choices"][0]["delta"].get("content")
|
644 |
if content is not None:
|
|
|
674 |
)
|
675 |
if isinstance(chat_completion, dict):
|
676 |
answer = chat_completion.choices[0].message.content
|
|
|
677 |
else:
|
678 |
+
answer = ""
|
679 |
for token in chat_completion:
|
680 |
content = token["choices"][0]["delta"].get("content")
|
681 |
if content is not None:
|