From fed556a07610d8016423fecf060420a66421b023 Mon Sep 17 00:00:00 2001 From: github-actions <${GITHUB_ACTOR}@users.noreply.github.com> Date: Sun, 5 Feb 2023 20:01:44 +0000 Subject: [PATCH] Format Python code with psf/black push --- models/index_model.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/models/index_model.py b/models/index_model.py index 3dc5516..f70a672 100644 --- a/models/index_model.py +++ b/models/index_model.py @@ -149,7 +149,8 @@ class Index_handler: def index_youtube_transcript(self, link, embed_model): documents = YoutubeTranscriptReader().load_data(ytlinks=[link]) index = GPTSimpleVectorIndex( - documents, embed_model=embed_model, + documents, + embed_model=embed_model, ) return index @@ -162,7 +163,8 @@ class Index_handler: def index_discord(self, document, embed_model) -> GPTSimpleVectorIndex: index = GPTSimpleVectorIndex( - document, embed_model=embed_model, + document, + embed_model=embed_model, ) return index @@ -219,7 +221,9 @@ class Index_handler: index = await self.loop.run_in_executor( None, partial(self.index_file, temp_path, embedding_model) ) - await self.usage_service.update_usage(embedding_model.last_token_usage) + await self.usage_service.update_usage( + embedding_model.last_token_usage + ) file_name = file.filename self.index_storage[ctx.user.id].add_index(index, ctx.user.id, file_name)