Spaces:
Building
Building
Update chat_handler.py
Browse files- chat_handler.py +4 -0
chat_handler.py
CHANGED
@@ -197,9 +197,13 @@ async def chat(body: ChatRequest, x_session_id: str = Header(...)):
|
|
197 |
|
198 |
log(f"π¬ User input: {user_input}")
|
199 |
log(f"π Session state: {session.state}, last_intent: {session.last_intent}")
|
|
|
200 |
|
201 |
session.add_turn("user", user_input)
|
202 |
|
|
|
|
|
|
|
203 |
cfg = get_config()
|
204 |
|
205 |
# Get project config
|
|
|
197 |
|
198 |
log(f"π¬ User input: {user_input}")
|
199 |
log(f"π Session state: {session.state}, last_intent: {session.last_intent}")
|
200 |
+
log(f"π Chat history length before adding: {len(session.chat_history)}")
|
201 |
|
202 |
session.add_turn("user", user_input)
|
203 |
|
204 |
+
# Debug - chat history'yi kontrol et
|
205 |
+
log(f"π Chat history after adding: {session.chat_history}")
|
206 |
+
|
207 |
cfg = get_config()
|
208 |
|
209 |
# Get project config
|