anubhav77 commited on
Commit
59b904b
·
1 Parent(s): f71faa1
Files changed (1) hide show
  1. src/chroma_intf.py +2 -2
src/chroma_intf.py CHANGED
@@ -120,13 +120,13 @@ meta_defaults={
120
  def getRelevantDocs(query:str):
121
  """This should also post the result to firebase"""
122
  retVal=retriever.get_relevant_documents(query)
123
- value=""
124
  for item in retVal:
125
  v="Info:"+item['page_content']+" "
126
  for key in item.metadata.keys():
127
  if key != "ID":
128
  v+=key+":"+item.metadata[key]+" "
129
- value+=v+"\n"
130
  db_interface.add_to_cache(input=query,value=value)
131
  return retVal
132
 
 
120
  def getRelevantDocs(query:str):
121
  """This should also post the result to firebase"""
122
  retVal=retriever.get_relevant_documents(query)
123
+ value=[]
124
  for item in retVal:
125
  v="Info:"+item['page_content']+" "
126
  for key in item.metadata.keys():
127
  if key != "ID":
128
  v+=key+":"+item.metadata[key]+" "
129
+ value.append(v)
130
  db_interface.add_to_cache(input=query,value=value)
131
  return retVal
132