Restful APIs
API Endpoint
Version: 1.0
Endpoint: https://api.flexstack.ai/validator/v1
Request Parameters
JSON Body
Key
Type
Description
prompts
List[string]
A list of strings, where each string is a question or prompt for the AI to validate. Example: ["What is the capital of France?", "Write a short story about bitcoin", "Result of this math question: 2 + 2 = ?"]
responses
List[string]
A list of strings corresponding to the AI-generated answers to the prompts. Example: ["Paris", "A story about bitcoin ...", "2 + 2 = 4"]
ground_truths
List[string]
A list of strings that represent the correct or expected answers to the prompts. Example: ["The capital of France is Paris.", "A short story about bitcoin describes...", "2 + 2 = 4"]
Usage
cURL
curl -X POST 'https://api.flexstack.ai/validator/v1/llm' \
-H 'Content-Type: application/json' \
-d '{
"prompts": ["What is the capital of France?", "Write a short story about bitcoin", "Result of this math question: 2 + 2 = ?"],
"responses": ["Paris", "A story about bitcoin ...", "2 + 2 = 4"],
"ground_truths": ["The capital of France is Paris.", "A short story about bitcoin describes...", "2 + 2 = 4"]
}'Python (requests)
Examples
Response
Last updated
Was this helpful?