bla commited on
Commit
f30fab7
·
verified ·
1 Parent(s): db84a0f

Update App/Chat/utils/RAG.py

Browse files
Files changed (1) hide show
  1. App/Chat/utils/RAG.py +3 -1
App/Chat/utils/RAG.py CHANGED
@@ -40,6 +40,8 @@ class GenerativeAIAssistant:
40
 
41
  #Question
42
  {question}
 
 
43
  '''
44
  return Template
45
 
@@ -101,7 +103,7 @@ class GenerativeAIAssistant:
101
  async with session.post(url, json=payload, headers={'Content-Type': 'application/json'}) as response:
102
  try:
103
  temp= await response.json()
104
- return temp["candidates"][0]
105
  except Exception as e:
106
  return f"Error ⚠️ {e} {temp}"
107
 
 
40
 
41
  #Question
42
  {question}
43
+
44
+ #if it doesn't answer the question, improvise
45
  '''
46
  return Template
47
 
 
103
  async with session.post(url, json=payload, headers={'Content-Type': 'application/json'}) as response:
104
  try:
105
  temp= await response.json()
106
+ return temp["candidates"][0]['content']
107
  except Exception as e:
108
  return f"Error ⚠️ {e} {temp}"
109