each stop sequence must contain non-whitespace, Bedrock Anthropic
This commit is contained in:
parent
45c2ec7eee
commit
b8b8da842e
1 changed files with 2 additions and 1 deletions
|
|
@ -113,7 +113,8 @@ class AnthropicClaude3Toolkit implements BedrockModelToolkit {
|
|||
temperature: options.temperature,
|
||||
top_p: options.topP,
|
||||
top_k: options.topK,
|
||||
stop_sequences: options.stop,
|
||||
// each stop sequence must contain non-whitespace
|
||||
stop_sequences: options.stop?.filter((stop) => stop.trim() !== ""),
|
||||
};
|
||||
return new InvokeModelWithResponseStreamCommand({
|
||||
body: new TextEncoder().encode(JSON.stringify(payload)),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue