You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
886 B
28 lines
886 B
from deepsearcher.configuration import Configuration, init_config
|
|
from deepsearcher.offline_loading import load_from_local_files
|
|
from deepsearcher.online_query import query
|
|
|
|
|
|
config = Configuration()
|
|
|
|
# Customize your config here,
|
|
# more configuration see the Configuration Details section below.
|
|
config.load_config_from_yaml("deepsearcher/config.yaml")
|
|
|
|
init_config(config = config)
|
|
|
|
# Load your local data
|
|
load_from_local_files(
|
|
paths_or_directory="docs",
|
|
collection_name="default",
|
|
collection_description="a general collection for all documents",
|
|
force_rebuild=True, batch_size=16
|
|
)
|
|
|
|
|
|
# (Optional) Load from web crawling (`FIRECRAWL_API_KEY` env variable required)
|
|
# from deepsearcher.offline_loading import load_from_website
|
|
# load_from_website(urls=website_url)
|
|
|
|
# Query
|
|
result = query("Write a comprehensive report about Milvus.", max_iter=1) # Your question here
|
|
|