Mbonea commited on
Commit
dfacf75
·
1 Parent(s): 6f54b8e

first candidate

Browse files
Files changed (1) hide show
  1. App/Chat/utils/RAG.py +1 -1
App/Chat/utils/RAG.py CHANGED
@@ -102,7 +102,7 @@ class GenerativeAIAssistant:
102
  async with session.post(url, json=payload, headers={'Content-Type': 'application/json'}) as response:
103
  try:
104
  temp= await response.json()
105
- return temp["candidates"][0]["content"]['parts'][0]['text']
106
  except Exception as e:
107
  return f"Error ⚠️ {e}"
108
 
 
102
  async with session.post(url, json=payload, headers={'Content-Type': 'application/json'}) as response:
103
  try:
104
  temp= await response.json()
105
+ return temp["candidates"][0]
106
  except Exception as e:
107
  return f"Error ⚠️ {e}"
108