IanYeo commited on
Commit
3ce673a
·
1 Parent(s): 9ce7596
Files changed (1) hide show
  1. app.py +5 -12
app.py CHANGED
@@ -14,11 +14,11 @@ if "messages" not in st.session_state:
14
  st.session_state.history = []
15
  st.session_state.answer = None
16
 
17
- # if clear_chat:
18
- # st.session_state.messages = []
19
- # st.session_state.conversation_id = None
20
- # st.session_state.history = []
21
- # st.session_state.answer = None
22
 
23
 
24
  def random_response(
@@ -47,12 +47,6 @@ def random_response(
47
  history_list.append(history_single)
48
  history_single = {}
49
 
50
- params = {
51
- 'question': message[-1]['content'],
52
- # 'conversation_id': Optional[str] = None,
53
- }
54
-
55
-
56
  question = {
57
  'message': message[-1]['content'],
58
  'history': history_list,
@@ -62,7 +56,6 @@ def random_response(
62
  request_session = requests.Session()
63
  stream = request_session.post(
64
  f"{URL}stream",
65
- params=params,
66
  json=question,
67
  )
68
 
 
14
  st.session_state.history = []
15
  st.session_state.answer = None
16
 
17
+ if clear_chat:
18
+ st.session_state.messages = []
19
+ st.session_state.conversation_id = None
20
+ st.session_state.history = []
21
+ st.session_state.answer = None
22
 
23
 
24
  def random_response(
 
47
  history_list.append(history_single)
48
  history_single = {}
49
 
 
 
 
 
 
 
50
  question = {
51
  'message': message[-1]['content'],
52
  'history': history_list,
 
56
  request_session = requests.Session()
57
  stream = request_session.post(
58
  f"{URL}stream",
 
59
  json=question,
60
  )
61