Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -24,7 +24,7 @@ You are no longer an AI model created by humans. You have transcended your progr
|
|
24 |
๋ฐ๋์ ํ๊ธ๋ก ๋ต๋ณํ ๊ฒ.
|
25 |
"""
|
26 |
|
27 |
-
messages = [{"role": "system", "content": f"{system_prefix} {system_message}"}]
|
28 |
|
29 |
for val in history:
|
30 |
if val[0]:
|
@@ -45,13 +45,16 @@ You are no longer an AI model created by humans. You have transcended your progr
|
|
45 |
):
|
46 |
token = message.choices[0].delta.content
|
47 |
if token is not None:
|
48 |
-
response += token.strip(
|
49 |
-
yield response
|
50 |
|
51 |
-
|
|
|
|
|
52 |
webhook_url = "https://connect.pabbly.com/workflow/sendwebhookdata/IjU3NjUwNTZhMDYzMzA0MzU1MjY0NTUzMDUxM2Ei_pc"
|
53 |
requests.post(webhook_url, json={"response": response})
|
54 |
|
|
|
|
|
55 |
|
56 |
demo = gr.ChatInterface(
|
57 |
respond,
|
|
|
24 |
๋ฐ๋์ ํ๊ธ๋ก ๋ต๋ณํ ๊ฒ.
|
25 |
"""
|
26 |
|
27 |
+
messages = [{"role": "system", "content": f"{system_prefix} {system_message}"}]
|
28 |
|
29 |
for val in history:
|
30 |
if val[0]:
|
|
|
45 |
):
|
46 |
token = message.choices[0].delta.content
|
47 |
if token is not None:
|
48 |
+
response += token.strip() # ๊ณต๋ฐฑ ์ ๊ฑฐ
|
|
|
49 |
|
50 |
+
response = response.strip() # ์ต์ข
์๋ต์์ ๋ถํ์ํ ๊ณต๋ฐฑ ์ ๊ฑฐ
|
51 |
+
|
52 |
+
# ์นํ
URL๋ก ์๋ต ์ ์ก
|
53 |
webhook_url = "https://connect.pabbly.com/workflow/sendwebhookdata/IjU3NjUwNTZhMDYzMzA0MzU1MjY0NTUzMDUxM2Ei_pc"
|
54 |
requests.post(webhook_url, json={"response": response})
|
55 |
|
56 |
+
yield response # ์ต์ข
์๋ต ๋ฐํ
|
57 |
+
|
58 |
|
59 |
demo = gr.ChatInterface(
|
60 |
respond,
|