Skip to content

Commit f1289c0

Browse files
committed
format
1 parent 6e505c1 commit f1289c0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

eval_protocol/models.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ def __iter__(self):
257257

258258
class Message(BaseModel):
259259
"""Chat message model with trajectory evaluation support."""
260-
260+
261261
model_config = ConfigDict(extra="allow")
262262
role: str # assistant, user, system, tool
263263
content: Optional[Union[str, List[ChatCompletionContentPartTextParam]]] = Field(
@@ -271,9 +271,12 @@ class Message(BaseModel):
271271
tool_calls: Optional[List[ChatCompletionMessageToolCall]] = None
272272
function_call: Optional[FunctionCall] = None
273273
control_plane_step: Optional[Dict[str, Any]] = None
274+
274275
def dump_mdoel_for_chat_completion_request(self):
275276
"""Only keep chat completion accepted fields"""
276-
exclude_fields = {"control_plane_step", "reasoning_content"} | set(self.model_extra.keys()) if self.model_extra else set()
277+
exclude_fields = (
278+
{"control_plane_step", "reasoning_content"} | set(self.model_extra.keys()) if self.model_extra else set()
279+
)
277280
return self.model_dump(exclude_none=True, exclude=exclude_fields)
278281

279282
@classmethod

0 commit comments

Comments
 (0)