mjpsm's picture
Remove success_evidence from /generate request schema (not present in training data)
92d0dfa verified
Raw History Blame Contribute Delete
1.04 kB
import json
import os
import requests
BASE_URL = os.getenv(
"COMPOSITION_API_URL",
"http://localhost:7860",
).rstrip("/")
payload = {
"progression": {
"knowledge_state": "PARTIAL",
"demonstrated_state": [
"Created the initial animation and added the first set of assets"
],
"next_gap": "Finish and polish the remaining animation work",
"activity_plan": {
"action": "complete the remaining animation work",
"target": "the animation",
"avoid_repeating": [
"recreating the initial animation",
"re-adding assets already included",
],
},
}
}
print("HEALTH")
health = requests.get(
f"{BASE_URL}/health",
timeout=30,
)
print(health.status_code)
print(json.dumps(health.json(), indent=2))
print("\nGENERATE")
response = requests.post(
f"{BASE_URL}/generate",
json=payload,
timeout=180,
)
print(response.status_code)
print(json.dumps(response.json(), indent=2))