This repository has been archived by the owner on Sep 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2a69874
commit b5809de
Showing
5 changed files
with
16 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
from llama_index import Document | ||
from llama_index.query_engine import BaseQueryEngine | ||
|
||
from autollm.auto.query_engine import AutoQueryEngine | ||
|
||
|
||
def test_auto_query_engine(): | ||
documents = Document.example() | ||
documents = [Document.example()] | ||
vector_store_params = {"vector_store_type": "VectorStoreIndex", "documents": documents} | ||
query_engine = AutoQueryEngine.from_parameters(vector_store_params=vector_store_params) | ||
|
||
response = query_engine.query("What is the meaning of life?") | ||
|
||
# Check if the response is not None | ||
assert response.response is not None | ||
# Check if the query_engine is an instance of BaseQueryEngine | ||
assert isinstance(query_engine, BaseQueryEngine) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.