Update app.py
Browse files
app.py
CHANGED
@@ -62,7 +62,7 @@ def calculate_eou(chat_ctx, session):
|
|
62 |
def respond(
|
63 |
message,
|
64 |
history: list[tuple[str, str]],
|
65 |
-
|
66 |
temperature=0.6,
|
67 |
top_p=0.95,
|
68 |
):
|
@@ -89,12 +89,12 @@ def respond(
|
|
89 |
stream=True,
|
90 |
temperature=temperature,
|
91 |
top_p=top_p,
|
|
|
92 |
)
|
93 |
|
94 |
for chunk in stream:
|
95 |
-
|
96 |
-
|
97 |
-
yield full_response # Send raw unmodified response to Gradio
|
98 |
|
99 |
# This will match both console and Gradio output
|
100 |
print(f"Final response: {full_response}")
|
|
|
62 |
def respond(
|
63 |
message,
|
64 |
history: list[tuple[str, str]],
|
65 |
+
max_tokens=2048,
|
66 |
temperature=0.6,
|
67 |
top_p=0.95,
|
68 |
):
|
|
|
89 |
stream=True,
|
90 |
temperature=temperature,
|
91 |
top_p=top_p,
|
92 |
+
stream=True
|
93 |
)
|
94 |
|
95 |
for chunk in stream:
|
96 |
+
print(chunk.choices[0].delta.content)
|
97 |
+
yield chunk.choices[0].delta.content # Send raw unmodified response to Gradio
|
|
|
98 |
|
99 |
# This will match both console and Gradio output
|
100 |
print(f"Final response: {full_response}")
|