ko commited on
Commit
6a3e128
·
verified ·
1 Parent(s): 1c3b6c3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -16,6 +16,9 @@ with open("kosen.txt", encoding="utf-8") as f:
16
  def rag_chat(message, history):
17
  # 過去の会話を文字列化
18
  conversation = ""
 
 
 
19
  for msg in history:
20
  role = msg["role"]
21
  content = msg["content"]
 
16
  def rag_chat(message, history):
17
  # 過去の会話を文字列化
18
  conversation = ""
19
+ if history is None:
20
+ history = []
21
+
22
  for msg in history:
23
  role = msg["role"]
24
  content = msg["content"]