From 6026e784be3c9566ac7b4f012d5144fdb414fbfc Mon Sep 17 00:00:00 2001 From: Benny Chen Date: Sun, 9 Nov 2025 22:57:41 -0800 Subject: [PATCH] Text to SQL RFT example --- eval_protocol/models.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/eval_protocol/models.py b/eval_protocol/models.py index be964b1a..6cf97f85 100644 --- a/eval_protocol/models.py +++ b/eval_protocol/models.py @@ -14,6 +14,7 @@ from openai.types.chat.chat_completion_message_tool_call import ( ChatCompletionMessageToolCall, ) +from openai.types.chat import ChatCompletionContentPartImageParam from pydantic import BaseModel, ConfigDict, Field from eval_protocol.get_pep440_version import get_pep440_version @@ -462,9 +463,9 @@ class Message(BaseModel): """Chat message model with trajectory evaluation support.""" role: str # assistant, user, system, tool - content: Optional[Union[str, List[ChatCompletionContentPartTextParam]]] = Field( - default="", description="The content of the message." - ) + content: Optional[ + Union[str, List[Union[ChatCompletionContentPartTextParam, ChatCompletionContentPartImageParam]]] + ] = Field(default="", description="The content of the message.") reasoning_content: Optional[str] = Field( default=None, description="Optional hidden chain-of-thought or reasoning content." )