mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 11:42:29 +08:00
chore: optimize nvidia nim credential schema and info (#4898)
This commit is contained in:
parent
3542d55e67
commit
696c5308a9
|
@ -4,7 +4,9 @@ from core.model_runtime.model_providers.openai_api_compatible.llm.llm import OAI
|
|||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class NVIDIANIMProvider(OAIAPICompatLargeLanguageModel):
|
||||
"""
|
||||
Model class for NVIDIA NIM large language model.
|
||||
"""
|
||||
pass
|
||||
|
|
|
@ -4,6 +4,7 @@ from core.model_runtime.model_providers.__base.model_provider import ModelProvid
|
|||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class NVIDIANIMProvider(ModelProvider):
|
||||
|
||||
def validate_provider_credentials(self, credentials: dict) -> None:
|
||||
|
|
|
@ -2,13 +2,19 @@ provider: nvidia_nim
|
|||
label:
|
||||
en_US: NVIDIA NIM
|
||||
description:
|
||||
en_US: NVIDIA NIM
|
||||
zh_Hans: NVIDIA NIM
|
||||
en_US: NVIDIA NIM, a set of easy-to-use inference microservices.
|
||||
zh_Hans: NVIDIA NIM,一组易于使用的模型推理微服务。
|
||||
icon_small:
|
||||
en_US: icon_s_en.svg
|
||||
icon_large:
|
||||
en_US: icon_l_en.png
|
||||
background: "#EFFDFD"
|
||||
help:
|
||||
title:
|
||||
en_US: Learn more about NVIDIA NIM
|
||||
zh_Hans: 了解 NVIDIA NIM 更多信息
|
||||
url:
|
||||
en_US: https://www.nvidia.com/en-us/ai/
|
||||
supported_model_types:
|
||||
- llm
|
||||
configurate_methods:
|
||||
|
@ -29,8 +35,8 @@ model_credential_schema:
|
|||
type: text-input
|
||||
required: true
|
||||
placeholder:
|
||||
zh_Hans: Base URL, e.g. https://api.openai.com/v1
|
||||
en_US: Base URL, e.g. https://api.openai.com/v1
|
||||
zh_Hans: Base URL, e.g. http://192.168.1.100:8000/v1
|
||||
en_US: Base URL, e.g. http://192.168.1.100:8000/v1
|
||||
- variable: mode
|
||||
show_on:
|
||||
- variable: __model_type
|
||||
|
@ -71,31 +77,3 @@ model_credential_schema:
|
|||
value: llm
|
||||
default: '4096'
|
||||
type: text-input
|
||||
- variable: vision_support
|
||||
show_on:
|
||||
- variable: __model_type
|
||||
value: llm
|
||||
label:
|
||||
zh_Hans: Vision 支持
|
||||
en_US: Vision Support
|
||||
type: select
|
||||
required: false
|
||||
default: no_support
|
||||
options:
|
||||
- value: support
|
||||
label:
|
||||
en_US: Support
|
||||
zh_Hans: 支持
|
||||
- value: no_support
|
||||
label:
|
||||
en_US: Not Support
|
||||
zh_Hans: 不支持
|
||||
- variable: stream_mode_delimiter
|
||||
label:
|
||||
zh_Hans: 流模式返回结果的分隔符
|
||||
en_US: Delimiter for streaming results
|
||||
show_on:
|
||||
- variable: __model_type
|
||||
value: llm
|
||||
default: '\n\n'
|
||||
type: text-input
|
||||
|
|
Loading…
Reference in New Issue
Block a user