mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 03:32:23 +08:00
Co-authored-by: vccler <vccler@163.com> Co-authored-by: -LAN- <laipz8200@outlook.com>
This commit is contained in:
parent
e8ad0339a3
commit
48757e581e
|
@ -10,6 +10,7 @@ from core.model_runtime.entities.message_entities import (
|
|||
PromptMessageRole,
|
||||
PromptMessageTool,
|
||||
SystemPromptMessage,
|
||||
ToolPromptMessage,
|
||||
UserPromptMessage,
|
||||
)
|
||||
from core.model_runtime.errors.validate import CredentialsValidateFailedError
|
||||
|
@ -463,6 +464,8 @@ class ZhipuAILargeLanguageModel(_CommonZhipuaiAI, LargeLanguageModel):
|
|||
message_text = f"{ai_prompt} {content}"
|
||||
elif isinstance(message, SystemPromptMessage):
|
||||
message_text = content
|
||||
elif isinstance(message, ToolPromptMessage):
|
||||
message_text = content
|
||||
else:
|
||||
raise ValueError(f"Got unknown type {message}")
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user