From 96861ddd6906fa939b7955ff88002c1f1272aaa3 Mon Sep 17 00:00:00 2001 From: chiwoo Date: Thu, 30 Oct 2025 19:10:26 +0900 Subject: [PATCH] add MAX_COMPLETION_TOKENS --- .../plugin_entities/model_declaration.go | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/pkg/entities/plugin_entities/model_declaration.go b/pkg/entities/plugin_entities/model_declaration.go index 0d56ee24b..034f34d75 100644 --- a/pkg/entities/plugin_entities/model_declaration.go +++ b/pkg/entities/plugin_entities/model_declaration.go @@ -106,6 +106,7 @@ const ( PRESENCE_PENALTY DefaultParameterName = "presence_penalty" FREQUENCY_PENALTY DefaultParameterName = "frequency_penalty" MAX_TOKENS DefaultParameterName = "max_tokens" + MAX_COMPLETION_TOKENS DefaultParameterName = "max_completion_tokens" RESPONSE_FORMAT DefaultParameterName = "response_format" JSON_SCHEMA DefaultParameterName = "json_schema" ) @@ -227,6 +228,26 @@ var PARAMETER_RULE_TEMPLATE = map[DefaultParameterName]ModelParameterRule{ Max: parser.ToPtr(2048.0), Precision: parser.ToPtr(0), }, + MAX_COMPLETION_TOKENS: { + Label: &I18nObject{ + EnUS: "Max Completion Tokens", + ZhHans: "最大完成标记", + JaJp: "最大完了トークン", + PtBr: "Máximo de tokens de conclusão", + }, + Type: parser.ToPtr(PARAMETER_TYPE_INT), + Help: &I18nObject{ + EnUS: "Specifies the upper limit on the length of generated results. If the generated results are truncated, you can increase this parameter.", + ZhHans: "指定生成结果长度的上限。如果生成结果截断,可以调大该参数。", + JaJp: "生成結果の長さの上限を指定します。生成結果が切り捨てられた場合は、このパラメータを大きくすることができます。", + PtBr: "Especifica o limite superior para o comprimento dos resultados gerados. Se os resultados gerados forem truncados, você pode aumentar este parâmetro.", + }, + Required: false, + Default: parser.ToPtr(any(64)), + Min: parser.ToPtr(1.0), + Max: parser.ToPtr(2048.0), + Precision: parser.ToPtr(0), + }, RESPONSE_FORMAT: { Label: &I18nObject{ EnUS: "Response Format",