mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 19:59:50 +08:00
fix: zhipuai history format wrong (#1897)
This commit is contained in:
parent
77f9e8ce0f
commit
bb7af56e69
|
@ -117,7 +117,10 @@ class ZhipuAILargeLanguageModel(_CommonZhipuaiAI, LargeLanguageModel):
|
|||
|
||||
params = {
|
||||
'model': model,
|
||||
'prompt': [{ 'role': prompt_message.role.value, 'content': prompt_message.content } for prompt_message in prompt_messages],
|
||||
'prompt': [{
|
||||
'role': prompt_message.role.value if prompt_message.role.value != 'system' else 'user',
|
||||
'content': prompt_message.content
|
||||
} for prompt_message in prompt_messages],
|
||||
**model_parameters
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ provider_credential_schema:
|
|||
- variable: api_key
|
||||
label:
|
||||
en_US: APIKey
|
||||
type: text-input
|
||||
type: secret-input
|
||||
required: true
|
||||
placeholder:
|
||||
zh_Hans: 在此输入您的 APIKey
|
||||
|
|
Loading…
Reference in New Issue
Block a user