Knowledge core CLI (#368)

This commit is contained in:
cybermaggedon 2025-05-07 00:20:59 +01:00 committed by GitHub
parent 807c19fd22
commit 8080b54328
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 330 additions and 0 deletions

39
test-api/test-knowledge-delete Executable file
View file

@ -0,0 +1,39 @@
#!/usr/bin/env python3
import requests
import json
import sys
import base64
import time
url = "http://localhost:8088/api/v1/"
############################################################################
input = {
"operation": "delete-kg-core",
"id": "https://trustgraph.ai/doc/intelligence-and-state",
"user": "trustgraph",
}
resp = requests.post(
f"{url}knowledge",
json=input,
)
print(resp.text)
resp = resp.json()
print(resp)
if "error" in resp:
print(f"Error: {resp['error']}")
sys.exit(1)
# print(resp["response"])
print(resp)
sys.exit(0)
############################################################################