@ -121,6 +121,15 @@ class ToolInvokeMessage(BaseModel):
return value
@field_validator("variable_name", mode="before")
def transform_variable_name(cls, value) -> str:
"""
The variable name must be a string.
if value in ["json", "text", "files"]:
raise ValueError(f"The variable name '{value}' is reserved.")
class MessageType(Enum):
TEXT = "text"
IMAGE = "image"