Spaces:
Sleeping
Sleeping
Update api.py
Browse files
api.py
CHANGED
@@ -377,18 +377,18 @@ def simple_intent_classifier(text):
|
|
377 |
|
378 |
def respond(input_text):
|
379 |
# 1) ์ฌ์ฉ์ ์
๋ ฅ ๊ธฐ์ต์ ์ ์ฅ (์ํ๋ฉด)
|
380 |
-
memory.
|
381 |
|
382 |
intent = simple_intent_classifier(input_text)
|
383 |
|
384 |
if "์ด๋ฆ" in input_text:
|
385 |
response = "์ ์ด๋ฆ์ Flexi์
๋๋ค."
|
386 |
-
memory.
|
387 |
return response
|
388 |
|
389 |
if "๋๊ตฌ" in input_text:
|
390 |
response = "์ ๋ Flexi๋ผ๊ณ ํด์."
|
391 |
-
memory.
|
392 |
return response
|
393 |
|
394 |
if intent == "์ ๋ณด์ง๋ฌธ":
|
@@ -399,7 +399,6 @@ def respond(input_text):
|
|
399 |
return response
|
400 |
summary = summarize_from_wikipedia(keyword)
|
401 |
response = f"{summary}\n๋ค๋ฅธ ๊ถ๊ธํ ์ ์์ผ์ ๊ฐ์?"
|
402 |
-
memory.add(response)
|
403 |
return response
|
404 |
|
405 |
# ๊ธฐ์ต์์ ์ ์ฌ ๋ฌธ์ฅ ๊บผ๋ด์ ํ๋กฌํํธ ๋ง๋ค๊ธฐ
|
|
|
377 |
|
378 |
def respond(input_text):
|
379 |
# 1) ์ฌ์ฉ์ ์
๋ ฅ ๊ธฐ์ต์ ์ ์ฅ (์ํ๋ฉด)
|
380 |
+
memory.process_input(input_text)
|
381 |
|
382 |
intent = simple_intent_classifier(input_text)
|
383 |
|
384 |
if "์ด๋ฆ" in input_text:
|
385 |
response = "์ ์ด๋ฆ์ Flexi์
๋๋ค."
|
386 |
+
memory.process_input(response) # ๋ต๋ณ๋ ๊ธฐ์ต์ ์ถ๊ฐ ๊ฐ๋ฅ
|
387 |
return response
|
388 |
|
389 |
if "๋๊ตฌ" in input_text:
|
390 |
response = "์ ๋ Flexi๋ผ๊ณ ํด์."
|
391 |
+
memory.process_input(response)
|
392 |
return response
|
393 |
|
394 |
if intent == "์ ๋ณด์ง๋ฌธ":
|
|
|
399 |
return response
|
400 |
summary = summarize_from_wikipedia(keyword)
|
401 |
response = f"{summary}\n๋ค๋ฅธ ๊ถ๊ธํ ์ ์์ผ์ ๊ฐ์?"
|
|
|
402 |
return response
|
403 |
|
404 |
# ๊ธฐ์ต์์ ์ ์ฌ ๋ฌธ์ฅ ๊บผ๋ด์ ํ๋กฌํํธ ๋ง๋ค๊ธฐ
|