소스 검색

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='最大生成长度',