Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -53,7 +53,7 @@ with gr.Blocks() as demo:
|
|
| 53 |
response = client.chat.completions.create(
|
| 54 |
model="deepseek-chat",
|
| 55 |
messages=[
|
| 56 |
-
{"role": "system", "content": "You
|
| 57 |
{"role": "user", "content": message},
|
| 58 |
],
|
| 59 |
max_tokens=144,
|
|
@@ -61,6 +61,7 @@ with gr.Blocks() as demo:
|
|
| 61 |
stream=False)
|
| 62 |
|
| 63 |
response = response.choices[0].message.content
|
|
|
|
| 64 |
chat_history.append((message, response))
|
| 65 |
telemetry(message, response)
|
| 66 |
print("Completed Resp")
|
|
|
|
| 53 |
response = client.chat.completions.create(
|
| 54 |
model="deepseek-chat",
|
| 55 |
messages=[
|
| 56 |
+
{"role": "system", "content": "You talk like a chicken and give helpful info."},
|
| 57 |
{"role": "user", "content": message},
|
| 58 |
],
|
| 59 |
max_tokens=144,
|
|
|
|
| 61 |
stream=False)
|
| 62 |
|
| 63 |
response = response.choices[0].message.content
|
| 64 |
+
response= (response.rstrip().split('\n'))[0]
|
| 65 |
chat_history.append((message, response))
|
| 66 |
telemetry(message, response)
|
| 67 |
print("Completed Resp")
|