trustgraph/test-api/test-embeddings-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

27 lines
516 B
Python
Executable file

#!/usr/bin/env python3
import requests
import json
import sys
url = "http://localhost:8088/api/v1/flow/0000/embeddings"
############################################################################
input = {
"text": "What is the highest risk aspect of running a space shuttle program? Provide 5 detailed reasons to justify our answer.",
}
resp = requests.post(
url,
json=input,
)
resp = resp.json()
if "error" in resp:
print(f"Error: {resp['error']}")
sys.exit(1)
print(resp["vectors"])