vector-vault 4.3.2__tar.gz → 4.3.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (21) hide show
  1. {vector_vault-4.3.2 → vector_vault-4.3.4}/PKG-INFO +1 -1
  2. {vector_vault-4.3.2 → vector_vault-4.3.4}/setup.py +1 -1
  3. {vector_vault-4.3.2 → vector_vault-4.3.4}/vector_vault.egg-info/PKG-INFO +1 -1
  4. {vector_vault-4.3.2 → vector_vault-4.3.4}/vectorvault/cloudmanager.py +2 -1
  5. {vector_vault-4.3.2 → vector_vault-4.3.4}/vectorvault/vault.py +8 -13
  6. {vector_vault-4.3.2 → vector_vault-4.3.4}/LICENSE +0 -0
  7. {vector_vault-4.3.2 → vector_vault-4.3.4}/README.md +0 -0
  8. {vector_vault-4.3.2 → vector_vault-4.3.4}/setup.cfg +0 -0
  9. {vector_vault-4.3.2 → vector_vault-4.3.4}/vector_vault.egg-info/SOURCES.txt +0 -0
  10. {vector_vault-4.3.2 → vector_vault-4.3.4}/vector_vault.egg-info/dependency_links.txt +0 -0
  11. {vector_vault-4.3.2 → vector_vault-4.3.4}/vector_vault.egg-info/requires.txt +0 -0
  12. {vector_vault-4.3.2 → vector_vault-4.3.4}/vector_vault.egg-info/top_level.txt +0 -0
  13. {vector_vault-4.3.2 → vector_vault-4.3.4}/vectorvault/__init__.py +0 -0
  14. {vector_vault-4.3.2 → vector_vault-4.3.4}/vectorvault/ai.py +0 -0
  15. {vector_vault-4.3.2 → vector_vault-4.3.4}/vectorvault/cloud_api.py +0 -0
  16. {vector_vault-4.3.2 → vector_vault-4.3.4}/vectorvault/creds.py +0 -0
  17. {vector_vault-4.3.2 → vector_vault-4.3.4}/vectorvault/download.py +0 -0
  18. {vector_vault-4.3.2 → vector_vault-4.3.4}/vectorvault/itemize.py +0 -0
  19. {vector_vault-4.3.2 → vector_vault-4.3.4}/vectorvault/tools_gpt.py +0 -0
  20. {vector_vault-4.3.2 → vector_vault-4.3.4}/vectorvault/vecreq.py +0 -0
  21. {vector_vault-4.3.2 → vector_vault-4.3.4}/vectorvault/wrap.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vector_vault
3
- Version: 4.3.2
3
+ Version: 4.3.4
4
4
  Summary: Quickly create ChatGPT RAG apps and Unleash the full potential of GenAI with Vector Vault
5
5
  Home-page: https://github.com/John-Rood/VectorVault
6
6
  Author: VectorVault.io
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="vector_vault",
5
- version="4.3.2",
5
+ version="4.3.4",
6
6
  packages=find_packages(),
7
7
  author="VectorVault.io",
8
8
  author_email="john@johnrood.com",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vector-vault
3
- Version: 4.3.2
3
+ Version: 4.3.4
4
4
  Summary: Quickly create ChatGPT RAG apps and Unleash the full potential of GenAI with Vector Vault
5
5
  Home-page: https://github.com/John-Rood/VectorVault
6
6
  Author: VectorVault.io
@@ -99,7 +99,8 @@ class CloudManager:
99
99
  return _map
100
100
 
101
101
  def update(self):
102
- T(target=call_update, args=(self.user, self.vault, self.api)).start()
102
+ t = T(target=call_update, args=(self.user, self.vault, self.api))
103
+ t.start()
103
104
 
104
105
  def build_update(self):
105
106
  _map = self.get_mapping()
@@ -82,7 +82,7 @@ class Vault:
82
82
  self.openai_key = openai_key
83
83
  openai.api_key = self.openai_key
84
84
  try:
85
- self.cloud_manager = CloudManager(self.user, self.api, self.vault, self.openai_key)
85
+ self.cloud_manager = CloudManager(self.user, self.api, self.vault)
86
86
  print(f'Connected vault: {self.vault}') if self.verbose else 0
87
87
  except Exception as e:
88
88
  print('API KEY NOT FOUND or no internet connection!', e)
