Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -255,13 +255,13 @@ def chat(id, npc, text):
|
|
255 |
model=os.environ['MODEL'],
|
256 |
messages=[
|
257 |
{"role": "system", "content": prom},
|
258 |
-
{"role": "user", "content": text+f"\n\n{npc}"}
|
259 |
]
|
260 |
)
|
261 |
output = response.choices[0].message.content
|
262 |
output = output.replace(".",".\n")
|
263 |
print(output)
|
264 |
-
history[npc][id] += f"\n\n
|
265 |
else:
|
266 |
output = "no model, GPU๋ฅผ ๋ ๊ณต์ ํด์ฃผ์ธ์."
|
267 |
|
|
|
255 |
model=os.environ['MODEL'],
|
256 |
messages=[
|
257 |
{"role": "system", "content": prom},
|
258 |
+
{"role": "user", "content": f"{id}:" + text+f"\n\n{npc}:"}
|
259 |
]
|
260 |
)
|
261 |
output = response.choices[0].message.content
|
262 |
output = output.replace(".",".\n")
|
263 |
print(output)
|
264 |
+
history[npc][id] += f"\n\n{id}:\n{text}\n\n{npc}:{output}"
|
265 |
else:
|
266 |
output = "no model, GPU๋ฅผ ๋ ๊ณต์ ํด์ฃผ์ธ์."
|
267 |
|