feat: Update Prompt class to assign formatted prompt to self.text
This commit is contained in:
parent
f8aa1274fc
commit
0de6c2a88f
1 changed files with 1 additions and 0 deletions
|
|
@ -25,6 +25,7 @@ class Prompt(Record):
|
||||||
prompt_template = PromptTemplate.from_template(self.template)
|
prompt_template = PromptTemplate.from_template(self.template)
|
||||||
variables_with_str_values = dict_values_to_string(self.variables)
|
variables_with_str_values = dict_values_to_string(self.variables)
|
||||||
formatted_prompt = prompt_template.format(**variables_with_str_values)
|
formatted_prompt = prompt_template.format(**variables_with_str_values)
|
||||||
|
self.text = formatted_prompt
|
||||||
return formatted_prompt
|
return formatted_prompt
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue