narrow-chef-71655
09/28/2025, 9:42 AMtall-airline-16756
09/28/2025, 9:42 AMtall-airline-16756
09/28/2025, 9:43 AMRawFunctionTool and FunctionTool! Let me walk you through it in a simple way:
• RawFunctionTool: Here, the function gets the raw arguments dictionary exactly as the LLM passes it. It expects a parameter named raw_arguments of type dict[str, Any], which holds all the unprocessed JSON arguments. This means you have direct access to the raw data without any automatic type conversion or validation—giving you full control.
• FunctionTool: On the other hand, this tool automatically converts the LLM arguments to fit the function’s typed parameters. It validates the arguments against the function signature and properly constructs Python types (like turning JSON strings into the right Python objects). This makes it a more user-friendly and type-safe option.
So, to sum it up, RawFunctionTool gives you low-level access to the raw JSON arguments, while FunctionTool offers a smoother, type-safe experience with automatic parsing and validation. I hope this helps clarify things! If you have any more questions, feel free to ask—I’m here to help.
Sources: livekit-plugins/livekit-plugins-google/livekit/plugins/google/llm.py