Skip to main content
POST
/
api
/
v1
/
llm
/
feedback
/
completions
/
batch
Typescript (SDK)
import { SDK } from "@meetkai/mka1";

const sdk = new SDK({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await sdk.llm.feedback.batchGetCompletionFeedback({
    batchGetFeedbackRequest: {
      ids: [
        "chatcmpl-abc123def456",
        "chatcmpl-missing123",
      ],
    },
  });

  console.log(result);
}

run();
{
  "results": [
    {
      "id": "chatcmpl-abc123def456",
      "rating": "thumbs_up",
      "description": "The response was accurate and helpful.",
      "createdAt": "2024-01-15T10:30:00Z",
      "updatedAt": "2024-01-15T10:30:00Z"
    },
    {
      "id": "chatcmpl-missing123",
      "error": "not_found"
    }
  ]
}

Authorizations

Authorization
string
header
required

Authenticate with your MKA1 API key at the API gateway: Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, also send X-On-Behalf-Of to identify the end user making the request.

Headers

X-On-Behalf-Of
string

Optional external user identifier for multi-user server-side integrations. Use this when acting on behalf of one of your end users.

Body

application/json

Request parameters for batch retrieving feedback by multiple request IDs.

ids
string[]
required

Array of request IDs (chatcmpl-xxx or resp-xxx) to retrieve feedback for

Required array length: 1 - 100 elements

Response

200 - application/json

OK

Response containing batch feedback results. Each result is either the feedback data or a not_found error.

results
object[]
required

Array of feedback results in the same order as the input IDs

Error result when the completion/response ID doesn't exist