Skip to content

ClassifyTextRequestBody

Request parameters for text classification. The model will analyze the text and assign it to one of the provided labels.

Example Usage

typescript
import { ClassifyTextRequestBody } from "@meetkai/mka1/models/operations";

let value: ClassifyTextRequestBody = {
  model: "Corvette",
  text: "<value>",
  labels: [
    "<value 1>",
    "<value 2>",
    "<value 3>",
  ],
};

Fields

FieldTypeRequiredDescription
modelstring✔️ID of the model to use for classification. You can use provider:model format (e.g., 'openai:gpt-4') or just the model name with a default provider.
textstring✔️The text content to classify. Must not be empty.
labelsstring[]✔️Array of possible classification labels. Must contain at least 2 labels. The model will choose one of these labels to assign to the text.
promptstringOptional custom system prompt to guide the classification. Use this to provide additional context or instructions to the model about how to perform the classification.