state and define the questions to answer in questions.
Supported models
Question types
You can include several named questions in one request. Each answer appears under its question’s name in the response. Define narrow questions and use application logic to combine the results.
Send a decision request
Create a Baseten API key and set theBASETEN_API_KEY environment variable. This example routes a support request, checks whether the customer wants a refund, and scores urgency.
Send plain text in state.
- Python
- cURL
To evaluate the support request:Install the Baseten Performance Client:Save this example as Pass one request in a list and read its result from
decide.py and run python3 decide.py.decide.py
response.data[0].Output
answers object includes these typed values (other response fields are omitted):
Answers
score can fall between rubric levels. A noul value is a probability, so your application chooses the threshold for a yes/no decision.
See the System One reference for request fields and response shapes.
Usage
The response reports input tokens inusage.input_tokens and reports usage.output_tokens as 0.
See Model API usage to track requests and tokens.