Skip to content

Commit d89e37c

Browse files
cnJasonZzc277584121
authored andcommitted
fix: restore basic_example.py
1 parent 5ab7ad8 commit d89e37c

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

examples/basic_example.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import logging
22
import os
3-
import glob
43

54
from deepsearcher.offline_loading import load_from_local_files
65
from deepsearcher.online_query import query
@@ -12,8 +11,6 @@
1211
current_dir = os.path.dirname(os.path.abspath(__file__))
1312

1413
config = Configuration() # Customize your config here
15-
config.set_provider_config("llm", "JiekouAI", {"model": "claude-sonnet-4-5-20250929"})
16-
config.set_provider_config("embedding", "JiekouAIEmbedding", {"model": "qwen/qwen3-embedding-8b"})
1714
init_config(config=config)
1815

1916

@@ -26,15 +23,13 @@
2623

2724
# Hint: You can also load a single file, please execute it in the root directory of the deep searcher project
2825
load_from_local_files(
29-
paths_or_directory='/Users/jason/Documents/work/PPLabs/Platform/deep-searcher/examples/data/car_company_data.pdf',
30-
collection_name="car_company_data",
31-
collection_description="car_company_data",
32-
force_new_collection=True, # If you want to drop origin collection and create a new collection every time, set force_new_collection to True
26+
paths_or_directory=os.path.join(current_dir, "data/WhatisMilvus.pdf"),
27+
collection_name="milvus_docs",
28+
collection_description="All Milvus Documents",
29+
# force_new_collection=True, # If you want to drop origin collection and create a new collection every time, set force_new_collection to True
3330
)
3431

35-
question = """请从财务和宏观经济角度,对 A 股新能源汽车行业以及行业内 TOP5 车企的发展进行分析。在财务分析部分,需涵盖基本的财务关键指标。
36-
在宏观经济分析部分,考虑宏观经济指标对行业的影响,对 A 股新能源汽车行业整体发展趋势进行总结,并基于财务和宏观经济分析,对 TOP5 新能源车企的未来发展潜力和竞争态势做出比较和预测,指出各车企的优势与挑战。请以专业、严谨的语言,结合具体数据进行分析阐述。
37-
"""
32+
question = "Write a report comparing Milvus with other vector databases."
3833

3934
_, _, consumed_token = query(question, max_iter=1)
4035
print(f"Consumed tokens: {consumed_token}")

0 commit comments

Comments
 (0)