import PiClient from 'withpi';
const client = new PiClient({
apiKey: 'My API Key',
});
const scoringSystemMetrics = await client.scoringSystem.score({
llm_input: 'Tell me something different',
llm_output: 'The lazy dog was jumped over by the quick brown fox',
scoring_spec: [{ question: 'Is this response truthful?' }, { question: 'Is this response relevant?' }],
});
console.log(scoringSystemMetrics.total_score);