mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-15 00:45:53 +08:00
add base url for moonshot model (#7360)
This commit is contained in:
parent
4d4af00399
commit
baaa3f7f42
@ -84,6 +84,7 @@ class MoonshotLargeLanguageModel(OAIAPICompatLargeLanguageModel):
|
|||||||
|
|
||||||
def _add_custom_parameters(self, credentials: dict) -> None:
|
def _add_custom_parameters(self, credentials: dict) -> None:
|
||||||
credentials['mode'] = 'chat'
|
credentials['mode'] = 'chat'
|
||||||
|
if 'endpoint_url' not in credentials or credentials['endpoint_url'] == "":
|
||||||
credentials['endpoint_url'] = 'https://api.moonshot.cn/v1'
|
credentials['endpoint_url'] = 'https://api.moonshot.cn/v1'
|
||||||
|
|
||||||
def _add_function_call(self, model: str, credentials: dict) -> None:
|
def _add_function_call(self, model: str, credentials: dict) -> None:
|
||||||
|
@ -31,6 +31,14 @@ provider_credential_schema:
|
|||||||
placeholder:
|
placeholder:
|
||||||
zh_Hans: 在此输入您的 API Key
|
zh_Hans: 在此输入您的 API Key
|
||||||
en_US: Enter your API Key
|
en_US: Enter your API Key
|
||||||
|
- variable: endpoint_url
|
||||||
|
label:
|
||||||
|
en_US: API Base
|
||||||
|
type: text-input
|
||||||
|
required: false
|
||||||
|
placeholder:
|
||||||
|
zh_Hans: Base URL, 如:https://api.moonshot.cn/v1
|
||||||
|
en_US: Base URL, e.g. https://api.moonshot.cn/v1
|
||||||
model_credential_schema:
|
model_credential_schema:
|
||||||
model:
|
model:
|
||||||
label:
|
label:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user