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:
Stan Girard 2023-12-14 10:31:34 +01:00 committed by GitHub
parent 0cc917ea9e
commit 1ffe25eae4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 14 deletions

View File

@ -29,17 +29,6 @@ class Vector(Repository):
return response 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 # TODO: remove duplicate similarity_search in supabase vector store
def similarity_search(self, query_embedding, table, top_k, threshold): def similarity_search(self, query_embedding, table, top_k, threshold):
response = self.db.rpc( response = self.db.rpc(

View File

@ -47,9 +47,6 @@ async def process_file(
) )
logger.debug(f"Brain vector created: {result}") 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: if created_vector:
return len(created_vector) return len(created_vector)
else: else: