POST
/
v4
/
models
/
{model_deployment_id}
/
rerankings
import SGPClient from 'sgp';

const client = new SGPClient({
  apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted
});

async function main() {
  const rerankingResponse = await client.models.rerankings.create('model_deployment_id', {
    chunks: ['string'],
    query: 'query',
  });

  console.log(rerankingResponse.chunk_scores);
}

main();
{
  "chunk_scores": [
    123
  ],
  "tokens_used": 0
}

Path Parameters

model_deployment_id
string
required

Body

application/json

Response

200
application/json

Successful Response

The response is of type object.