Skip to content

Commit

Permalink
Merge pull request #634 from aws-samples/fix-titan-premier-maxtokens
Browse files Browse the repository at this point in the history
converse API で Titan Text のパラメータが動かなくなったものの修正
  • Loading branch information
tbrand committed Aug 30, 2024
2 parents ddaff93 + 2f071df commit 6e7055f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/cdk/lambda/utils/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ const CLAUDE_DEFAULT_PARAMS: ConverseInferenceParams = {
};

const TITAN_TEXT_DEFAULT_PARAMS: ConverseInferenceParams = {
maxTokens: 3072,
// Doc 上は 3072 まで受け付けるが、Converse API だと 3000 までしか受け付けなかったため、3000 を設定する。
// 3072 が受け付けられるように修正されたら戻す。
// https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters-titan-text.html
maxTokens: 3000,
temperature: 0.7,
topP: 1.0,
};
Expand Down

0 comments on commit 6e7055f

Please sign in to comment.