Question Answering
Question answering with tool integration on Subnet 20.
POSTv1/20/qna
Ask a question
Generate comprehensive answers using AI models with tool integration.
Required attributes
- Name
messages
- Type
- array
- Description
Array of message objects with role (user, assistant, or system) and content.
- Name
tools
- Type
- array
- Description
Array of tool objects with name, description, and argument schema.
This endpoint is authenticated. Get your API key
Request
POST
v1/20/qnacurl -X POST https://api.bitmind.ai/oracle/v1/20/qna \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"messages": [
{
"role": "user",
"content": "Need help calculating the tip, what is 10% tip on a bill totalling $100"
}
],
"tools": [
{
"name": "tip_calculator",
"description": "Calculate the tip amount",
"arguments": {
"bill_amount": {
"required": true,
"type": "number",
"description": "the bill amount in dollars"
},
"tip_percent": {
"required": true,
"type": "number",
"description": "the tip percentage as a whole number"
}
}
}
]
}'
Response
[
{
"role": "tool call",
"content": "{\"name\": \"tip_calculator\", \"arguments\": {\"bill_amount\": 100, \"tip_percent\": 10}}"
},
{
"role": "assistant",
"content": "Using a 10% tip rate on a $100 bill results in a tip of $10."
}
]
The question answering model
The question answering model contains the tool call and assistant response.
Properties
- Name
role
- Type
- string
- Description
The role of the message sender.
- Name
content
- Type
- string
- Description
The content of the message.