Solar Jev is in beta. The /v1/systemone schema may change before general availability.
Send a state along with one or more typed questions, and Solar Jev returns a decision for each. Because the model writes no prose, every question is answered in a single forward pass and output tokens are not billed.
# pip install requestsimport requestsresponse = requests.post( "https://api.upstage.ai/v1/systemone", headers={"Authorization": "Bearer UPSTAGE_API_KEY"}, json={ "model": "solar-jev", "state": ( "Customer ticket #4821: My package never arrived and I want my money back. " "I have been waiting three weeks and nobody has replied to my emails." ), "questions": { "intent": { "type": "choice", "instructions": "Classify what the customer is asking for.", "criteria": { "refund": "The customer wants money back.", "track": "The customer wants the delivery status of an order.", "other": "Anything else.", }, }, "urgency": { "type": "score", "instructions": "Rate how urgently this ticket needs a reply.", "criteria": [ "No action needed", "Can wait a week", "Needs attention today", "Escalate immediately", ], }, "is_angry": { "type": "noul", "instructions": "Is the customer angry?", }, }, },)answers = response.json()["answers"]print(answers["intent"]["choice"], answers["intent"]["confidence"])print(answers["urgency"]["score"])print(answers["is_angry"]["noul"])
The name of the model used to make the decisions. Currently, the only available model is 'solar-jev'.
Value in: "solar-jev"
state
Required
unknown
The context the questions are answered against. Pass a string, or any JSON value that is serialized into the prompt. With a 512K context window, an entire document can serve as the state.
questions
Required
object
The questions to answer, keyed by a name you choose. The same names are used as the keys of the 'answers' object in the response. At least one question is required.