Put API tests in a subdir

This commit is contained in:
Cyber MacGeddon 2024-11-20 19:12:40 +00:00
parent 1c4ec3d361
commit 30dc2a66b8
8 changed files with 0 additions and 68 deletions

View file

@ -1,25 +0,0 @@
#!/usr/bin/env python3
import requests
import json
import sys
url = "http://localhost:8088/api/v1/"
############################################################################
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(
f"{url}embeddings",
json=input,
)
resp = resp.json()
if "error" in resp:
print(f"Error: {resp['error']}")
sys.exit(1)