anubhav77 commited on
Commit
cde6f0b
·
1 Parent(s): aa85c4e
src/baseInfra/dbInterface.py CHANGED
@@ -89,7 +89,8 @@ class DbInterface:
89
  if item['input'] == input:
90
  item['value']=value
91
  retVal=True
92
- cache.append({'input':input,'value':value})
 
93
  fb.patch(self.base_dir+"/"+self.cache_loc, {fb_key:cache})
94
  return retVal
95
 
 
89
  if item['input'] == input:
90
  item['value']=value
91
  retVal=True
92
+ #cache.append({'input':input,'value':value})
93
+ cache={'input':input,'value':value}
94
  fb.patch(self.base_dir+"/"+self.cache_loc, {fb_key:cache})
95
  return retVal
96
 
src/chromaIntf.py CHANGED
@@ -98,10 +98,13 @@ class ChromaIntf():
98
  self.db_interface.add_to_cache(input=query,value=value)
99
  except:
100
  for item in retVal:
101
- v="Info:"+item.page_content+" "
102
- for key in item.metadata.keys():
103
- if key != "ID":
104
- v+=key+":"+str(item.metadata[key])+" "
 
 
 
105
  value.append(v)
106
  self.db_interface.add_to_cache(input=query,value=value)
107
  return retVal
 
98
  self.db_interface.add_to_cache(input=query,value=value)
99
  except:
100
  for item in retVal:
101
+ if excludeMeta:
102
+ v=item.page_content+" \n"
103
+ else:
104
+ v="Info:"+item.page_content+" "
105
+ for key in item.metadata.keys():
106
+ if key != "ID":
107
+ v+=key+":"+str(item.metadata[key])+" "
108
  value.append(v)
109
  self.db_interface.add_to_cache(input=query,value=value)
110
  return retVal