trustgraph/test-api/test-graph-rag-api
cybermaggedon 450f664b1b
Feature/flow enable api gateway (#356)
* Tweak timeouts, reduce stop time for publishers / subscribers

* More APIs working as flow endpoint
2025-04-29 23:34:41 +01:00

31 lines
517 B
Python
Executable file

#!/usr/bin/env python3
import requests
import json
import sys
url = "http://localhost:8088/api/v1/flow/0000/graph-rag"
############################################################################
input = {
"query": "Give me 10 facts",
}
resp = requests.post(
url,
json=input,
)
resp = resp.json()
print(resp)
if "error" in resp:
print(f"Error: {resp['error']}")
sys.exit(1)
print(resp["response"])
sys.exit(0)
############################################################################