mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-15 01:21:48 +03:00
feat: Remove unused method and update file processing (#1890)
logic # Description Please include a summary of the changes and the related issue. Please also include relevant motivation and context. ## Checklist before requesting a review Please delete options that are not relevant. - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my code - [ ] I have commented hard-to-understand areas - [ ] I have ideally added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged ## Screenshots (if appropriate):
This commit is contained in:
parent
0cc917ea9e
commit
1ffe25eae4
@ -29,17 +29,6 @@ class Vector(Repository):
|
||||
|
||||
return response
|
||||
|
||||
def set_file_sha_from_metadata(self, file_sha1):
|
||||
# It looks at the file that have a file_sha1 in the metadata that is corresponding but an empty file_sha1 column and set it
|
||||
response = (
|
||||
self.db.table("vectors")
|
||||
.update({"file_sha1": file_sha1})
|
||||
.match({"metadata->>file_sha1": file_sha1})
|
||||
.execute()
|
||||
)
|
||||
|
||||
return response
|
||||
|
||||
# TODO: remove duplicate similarity_search in supabase vector store
|
||||
def similarity_search(self, query_embedding, table, top_k, threshold):
|
||||
response = self.db.rpc(
|
||||
|
@ -47,9 +47,6 @@ async def process_file(
|
||||
)
|
||||
logger.debug(f"Brain vector created: {result}")
|
||||
|
||||
result_set_file_sha = database.set_file_sha_from_metadata(metadata["file_sha1"])
|
||||
logger.debug(f"File sha1 {metadata['file_sha1']} updated: {result_set_file_sha}")
|
||||
|
||||
if created_vector:
|
||||
return len(created_vector)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user