Skip to content

Commit

Permalink
update retrieval interface and requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
yassinsws committed Feb 19, 2024
1 parent 6997315 commit 128ea40
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/data/lecture/lectures.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def batch_import(self, directory_path, subdirectory):
if not embeddings_created:
raise RuntimeError("Failed to create embeddings.")

def query_database(self, user_message: str, lecture_id: int = None):
def retrieve(self, user_message: str, lecture_id: int = None):
response = self.collection.query.near_text(
near_text=user_message,
filters=(
Expand Down
3 changes: 3 additions & 0 deletions app/data/repository/repositories.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ class Repositories:
def __init__(self, client: weaviate.WeaviateClient):
self.collection = init_schema(client)

def retrieve(self, question:str):
pass

def ingest(self, repositories: dict[str, str]):
pass

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ black==24.1.1
flake8==7.0.0
pre-commit==3.6.1
pydantic==2.6.1
unstructured[all-docs]
pymupdf==1.23.22
PyYAML~=6.0.1
unstructured==0.11.8
weaviate-client==4.4.4

0 comments on commit 128ea40

Please sign in to comment.