From c1452c92675efeb80dfa15e48b1110eb86eea3b4 Mon Sep 17 00:00:00 2001 From: Uche Ogbuji Date: Wed, 19 Jul 2023 14:54:46 -0600 Subject: [PATCH] [#16] Fix linter errors --- demo/chat_pdf_streamlit_ui.py | 1 - pylib/embedding_helper.py | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/demo/chat_pdf_streamlit_ui.py b/demo/chat_pdf_streamlit_ui.py index 3eeb4be..65368c4 100644 --- a/demo/chat_pdf_streamlit_ui.py +++ b/demo/chat_pdf_streamlit_ui.py @@ -41,7 +41,6 @@ from ogbujipt.config import openai_emulation, openai_live, HOST_DEFAULT from ogbujipt.prompting import format, CHATGPT_DELIMITERS from ogbujipt import oapi_choice1_text -from ogbujipt.async_helper import schedule_openai_call, openai_api_surrogate from ogbujipt.text_helper import text_splitter from ogbujipt.embedding_helper import qdrant_collection diff --git a/pylib/embedding_helper.py b/pylib/embedding_helper.py index 54ad1dd..de5cb3a 100644 --- a/pylib/embedding_helper.py +++ b/pylib/embedding_helper.py @@ -129,7 +129,8 @@ def update(self, texts, metas=None): metas = [{}]*(len(texts)) else: if len(texts) > len(metas): - warnings.warn(f'More texts ({len(texts)} provided than metadata {len(metas)}). Extra metadata items will be ignored.') + warnings.warn(f'More texts ({len(texts)} provided than metadata {len(metas)}).' + 'Extra metadata items will be ignored.') metas = itertools.chain(metas, [{}]*(len(texts)-len(metas))) elif len(metas) > len(texts): warnings.warn(f'Fewer texts ({len(texts)} provided than metadata {len(metas)}). '