Skip to content

Commit

Permalink
capture cases where an instance has no extra data
Browse files Browse the repository at this point in the history
  • Loading branch information
liamjxu committed Oct 25, 2024
1 parent 3d82b96 commit b1ccf66
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def construct_example_prompt(self, instance: Instance, include_output: bool, ref
if include_output:
chain_of_thought = (
self.adapter_spec.chain_of_thought_prefix
+ instance.extra_data.get("chain_of_thought", "")
+ instance.extra_data.get("chain_of_thought", "") if instance.extra_data else ""
+ self.adapter_spec.chain_of_thought_suffix
)
result += self.adapter_spec.output_prefix + chain_of_thought + output + self.adapter_spec.output_suffix
Expand Down

0 comments on commit b1ccf66

Please sign in to comment.