Преглед на файлове

fix: max tokens can only up to 2048 (#2734)

Yeuoly преди 1 година
родител
ревизия
3a3ca8e6a9
променени са 1 файла, в които са добавени 1 реда и са изтрити 0 реда
  1. 1 0
      api/core/model_runtime/model_providers/xinference/llm/llm.py

+ 1 - 0
api/core/model_runtime/model_providers/xinference/llm/llm.py

@@ -308,6 +308,7 @@ class XinferenceAILargeLanguageModel(LargeLanguageModel):
                 type=ParameterType.INT,
                 use_template='max_tokens',
                 min=1,
+                max=credentials.get('context_length', 2048),
                 default=512,
                 label=I18nObject(
                     zh_Hans='最大生成长度',