Mbonea commited on
Commit
337da2b
·
1 Parent(s): b8e9ad6

await json

Browse files
Files changed (1) hide show
  1. App/Chat/utils/RAG.py +2 -1
App/Chat/utils/RAG.py CHANGED
@@ -57,7 +57,8 @@ class GenerativeAIAssistant:
57
  async with aiohttp.ClientSession() as session:
58
  async with session.post(url, json=data, headers={'Content-Type': 'application/json'}) as response:
59
  try:
60
- return await response.json()['candidates']
 
61
  except Exception as e:
62
  return f"Error ⚠️ {e}"
63
 
 
57
  async with aiohttp.ClientSession() as session:
58
  async with session.post(url, json=data, headers={'Content-Type': 'application/json'}) as response:
59
  try:
60
+ temp= await response.json()
61
+ return temp['candidates']
62
  except Exception as e:
63
  return f"Error ⚠️ {e}"
64