Update app.py
Browse files
app.py
CHANGED
|
@@ -507,21 +507,16 @@ def handsome_chat_completions():
|
|
| 507 |
first_chunk["choices"][0]["delta"]["reasoning_content"] = ""
|
| 508 |
first_chunk["choices"][0]["delta"]["role"] = "assistant"
|
| 509 |
yield f"data: {json.dumps(first_chunk)}\n\n"
|
| 510 |
-
|
| 511 |
-
|
| 512 |
-
|
| 513 |
-
|
| 514 |
-
|
| 515 |
-
|
| 516 |
-
|
| 517 |
-
|
| 518 |
-
|
| 519 |
-
|
| 520 |
-
openai3_chunk["choices"][0]["delta"]["reasoning_content"] = None
|
| 521 |
-
|
| 522 |
-
yield f"data: {json.dumps(openai1_chunk)}\n\n"
|
| 523 |
-
yield f"data: {json.dumps(openai2_chunk)}\n\n"
|
| 524 |
-
yield f"data: {json.dumps(openai3_chunk)}\n\n"
|
| 525 |
first_reasoning_chunk = False
|
| 526 |
|
| 527 |
# openai_chunk["choices"][0]["delta"]["content"] = "<think>\n"
|
|
|
|
| 507 |
first_chunk["choices"][0]["delta"]["reasoning_content"] = ""
|
| 508 |
first_chunk["choices"][0]["delta"]["role"] = "assistant"
|
| 509 |
yield f"data: {json.dumps(first_chunk)}\n\n"
|
| 510 |
+
|
| 511 |
+
openai_chunk["choices"][0]["delta"]["reasoning_content"] = None
|
| 512 |
+
|
| 513 |
+
openai_chunk["choices"][0]["delta"]["content"] = "<"
|
| 514 |
+
yield f"data: {json.dumps(openai_chunk)}\n\n"
|
| 515 |
+
openai_chunk["choices"][0]["delta"]["content"] = "think"
|
| 516 |
+
yield f"data: {json.dumps(openai_chunk)}\n\n"
|
| 517 |
+
openai_chunk["choices"][0]["delta"]["content"] = ">\n"
|
| 518 |
+
yield f"data: {json.dumps(openai_chunk)}\n\n"
|
| 519 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 520 |
first_reasoning_chunk = False
|
| 521 |
|
| 522 |
# openai_chunk["choices"][0]["delta"]["content"] = "<think>\n"
|