Update app.py
Browse files
app.py
CHANGED
|
@@ -530,11 +530,10 @@ def parse_data_chunk(data_chunk):
|
|
| 530 |
Returns:
|
| 531 |
list: A list of individual data entries with whitespace stripped.
|
| 532 |
"""
|
| 533 |
-
if isinstance(data_chunk, ChatCompletionStreamOutput):
|
| 534 |
data_chunk = data_chunk.text
|
| 535 |
chunks = data_chunk.split("data:")
|
| 536 |
|
| 537 |
-
|
| 538 |
def generate(message, temperature):
|
| 539 |
"""
|
| 540 |
Generates a chat completion response by streaming data from the client chat model.
|
|
|
|
| 530 |
Returns:
|
| 531 |
list: A list of individual data entries with whitespace stripped.
|
| 532 |
"""
|
| 533 |
+
if isinstance(data_chunk, client.ChatCompletionStreamOutput):
|
| 534 |
data_chunk = data_chunk.text
|
| 535 |
chunks = data_chunk.split("data:")
|
| 536 |
|
|
|
|
| 537 |
def generate(message, temperature):
|
| 538 |
"""
|
| 539 |
Generates a chat completion response by streaming data from the client chat model.
|