rusinopp commited on
Commit
334aae4
·
verified ·
1 Parent(s): c7986ad

Update external_api_engine.py

Browse files
Files changed (1) hide show
  1. external_api_engine.py +6 -0
external_api_engine.py CHANGED
@@ -29,3 +29,9 @@ def call_external_api(input_text):
29
  return "[API応答形式が不明です]"
30
  except Exception as e:
31
  return f"[Hugging Face APIエラー] {str(e)}"
 
 
 
 
 
 
 
29
  return "[API応答形式が不明です]"
30
  except Exception as e:
31
  return f"[Hugging Face APIエラー] {str(e)}"
32
+ from emotion_filter import rewrite_with_persona
33
+
34
+ # API応答をけいすけ語に整形
35
+ api_response = call_external_api(user_input)
36
+ keisuke_response = rewrite_with_persona(api_response, emotion="gentle")
37
+ return keisuke_response