Yasu777 commited on
Commit
b349b3c
·
verified ·
1 Parent(s): 1088462

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -44,7 +44,7 @@ if user_input:
44
  message_placeholder = st.empty() # 応答の一時表示用の空要素
45
  for chunk in response:
46
  if "choices" in chunk:
47
- chunk_text = chunk['choices'][0]['delta']['content']
48
  response_text += chunk_text
49
  message_placeholder.text(response_text) # 部分的な応答を表示
50
 
@@ -57,4 +57,4 @@ if user_input:
57
  # 会話履歴をリセットするボタン
58
  if st.button("会話をリセット"):
59
  st.session_state['conversation_history'] = []
60
- st.experimental_set_query_params()
 
44
  message_placeholder = st.empty() # 応答の一時表示用の空要素
45
  for chunk in response:
46
  if "choices" in chunk:
47
+ chunk_text = chunk['choices'][0]['delta'].get('content', '')
48
  response_text += chunk_text
49
  message_placeholder.text(response_text) # 部分的な応答を表示
50
 
 
57
  # 会話履歴をリセットするボタン
58
  if st.button("会話をリセット"):
59
  st.session_state['conversation_history'] = []
60
+ st.query_params = {}