我在实施具有可组合性的矢量商店时遇到问题
from llama_index.composability import ComposableGraph
index1 = GPTQdrantIndex(doc1, client=qdrant_client,collection_name="index1")
index1.set_text("S3document1")
index2 = GPTQdrantIndex(doc2, client=qdrant_client,collection_name="index2")
index2.set_text("S3document2")
# save index to disk
index1.save_to_disk('index_Qdrant1.json')
index2.save_to_disk('index_Qdrant2.json')
list_index2 = GPTListIndex([index1, index2]);
graph = ComposableGraph.build_from_index(list_index2)
graph.save_to_disk("save_path2.json")
graph = ComposableGraph.load_from_disk("save_path2.json")
query_configs = [
{
"index_struct_type": "qdrant",
"query_mode": "default"
},
{
"index_struct_type": "keyword_table",
"query_mode": "simple",
"query_kwargs": {}
},
]
response = graph.query("Who is this", query_configs=query_configs);
print(response)
我也尝试过将 ComposableGraph 与其他 Vector Stores 一起使用,但没有成功