POST
/
ai
/
prompt
/
passthrough
/
{MODEL_ID}
Passthrough prompt
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"
}

Headers

Authorization: Bearer ACCESS_TOKEN
string

The authentication and authorization access token.

Content-Type
string

application/json

Example:

"application/json"

Path Parameters

MODEL_ID
string
required

The generative AI (GenAI) model name.

Example:

"llama-3-8b-instruct"

Body

application/json
batch
object[]

The content sent in the request.

useCaseConfig
object

NOTE: If both useSystemPrompt and dataType are present, the value in dataType is used.

modelConfig
object

Provides fields and values that specify ranges for tokens. Fields used for specific use cases and models are specified. The default values are used if other values are not specified.

Response

200 - application/json

OK

tokensUsed
object
prompt
string

The Llama3 model response from the request, formatted for the model.

Example:

"<|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"