Skip to content

Commit

Permalink
Fix ruff errors
Browse files Browse the repository at this point in the history
  • Loading branch information
brendancsmith committed Sep 2, 2024
1 parent 525b254 commit 7fe3f39
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions app/app.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import List, Sequence
from typing import List

import chainlit as cl
import chromadb
Expand Down Expand Up @@ -28,7 +28,7 @@ def create_store(*, embedding: Embeddings) -> VectorStore:
Returns:
VectorStore: vector store for RAG
"""

# Initialize Chromadb client to enable resetting and disable telemtry
client = chromadb.EphemeralClient()
client_settings = Settings(
Expand All @@ -38,7 +38,7 @@ def create_store(*, embedding: Embeddings) -> VectorStore:
allow_reset=True,
)



# Reset the search engine to ensure we don't use old copies.
# NOTE: we do not need this for production
Expand Down Expand Up @@ -203,7 +203,7 @@ async def on_message(message: cl.Message):

store = cl.user_session.get("store")
if not isinstance(store, VectorStore):
raise TypeError("Store in user session is not a VectorStore")
raise TypeError("Store in user session is not a VectorStore")
docs = store._collection.get() # type: ignore

metadatas = docs["metadatas"]
Expand Down
2 changes: 1 addition & 1 deletion app/document_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def process_file(self, *, file: AskFileResponse) -> List[Document]:
Returns:
List[Document]: chunked documents
"""

if file.type == "application/pdf":
loader = PDFPlumberLoader(file.name)
documents = loader.load()
Expand Down

0 comments on commit 7fe3f39

Please sign in to comment.