Upload interface_controller.py
Browse files- interface_controller.py +13 -9
interface_controller.py
CHANGED
|
@@ -1,13 +1,17 @@
|
|
| 1 |
|
| 2 |
-
import
|
| 3 |
-
from
|
| 4 |
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
templates = json.load(f)
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
| 11 |
|
| 12 |
-
|
| 13 |
-
|
|
|
|
|
|
|
|
|
| 1 |
|
| 2 |
+
from external_api_engine import call_external_api
|
| 3 |
+
from cui_display import display_cui_response
|
| 4 |
|
| 5 |
+
def chat(user_input):
|
| 6 |
+
# 外部APIでけいすけさんの返答を取得
|
| 7 |
+
response_text = call_external_api(user_input)
|
|
|
|
| 8 |
|
| 9 |
+
# ↓ここではEmotionCoreなどの解析は仮定(固定で記述)
|
| 10 |
+
interpretation = "安心したいという内面の訴え"
|
| 11 |
+
intention = "静かに寄り添って励ましたい"
|
| 12 |
+
persona = "感情人格(Keisuke-Emotion)"
|
| 13 |
|
| 14 |
+
# CUI形式で表示ログ生成
|
| 15 |
+
cui_log = display_cui_response(user_input, interpretation, intention, persona, response_text)
|
| 16 |
+
|
| 17 |
+
return cui_log
|