fix init ChatMessagePromptTemplate error issue #1351.ChatMessagePromptTemplate init had role properties,but the params not passing through issue:https://github.com/logspace-ai/langflow/issues/1351
This commit is contained in:
parent
3fbcd02bd9
commit
d39ace293c
1 changed files with 2 additions and 0 deletions
|
|
@ -32,6 +32,8 @@ def check_tools_in_params(params: Dict):
|
|||
|
||||
def instantiate_from_template(class_object, params: Dict):
|
||||
from_template_params = {"template": params.pop("prompt", params.pop("template", ""))}
|
||||
|
||||
from_template_params.update(params)
|
||||
if not from_template_params.get("template"):
|
||||
raise ValueError("Prompt template is required")
|
||||
return class_object.from_template(**from_template_params)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue