Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -220,7 +220,7 @@ def chat(id, npc, text):
|
|
| 220 |
history[npc][id] = "###" + history[npc][id].split("###", 3)[3]
|
| 221 |
npc_list = str([k for k in npc_story.keys()]).replace('\'', '')
|
| 222 |
town_story = f"""[{id}์ ๋ง์]
|
| 223 |
-
์ธ๋ด ๊ณณ์ ์กฐ๊ทธ๋ง
|
| 224 |
|
| 225 |
ํ์ฌ {npc_list}์ด ์ด๊ณ ์์ต๋๋ค."""
|
| 226 |
|
|
@@ -255,7 +255,7 @@ def chat(id, npc, text):
|
|
| 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
|
|
|
|
| 220 |
history[npc][id] = "###" + history[npc][id].split("###", 3)[3]
|
| 221 |
npc_list = str([k for k in npc_story.keys()]).replace('\'', '')
|
| 222 |
town_story = f"""[{id}์ ๋ง์]
|
| 223 |
+
์ธ๋ด ๊ณณ์ ์กฐ๊ทธ๋ง ๋ง์์ ์ฌ๋ฌ ์ฃผ๋ฏผ๋ค์ด ๋ชจ์ฌ ์ด๊ณ ์์ต๋๋ค.
|
| 224 |
|
| 225 |
ํ์ฌ {npc_list}์ด ์ด๊ณ ์์ต๋๋ค."""
|
| 226 |
|
|
|
|
| 255 |
model=os.environ['MODEL'],
|
| 256 |
messages=[
|
| 257 |
{"role": "system", "content": prom},
|
| 258 |
+
{"role": "user", "content": f"{npc}์ ๋๋ต์ ๋ค์ ๋ฌธ์ฅ์ ๋ง์ถฐ ์์ฐ์ค๋ฝ๊ฒ ์์ฑํด์ฃผ์ธ์. ํ ๋ฌธ์ฅ๋ง ์์ฑํ์ธ์.\n\n{id}:" + text+f"\n\n{npc}:"}
|
| 259 |
]
|
| 260 |
)
|
| 261 |
output = response.choices[0].message.content
|