Skip to content

Commit

Permalink
Load knowledge
Browse files Browse the repository at this point in the history
  • Loading branch information
moria97 committed May 30, 2024
1 parent 9b4bcfa commit d08f79e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/core/test_rag_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def rag_app():
return rag_app


# Test load knowledge file
async def test_add_knowledge_file(rag_app: RagApplication):
data_dir = os.path.join(BASE_DIR, "tests/testdata/paul_graham")
print(len(rag_app.index.docstore.docs))
Expand All @@ -44,7 +45,7 @@ async def test_query(rag_app: RagApplication):
async def test_llm(rag_app: RagApplication):
query = RagQuery(question="What is the result of 15+22?")
response = await rag_app.aquery_llm(query)
assert "37" in len(response.answer)
assert "37" in response.answer


# Test retrieval query
Expand All @@ -58,4 +59,4 @@ async def test_retrieval(rag_app: RagApplication):
async def test_agent(rag_app: RagApplication):
query = RagQuery(question="What is the result of 15+22?")
response = await rag_app.aquery_agent(query)
assert "37" in len(response.answer)
assert "37" in response.answer

0 comments on commit d08f79e

Please sign in to comment.