Skip to main content

render_function

Function render_function 

Source
pub fn render_function(
    name: &str,
    description: &str,
    parameters: &Schema,
    strict: bool,
) -> Value
Expand description

Render a tool as an OpenAI function definition.

Output format:

{
  "type": "function",
  "function": {
    "name": "...",
    "description": "...",
    "strict": true,
    "parameters": { ... }
  }
}