Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
The slug of the prompt
"qa"
The output of the prompt.
"Paris"
The name of the trace
"qa-chatbot"
The version of the prompt
"1.0.0"
The tag of the prompt
"production"
The input of the prompt.
"What is the capital of France?"
The ideal output of the prompt.
"Paris"
Variables used in the prompt.
[
{
"label": "question",
"value": "What is the capital of France?"
}
]
The start time of the prompt.
"2021-01-01T00:00:00Z"
The end time of the prompt.
"2021-01-01T00:00:00Z"
The number of input tokens. If not provided, it will be computed based on the input
100
The number of output tokens. If not provided, it will be computed based on the output
100
The cost of the prompt. If not provided, it will be computed based on the input and output tokens
100
The organization related to the prompt. Used to identify the organization of the user that triggered the prompt.
{ "id": "123", "name": "ACME" }
The user related to the prompt. Used to identify the user that triggered the prompt.
{ "id": "123", "name": "John Doe" }
Additional metadata to be associated with the prompt.
{ "sessionId": "456", "userType": "admin" }
Response
The id of the created trace and log
The ID of the trace
{ "id": "123" }
The ID of the log
{ "id": "123" }
The warning message
"No prompt found with the given slug or no production version found or no prompt found with the given version or tag (production version also missing)"