codeBOKER commited on
Commit
599290d
·
1 Parent(s): 9081d86

Fix: append user_query to messages before sending to AI

Browse files
Files changed (1) hide show
  1. ai_service.py +1 -1
ai_service.py CHANGED
@@ -55,7 +55,7 @@ async def get_ai_response(user_query: str, telegram_id: int):
55
  if msg.get('content'):
56
  conversation_history.append({"role": msg['role'], "content": msg['content']})
57
 
58
- messages = [{"role": "system", "content": PROMPT}] + conversation_history
59
 
60
 
61
  import asyncio
 
55
  if msg.get('content'):
56
  conversation_history.append({"role": msg['role'], "content": msg['content']})
57
 
58
+ messages = [{"role": "system", "content": PROMPT}] + conversation_history + [{"role": "user", "content": user_query}]
59
 
60
 
61
  import asyncio