Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

Commit

Permalink
update readme, add todo to document_reading module
Browse files Browse the repository at this point in the history
  • Loading branch information
SeeknnDestroy committed Oct 16, 2023
1 parent 9e47f6c commit a41a629
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ Create robust query engine pipelines with automatic cost logging. Supports fine-
```python
from autollm import AutoQueryEngine

# Initialize a query engine with existing vector store and service context
vector_store = AutoVectorStore.from_defaults(
# Initialize a query engine with existing vector store index and service context
vector_store_index = AutoVectorStoreIndex.from_defaults(
vector_store_type="VectorStoreIndex", documents=documents
)
service_context = AutoServiceContext.from_defaults(enable_cost_calculator=True)
Expand Down Expand Up @@ -136,15 +136,20 @@ query_engine = AutoQueryEngine.from_parameters(
query_wrapper_prompt="Your Query Wrapper Prompt",
enable_cost_calculator=True,
llm_params={"model": "gpt-3.5-turbo"},
vector_store_params={"vector_store_type": "qdrant", "index_name": "quickstart"},
vector_store_params={"vector_store_type": "QdrantVectorStore", "client": qdrant_client.QdrantClient(
url="http://<host>:<port>"
api_key="<qdrant-api-key>",
), "collection_name": "quickstart"},
service_context_params={"chunk_size": 1024},
query_engine_params={"similarity_top_k": 10},
)

response = query_engine.query("Why is SafeVideo AI awesome?")

print(response.response)
```

```
>> Because they redefine the movie experience by AI!
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
logger = logging.getLogger(__name__)


def process_and_get_documents(
# TODO: add all files supports beside md, use SimpleDirReader
def read_files_as_documents(
path_or_files: Union[Path, List[Path]],
read_as_single_doc: bool = False,
extra_info: Optional[Dict] = None) -> List[Document]:
Expand Down

0 comments on commit a41a629

Please sign in to comment.