We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 04f66b7 commit 588c25cCopy full SHA for 588c25c
swift/llm/template/template_inputs.py
@@ -269,13 +269,7 @@ def __post_init__(self):
269
if not isinstance(value_dict, dict):
270
continue
271
if key in {'chosen', 'rejected'}:
272
- kwargs = {}
273
- for k in all_keys:
274
- val = value_dict.get(k)
275
- if val is None:
276
- continue
277
- kwargs[k] = val
278
- setattr(self, key, StdTemplateInputs.from_dict(kwargs))
+ setattr(self, key, StdTemplateInputs.from_dict(value_dict))
279
else:
280
res = []
281
for i in range(len(value_dict['messages'])):
0 commit comments