Skip to content

Commit

Permalink
add chat_model test script
Browse files Browse the repository at this point in the history
  • Loading branch information
MAfarrag committed Sep 24, 2024
1 parent b235cd8 commit ae2ef97
Show file tree
Hide file tree
Showing 5 changed files with 1,103 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ packages = [
{ include = "voice_for_nature_backend", from = "src"}
]

include = [
"data/*",
]

[tool.poetry.urls]

[tool.poetry.dependencies]
Expand Down
11 changes: 11 additions & 0 deletions src/voice_for_nature_backend/chat_model.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from typing import List
from llama_index.core import SimpleDirectoryReader
from llama_index.core.schema import Document
from . import __path__


def get_data(rdir: str = None) -> List[Document]:
if rdir is None:
rdir = f"{__path__[0]}/data"
documents = SimpleDirectoryReader(rdir).load_data()
return documents
Loading

0 comments on commit ae2ef97

Please sign in to comment.