prashantmatlani commited on
Commit
8c87437
·
1 Parent(s): 21dbf32

modified api server

Browse files
Files changed (1) hide show
  1. api_server.py +4 -4
api_server.py CHANGED
@@ -130,15 +130,15 @@ def chat(req: ChatRequest):
130
 
131
  print("\n🧾 RAW REQUEST BODY:", req)
132
 
133
- # set flag to indicate the start of the conversation
134
- if not state.conversation_started:
135
- state.conversation_started = True
136
-
137
  if session_id not in sessions:
138
  sessions[session_id] = ConversationState()
139
 
140
  state = sessions[session_id]
141
 
 
 
 
 
142
  # SET INITIAL QUERY ONLY FOR FIRST, INITIAL USER MESSAGE; IGNORE SYSTEM MESSAGES
143
  if not state.initial_query and not message.startswith("__agent__:"):
144
  state.initial_query = message
 
130
 
131
  print("\n🧾 RAW REQUEST BODY:", req)
132
 
 
 
 
 
133
  if session_id not in sessions:
134
  sessions[session_id] = ConversationState()
135
 
136
  state = sessions[session_id]
137
 
138
+ # set flag to indicate the start of the conversation
139
+ if not state.conversation_started:
140
+ state.conversation_started = True
141
+
142
  # SET INITIAL QUERY ONLY FOR FIRST, INITIAL USER MESSAGE; IGNORE SYSTEM MESSAGES
143
  if not state.initial_query and not message.startswith("__agent__:"):
144
  state.initial_query = message