ldhldh commited on
Commit
901bd47
โ€ข
1 Parent(s): c18d642

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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### User:\n{text}\n\n### {npc}:{output}"
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