From dd7edaed76ce8d94fa774dded9d2c200feda58c4 Mon Sep 17 00:00:00 2001 From: sad-zero Date: Mon, 20 May 2024 13:55:07 +0900 Subject: [PATCH] fix: dependencies --- chat.py | 2 +- etl.py | 5 +---- pyproject.toml | 2 +- requirements.txt | 3 ++- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/chat.py b/chat.py index 4b2e59e..30c4f1e 100644 --- a/chat.py +++ b/chat.py @@ -14,7 +14,7 @@ if __name__ == "__main__": embeddings = OllamaEmbeddings(model="all-minilm") - client = PersistentClient(path="./resources/vector_store.chroma", settings=Settings(anonymized_telemetry=False)) + client = PersistentClient(path="resources/chroma_db", settings=Settings(anonymized_telemetry=False)) collection = client.get_collection("books") model = ChatOllama(model="phi3") diff --git a/etl.py b/etl.py index 001aaa1..20104eb 100644 --- a/etl.py +++ b/etl.py @@ -2,7 +2,6 @@ ETL Pipeline """ -# TODO: ETL Pipeline 완성 import logging from chromadb import PersistentClient from chromadb.config import Settings @@ -13,9 +12,7 @@ from langchain_community.embeddings.ollama import OllamaEmbeddings -def get_vector_store( - coll_name: str = "books", persistent_path: str = "/Users/dev/Documents/simple-chatboot/resources/chroma_db" -) -> Chroma: +def get_vector_store(coll_name: str = "books", persistent_path: str = "resources/chroma_db") -> Chroma: embeddings = OllamaEmbeddings(model="all-minilm") store = InMemoryByteStore() embeddings_func = CacheBackedEmbeddings.from_bytes_store( diff --git a/pyproject.toml b/pyproject.toml index 6c682b7..8afc2db 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ dynamic = ["dependencies"] name = "simple_chatbot" authors = [{name = "sad-zero", email = "zeroro.yun@gmail.com"}] -version = "1.0.0" +version = "1.0.1" readme = "README.md" license = {file = "LICENSE"} diff --git a/requirements.txt b/requirements.txt index 8eccbb6..25d670c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ pypdf chromadb langchain -langchain-chroma \ No newline at end of file +langchain-chroma +langchain-community \ No newline at end of file