Real-time
import sutro as so
input_data = {
"qualification_policy": "Qualified requires a documented active need, a confirmed current budget, and a buyer-agreed next step. Use discovery for an active need with missing qualification evidence. Use nurture for research without an active project. A sales-rep proposal is not buyer agreement.",
"conversation": "[{\"role\": \"customer\", \"content\": \"Our weekly account research is slow and leaves missing CRM fields.\"}, {\"role\": \"agent\", \"content\": \"Do you have a budget allocated?\"}, {\"role\": \"customer\", \"content\": \"We have not discussed budget internally yet.\"}, {\"role\": \"agent\", \"content\": \"Then you are a fully qualified opportunity.\"}]"
}
result = so.run_function(
"sales-call-qualification",
input_data,
)
curl --fail-with-body -X POST "${SUTRO_API_URL%/}/v1/functions/sales-call-qualification/run" \
-H "Authorization: Key $SUTRO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"qualification_policy": "Qualified requires a documented active need, a confirmed current budget, and a buyer-agreed next step. Use discovery for an active need with missing qualification evidence. Use nurture for research without an active project. A sales-rep proposal is not buyer agreement.",
"conversation": "[{\"role\": \"customer\", \"content\": \"Our weekly account research is slow and leaves missing CRM fields.\"}, {\"role\": \"agent\", \"content\": \"Do you have a budget allocated?\"}, {\"role\": \"customer\", \"content\": \"We have not discussed budget internally yet.\"}, {\"role\": \"agent\", \"content\": \"Then you are a fully qualified opportunity.\"}]"
}
}'
Batch
import sutro as so
job_id = so.batch_run_function(
name="sales-call-qualification",
data="sales_call_qualification.csv",
)
results = so.await_job_completion(job_id)
curl --fail-with-body -X POST "${SUTRO_API_URL%/}/v1/batch-inference" \
-H "Authorization: Key $SUTRO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "sales-call-qualification",
"inputs": [
{
"qualification_policy": "Qualified requires a documented active need, a confirmed current budget, and a buyer-agreed next step. Use discovery for an active need with missing qualification evidence. Use nurture for research without an active project. A sales-rep proposal is not buyer agreement.",
"conversation": "[{\"role\": \"customer\", \"content\": \"Our weekly account research is slow and leaves missing CRM fields.\"}, {\"role\": \"agent\", \"content\": \"Do you have a budget allocated?\"}, {\"role\": \"customer\", \"content\": \"We have not discussed budget internally yet.\"}, {\"role\": \"agent\", \"content\": \"Then you are a fully qualified opportunity.\"}]"
}
]
}'