import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: 'My API Key',
});
const rerankingResponse = await client.models.rerankings.create('model_deployment_id', {
chunks: ['string'],
query: 'query',
});
console.log(rerankingResponse.chunk_scores);
{
"chunk_scores": [
123
],
"tokens_used": 0
}
TODO: Documentation
import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: 'My API Key',
});
const rerankingResponse = await client.models.rerankings.create('model_deployment_id', {
chunks: ['string'],
query: 'query',
});
console.log(rerankingResponse.chunk_scores);
{
"chunk_scores": [
123
],
"tokens_used": 0
}
Successful Response
The response is of type object
.