Fix properly returning full conversation messages
Browse files
app.py
CHANGED
@@ -127,12 +127,12 @@ def chat_with_model(messages):
|
|
127 |
|
128 |
print(f'Step 2: {messages}')
|
129 |
|
130 |
-
yield messages
|
131 |
|
132 |
if in_think:
|
133 |
output_text += "*"
|
134 |
messages[-1]["content"] = output_text
|
135 |
-
yield messages
|
136 |
|
137 |
# Wait for thread to finish
|
138 |
thread.join(timeout=1.0)
|
@@ -141,7 +141,7 @@ def chat_with_model(messages):
|
|
141 |
|
142 |
print(f'Step 3: {messages}')
|
143 |
|
144 |
-
return messages
|
145 |
|
146 |
|
147 |
|
|
|
127 |
|
128 |
print(f'Step 2: {messages}')
|
129 |
|
130 |
+
yield messages
|
131 |
|
132 |
if in_think:
|
133 |
output_text += "*"
|
134 |
messages[-1]["content"] = output_text
|
135 |
+
yield messages
|
136 |
|
137 |
# Wait for thread to finish
|
138 |
thread.join(timeout=1.0)
|
|
|
141 |
|
142 |
print(f'Step 3: {messages}')
|
143 |
|
144 |
+
return messages
|
145 |
|
146 |
|
147 |
|