curl --request POST \
--url https://application_id.applications.lucidworks.com/ai/prompt/passthrough/{MODEL_ID} \
--header 'Content-Type: application/json' \
--data '{
"batch": [
{
"text": "[{\\\"role\\\": \\\"system\\\", \\\"content\\\": \\\"You are a helpful utility program instructed to accomplish a product classififcation task. Please, classify the provided product name into one of the following categories:\\\\nGROCERIES, FURNITURE, UNKNOWN\\\"}, {\\\"role\\\": \\\"user\\\", \\\"content\\\": \\\"chocolate milk\\\"}, {\\\"role\\\": \\\"assistant\\\", \\\"content\\\": \\\"GROCERIES\\\"}, {\\\"role\\\": \\\"user\\\", \\\"content\\\": \\\"chocolate table\\\"}, {\\\"role\\\": \\\"assistant\\\", \\\"content\\\": \\\"FURNITURE\\\"}, {\\\"role\\\": \\\"user\\\", \\\"content\\\": \\\"stone baked pizza\\\"}]"
}
],
"useCaseConfig": {
"useSystemPrompt": true,
"dataType": "json_prompt"
},
"modelConfig": {
"temperature": 0.8,
"topP": 1,
"topK": -1,
"presencePenalty": 2,
"frequencyPenalty": 1,
"maxTokens": 1,
"apiKey": "API key specific to the model",
"azureDeployment": "DEPLOYMENT_NAME",
"azureEndpoint": "https://azure.endpoint.com",
"googleProjectId": "[GOOGLE_PROJECT_ID]",
"googleRegion": "[GOOGLE_PROJECT_REGION_OF_MODEL_ACCESS]"
}
}'
{
"tokensUsed": {
"promptTokens": 148,
"completionTokens": 27,
"totalTokens": 175
},
"prompt": "<|begin_of_text|><|start_header_id|>system<|end_header_id|>\\n\\nYou are a helpful utility program instructed to accomplish a product classififcation task. Please, classify the provided product name into one of the following categories:\\nGROCERIES, FURNITURE, UNKNOWN<|eot_id|><|start_header_id|>user<|end_header_id|>\\n\\nchocolate milk<|eot_id|><|start_header_id|>assistant<|end_header_id|>\\n\\nGROCERIES<|eot_id|><|start_header_id|>user<|end_header_id|>\\n\\nchocolate table<|eot_id|><|start_header_id|>assistant<|end_header_id|>\\n\\nFURNITURE<|eot_id|><|start_header_id|>user<|end_header_id|>\\n\\nstone baked pizza<|eot_id|><|start_header_id|>assistant<|end_header_id|>\\n\\n"
}
The prompt request for the passthrough use case and specified generative AI (GenAI) modelId
(model name) sends text to return results in formats supported by generative AI (GenAI) models.
curl --request POST \
--url https://application_id.applications.lucidworks.com/ai/prompt/passthrough/{MODEL_ID} \
--header 'Content-Type: application/json' \
--data '{
"batch": [
{
"text": "[{\\\"role\\\": \\\"system\\\", \\\"content\\\": \\\"You are a helpful utility program instructed to accomplish a product classififcation task. Please, classify the provided product name into one of the following categories:\\\\nGROCERIES, FURNITURE, UNKNOWN\\\"}, {\\\"role\\\": \\\"user\\\", \\\"content\\\": \\\"chocolate milk\\\"}, {\\\"role\\\": \\\"assistant\\\", \\\"content\\\": \\\"GROCERIES\\\"}, {\\\"role\\\": \\\"user\\\", \\\"content\\\": \\\"chocolate table\\\"}, {\\\"role\\\": \\\"assistant\\\", \\\"content\\\": \\\"FURNITURE\\\"}, {\\\"role\\\": \\\"user\\\", \\\"content\\\": \\\"stone baked pizza\\\"}]"
}
],
"useCaseConfig": {
"useSystemPrompt": true,
"dataType": "json_prompt"
},
"modelConfig": {
"temperature": 0.8,
"topP": 1,
"topK": -1,
"presencePenalty": 2,
"frequencyPenalty": 1,
"maxTokens": 1,
"apiKey": "API key specific to the model",
"azureDeployment": "DEPLOYMENT_NAME",
"azureEndpoint": "https://azure.endpoint.com",
"googleProjectId": "[GOOGLE_PROJECT_ID]",
"googleRegion": "[GOOGLE_PROJECT_REGION_OF_MODEL_ACCESS]"
}
}'
{
"tokensUsed": {
"promptTokens": 148,
"completionTokens": 27,
"totalTokens": 175
},
"prompt": "<|begin_of_text|><|start_header_id|>system<|end_header_id|>\\n\\nYou are a helpful utility program instructed to accomplish a product classififcation task. Please, classify the provided product name into one of the following categories:\\nGROCERIES, FURNITURE, UNKNOWN<|eot_id|><|start_header_id|>user<|end_header_id|>\\n\\nchocolate milk<|eot_id|><|start_header_id|>assistant<|end_header_id|>\\n\\nGROCERIES<|eot_id|><|start_header_id|>user<|end_header_id|>\\n\\nchocolate table<|eot_id|><|start_header_id|>assistant<|end_header_id|>\\n\\nFURNITURE<|eot_id|><|start_header_id|>user<|end_header_id|>\\n\\nstone baked pizza<|eot_id|><|start_header_id|>assistant<|end_header_id|>\\n\\n"
}
The authentication and authorization access token.
application/json
"application/json"
The generative AI (GenAI) model name.
"llama-3-8b-instruct"
OK
Was this page helpful?