@@ -1009,7 +1009,7 @@ class Vault:
1009
1009
  print(f"API Failed too many times, exiting loop: {e}.")
1010
1010
  break
1011
1011
 
1012
- self.update_conversation_history(self.cuid, response, user=False) if self.cuid else None
1012
+ self.update_conversation_history(self.cuid, f'User: {text} \n\nAI: {response}', user=False) if self.cuid else None
1013
1013
  print("get chat time --- %s seconds ---" % (time.time() - start_time)) if self.verbose else 0
1014
1014
 
1015
1015
  return {'response': response, 'context': context} if return_context else response
@@ -1129,7 +1129,7 @@ class Vault:
1129
1129
  except Exception as e:
1130
1130
  raise e
1131
1131
  if counter == len(inputs):
1132
- self.update_conversation_history(self.cuid, full_response, user=False) if self.cuid else None
1132
+ self.update_conversation_history(self.cuid, f'User: {text} \n\nAI: {full_response}', user=False) if self.cuid else None
1133
1133
  yield '!END'
1134
1134
  self.rate_limiter.on_success()
1135
1135
 
@@ -1167,11 +1167,11 @@ class Vault:
1167
1167
  for i in range(len(metatag)):
1168
1168
  yield str(metatag_prefixes[i]) + str(item['metadata'][f'{metatag[i]}'])
1169
1169
  yield item['data']
1170
- self.update_conversation_history(self.cuid, full_response, user=False) if self.cuid else None
1170
+ self.update_conversation_history(self.cuid, f'User: {text} \n\nAI: {full_response}', user=False) if self.cuid else None
1171
1171
  yield '!END'
1172
1172
  self.rate_limiter.on_success()
1173
1173
  else:
1174
- self.update_conversation_history(self.cuid, full_response, user=False) if self.cuid else None
1174
+ self.update_conversation_history(self.cuid, f'User: {text} \n\nAI: {full_response}', user=False) if self.cuid else None
1175
1175
  yield '!END'
1176
1176
  self.rate_limiter.on_success()
1177
1177
 
@@ -1183,7 +1183,7 @@ class Vault:
1183
1183
  self.rate_limiter.on_success()
1184
1184
  except Exception as e:
1185
1185
  raise e
1186
- self.update_conversation_history(self.cuid, full_response, user=False) if self.cuid else None
1186
+ self.update_conversation_history(self.cuid, f'User: {text} \n\nAI: {full_response}', user=False) if self.cuid else None
1187
1187
  yield '!END'
1188
1188
 
1189
1189
  self.rate_limiter.on_success()
@@ -1218,7 +1218,7 @@ class Vault:
1218
1218
  return full_text
1219
1219
 
1220
1220
 
1221
- def print_vault_data(self, print_data: bool = True, return_data: bool = False):
1221
+ def print_vault_data(self, return_data: bool = False):
1222
1222
  '''
1223
1223
  Function to print vault data
1224
1224
  '''
@@ -1265,8 +1265,7 @@ class Vault:
1265
1265
  yield f"data: {json.dumps({'data': word})} \n\n"
1266
1266
 
1267
1267
 
1268
- def update_conversation_history(self, conversation_id, message, metadata_list = None, user = True):
1269
- message = f'User: {message}' if user else f'AI: {message}'
1268
+ def update_conversation_history(self, conversation_id, message, metadata_list = None):
1270
1269
  try:
1271
1270
  metadata_list = metadata_list if metadata_list else json.loads(self.cloud_manager.download_text_from_cloud(f'user_history/{conversation_id}/metadata'))
1272
1271
  except:
@@ -1310,9 +1309,6 @@ class Vault:
1310
1309
 
1311
1310
  message_ids = golden_retriever(meta) if meta != None else []
1312
1311
 
1313
- update = T(target=self.update_conversation_history, args=(conversation_id, message, meta if meta else None))
1314
- update.start()
1315
-
1316
1312
  print('message_ids:', message_ids) if self.verbose else None
1317
1313
 
1318
1314
  if message_ids != []:
@@ -1338,7 +1334,6 @@ class Vault:
1338
1334
 
1339
1335
  history = history + "Vector search conversation history:" + '\n'.join(vector_history)
1340
1336
 
1341
- update.join()
1342
1337
  return history
1343
1338
 
1344
1339
 
File without changes
File without changes
File without changes