setInferenceParams

View as MarkdownOpen in Claude

Update Bedrock inference parameters. Only the arguments you pass are changed; an argument left undefined keeps its current value.

Parameters

temperature
number

Generation temperature. Range: 0 to 1.

topP
number

Nucleus sampling parameter. Range: 0 to 1.

maxTokens
number

Maximum tokens to generate. Accepted for compatibility with the Python SDK. Not currently applied to the call.

Returns

BedrockAgent — Returns this for method chaining.

Example

import { BedrockAgent } from '@signalwire/sdk';
const agent = new BedrockAgent({
name: 'bedrock-assistant',
route: '/assistant',
systemPrompt: 'You are a helpful assistant.',
});
agent.setInferenceParams(0.3, 0.95, 2048);