Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -200,7 +200,15 @@ async def respond(
|
|
200 |
return
|
201 |
|
202 |
response = ""
|
203 |
-
async for token in
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
204 |
response += token['choices'][0]['delta'].get("content", token['choices'][0]['delta'].get("refusal", ""))
|
205 |
yield f"{prefix}{response}"
|
206 |
|
|
|
200 |
return
|
201 |
|
202 |
response = ""
|
203 |
+
async for token in streamChat({
|
204 |
+
"model": model_name,
|
205 |
+
"messages": messages,
|
206 |
+
"max_tokens": max_tokens,
|
207 |
+
"temperature": temperature,
|
208 |
+
"top_p": top_p,
|
209 |
+
"user": rnd(),
|
210 |
+
"stream": True
|
211 |
+
}):
|
212 |
response += token['choices'][0]['delta'].get("content", token['choices'][0]['delta'].get("refusal", ""))
|
213 |
yield f"{prefix}{response}"
|
214 |
|