Represents the result returned after an inference request.
InferenceResult
const inferenceResult: InferenceResult = { text: 'The quick brown fox jumps over the lazy dog.', stats: { ingestionTime: 150, inferenceTime: 300, totalTime: 450, ingestionTimeSeconds: 0.15, inferenceTimeSeconds: 0.3, totalTimeSeconds: 0.45, totalTokens: 200, tokensPerSecond: 444 }, serverStats: { someServerKey: 'someServerValue' }, toolCalls: [{ id: '1', name: 'getWeather', arguments: { location: 'New York' } }]}; Copy
const inferenceResult: InferenceResult = { text: 'The quick brown fox jumps over the lazy dog.', stats: { ingestionTime: 150, inferenceTime: 300, totalTime: 450, ingestionTimeSeconds: 0.15, inferenceTimeSeconds: 0.3, totalTimeSeconds: 0.45, totalTokens: 200, tokensPerSecond: 444 }, serverStats: { someServerKey: 'someServerValue' }, toolCalls: [{ id: '1', name: 'getWeather', arguments: { location: 'New York' } }]};
Additional server-related statistics.
Additional statistics or metadata related to the inference.
The textual representation of the generated inference.
Optional
Tool calls made during inference.
Represents the result returned after an inference request.
InferenceResult
Example