import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted
});
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: process.env['SGP_API_KEY'], // This is the default and can be omitted
});
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
}