Skip to main content
This mirrors the current Cookbook. The assistant first asks to call your function, then you return the result using function_call_result.

1) Initial request (expose calculator)

The response includes a type: "function_call" with function_call_id and arguments.

2) Follow-up with the result

View source on GitHub → 1_simple_calculator.py