from openapi import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.search.graphrag.query_graph_rag_store(store_name="<value>", x_api_key_id="<id>", x_user_id="<id>", x_exchange_jwt_external_user_id="<id>", query="Who owns the company that won the Northern Bridge Sensors contract?", mode="graph", limit=5, seed_k=8)
# Handle response
print(res){
"diagnostics": {
"expanded_entities": [
"Rivera Logistics",
"Atlas Infrastructure Group"
],
"query_entities": [
"Northern Bridge Sensors"
],
"seed_entities": [
"Rivera Logistics"
],
"traversed_edges": [
"Atlas Infrastructure Group -[owns]-> Rivera Logistics"
]
},
"mode": "graph",
"results": [
{
"chunk_id": "doc_001::chunk_0",
"document_id": "doc_001",
"entities": [
"Atlas Infrastructure Group",
"Rivera Logistics"
],
"metadata": {
"source": "benchmark"
},
"score": 0.81,
"score_breakdown": {
"final_score": 0.81,
"graph_score": 1,
"keyword_score": 0.3,
"semantic_score": 0.72
},
"text": "Atlas Infrastructure Group owns Rivera Logistics."
}
],
"search_time_ms": 18
}from openapi import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.search.graphrag.query_graph_rag_store(store_name="<value>", x_api_key_id="<id>", x_user_id="<id>", x_exchange_jwt_external_user_id="<id>", query="Who owns the company that won the Northern Bridge Sensors contract?", mode="graph", limit=5, seed_k=8)
# Handle response
print(res){
"diagnostics": {
"expanded_entities": [
"Rivera Logistics",
"Atlas Infrastructure Group"
],
"query_entities": [
"Northern Bridge Sensors"
],
"seed_entities": [
"Rivera Logistics"
],
"traversed_edges": [
"Atlas Infrastructure Group -[owns]-> Rivera Logistics"
]
},
"mode": "graph",
"results": [
{
"chunk_id": "doc_001::chunk_0",
"document_id": "doc_001",
"entities": [
"Atlas Infrastructure Group",
"Rivera Logistics"
],
"metadata": {
"source": "benchmark"
},
"score": 0.81,
"score_breakdown": {
"final_score": 0.81,
"graph_score": 1,
"keyword_score": 0.3,
"semantic_score": 0.72
},
"text": "Atlas Infrastructure Group owns Rivera Logistics."
}
],
"search_time_ms": 18
}Gateway auth: send Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, you can also send X-On-Behalf-Of: <external-user-id>.
¿Esta página le ayudó?