mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-17 17:21:02 +02:00
Load
This commit is contained in:
parent
31a171833b
commit
9fa67b5db7
17 changed files with 638 additions and 456 deletions
28
test-api/test-agent2-api
Executable file
28
test-api/test-agent2-api
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import requests
|
||||
import json
|
||||
import sys
|
||||
|
||||
url = "http://localhost:8088/api/v1/"
|
||||
|
||||
############################################################################
|
||||
|
||||
input = {
|
||||
"question": "What is 14 plus 12. Justify your answer.",
|
||||
}
|
||||
|
||||
resp = requests.post(
|
||||
f"{url}agent",
|
||||
json=input,
|
||||
)
|
||||
|
||||
resp = resp.json()
|
||||
|
||||
if "error" in resp:
|
||||
print(f"Error: {resp['error']}")
|
||||
sys.exit(1)
|
||||
|
||||
print(resp["answer"])
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue