Skip to content

Commit

Permalink
fix: register placeholder_to_record_key in GeneratePrompt transform (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyi-cheng authored Jul 2, 2024
1 parent 00033e9 commit a911e56
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/fmeval/transforms/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ def __init__(
{"my_prompt": "Summarize some long text and some other long text"}
"""
super().__init__(input_keys, output_keys, prompt_template, placeholder_to_record_key)
self.register_input_output_keys(input_keys, output_keys)
input_keys_to_register = list(placeholder_to_record_key.values()) if placeholder_to_record_key else input_keys
self.register_input_output_keys(input_keys_to_register, output_keys)
self.placeholder_to_record_key = placeholder_to_record_key
self.prompt_template = prompt_template
self.prompt_composer = PromptComposer(prompt_template)
Expand Down

0 comments on commit a911e56

Please sign in to comment.