codeBOKER commited on
Commit
0873a9c
·
verified ·
1 Parent(s): 96d2da4

implement await

Browse files
Files changed (1) hide show
  1. ai_service.py +1 -1
ai_service.py CHANGED
@@ -180,7 +180,7 @@ async def get_ai_response(user_query: str, telegram_id: int):
180
  conversation_history = []
181
  if db_manager:
182
  print("arriving to get history messages: \n")
183
- raw_history = db_manager.get_conversation_history(telegram_id, limit=6)
184
  raw_history.reverse()
185
  for msg in raw_history:
186
  if msg.get('message_text'):
 
180
  conversation_history = []
181
  if db_manager:
182
  print("arriving to get history messages: \n")
183
+ raw_history = await db_manager.get_conversation_history(telegram_id, limit=6)
184
  raw_history.reverse()
185
  for msg in raw_history:
186
  if msg.get('message_text'):