Get prediction results
import requests
url = "https://application_id.applications.lucidworks.com/ai/async-prediction/{PREDICTION_ID}"
response = requests.get(url)
print(response.text){
"predictionId": "b3d4a6f1-8e2c-4a0f-9c73-123456789abc",
"status": "READY",
"predictions": [
{
"tokensUsed": {
"promptTokens": 51,
"completionTokens": 4,
"totalTokens": 55
},
"response": {
"faqPairs": [
{
"question": "What types of accounts are available for travelers looking to manage their finances?",
"answer": "Travelers can choose from various account types such as debit accounts, credit accounts, and travel-specific credit cards, including airline-branded cards that offer travel rewards."
},
{
"question": "What are the eligibility requirements for obtaining a travel-specific credit card?",
"answer": "Eligibility for travel-specific credit cards typically requires a good credit score and a stable income. Specific requirements may vary by issuer."
}
]
}
}
]
}Get prediction results
Fetch the results of a prediction task by its ID.
GET
/
ai
/
async-prediction
/
{PREDICTION_ID}
Get prediction results
import requests
url = "https://application_id.applications.lucidworks.com/ai/async-prediction/{PREDICTION_ID}"
response = requests.get(url)
print(response.text){
"predictionId": "b3d4a6f1-8e2c-4a0f-9c73-123456789abc",
"status": "READY",
"predictions": [
{
"tokensUsed": {
"promptTokens": 51,
"completionTokens": 4,
"totalTokens": 55
},
"response": {
"faqPairs": [
{
"question": "What types of accounts are available for travelers looking to manage their finances?",
"answer": "Travelers can choose from various account types such as debit accounts, credit accounts, and travel-specific credit cards, including airline-branded cards that offer travel rewards."
},
{
"question": "What are the eligibility requirements for obtaining a travel-specific credit card?",
"answer": "Eligibility for travel-specific credit cards typically requires a good credit score and a stable income. Specific requirements may vary by issuer."
}
]
}
}
]
}Was this page helpful?
⌘I