소스 검색

add max_tokens parameter rule for zhipuai glm4 and glm4v (#2861)

orangeclk 1 년 전
부모
커밋
e7343cc67c
2개의 변경된 파일10개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      api/core/model_runtime/model_providers/zhipuai/llm/glm_4.yaml
  2. 5 0
      api/core/model_runtime/model_providers/zhipuai/llm/glm_4v.yaml

+ 5 - 0
api/core/model_runtime/model_providers/zhipuai/llm/glm_4.yaml

@@ -32,3 +32,8 @@ parameter_rules:
       zh_Hans: SSE接口调用时,用于控制每次返回内容方式是增量还是全量,不提供此参数时默认为增量返回,true 为增量返回,false 为全量返回。
       zh_Hans: SSE接口调用时,用于控制每次返回内容方式是增量还是全量,不提供此参数时默认为增量返回,true 为增量返回,false 为全量返回。
       en_US: When the SSE interface is called, it is used to control whether the content is returned incrementally or in full. If this parameter is not provided, the default is incremental return. true means incremental return, false means full return.
       en_US: When the SSE interface is called, it is used to control whether the content is returned incrementally or in full. If this parameter is not provided, the default is incremental return. true means incremental return, false means full return.
     required: false
     required: false
+  - name: max_tokens
+    use_template: max_tokens
+    default: 1024
+    min: 1
+    max: 8192

+ 5 - 0
api/core/model_runtime/model_providers/zhipuai/llm/glm_4v.yaml

@@ -30,3 +30,8 @@ parameter_rules:
       zh_Hans: SSE接口调用时,用于控制每次返回内容方式是增量还是全量,不提供此参数时默认为增量返回,true 为增量返回,false 为全量返回。
       zh_Hans: SSE接口调用时,用于控制每次返回内容方式是增量还是全量,不提供此参数时默认为增量返回,true 为增量返回,false 为全量返回。
       en_US: When the SSE interface is called, it is used to control whether the content is returned incrementally or in full. If this parameter is not provided, the default is incremental return. true means incremental return, false means full return.
       en_US: When the SSE interface is called, it is used to control whether the content is returned incrementally or in full. If this parameter is not provided, the default is incremental return. true means incremental return, false means full return.
     required: false
     required: false
+  - name: max_tokens
+    use_template: max_tokens
+    default: 1024
+    min: 1
+    max: 8192