From 702b003764f0b9915e754f2533e4611c7568c296 Mon Sep 17 00:00:00 2001 From: Hardik Shah Date: Wed, 19 Mar 2025 10:02:06 -0700 Subject: [PATCH] added documentation --- llama_stack/models/llama/datatypes.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/llama_stack/models/llama/datatypes.py b/llama_stack/models/llama/datatypes.py index 1a9bc1504..9842d7980 100644 --- a/llama_stack/models/llama/datatypes.py +++ b/llama_stack/models/llama/datatypes.py @@ -47,8 +47,13 @@ RecursiveType = Union[Primitive, List[Primitive], Dict[str, Primitive]] class ToolCall(BaseModel): call_id: str tool_name: Union[BuiltinTool, str] + # Plan is to deprecate the Dict in favor of a JSON string + # that is parsed on the client side instead of trying to manage + # the recursive type here. + # Making this a union so that client side can start prepping for this change. + # Eventually, we will remove both the Dict and arguments_json field, + # and arguments will just be a str arguments: Union[str, Dict[str, RecursiveType]] - # Temporary field for backwards compatibility arguments_json: Optional[str] = None @field_validator("tool_name", mode="before")