refactor: Update from_template_and_variables method signature in Message class
This commit is contained in:
parent
f42cc0ebf1
commit
89f5df05e6
1 changed files with 1 additions and 1 deletions
|
|
@ -155,7 +155,7 @@ class Message(Data):
|
|||
return formatted_prompt
|
||||
|
||||
@classmethod
|
||||
async def from_template_and_variables(cls, template: str, variables: dict):
|
||||
async def from_template_and_variables(cls, template: str, **variables):
|
||||
instance = cls(template=template, variables=variables)
|
||||
contents = [{"type": "text", "text": instance.format_text()}]
|
||||
# Get all Message instances from the kwargs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue