Skip to content

Modern tool calling support

Latest

Choose a tag to compare

@leafo leafo released this 16 Mar 23:04
· 2 commits to main since this release

New Features:

  1. Added modern tool-calling support to ChatSession

    • Supports tools, tool_choice, and parallel_tool_calls
    • Tool results can be sent back with role = "tool" and tool_call_id
  2. Added per-request parameter overrides for session methods

    • chat:send(...) and chat:generate_response(...) now accept request-specific overrides
    • ResponsesChatSession:send(...) now supports the same pattern
  3. Added new tool-calling examples

    • New chat completions example in examples/chat_completions/tools.lua
    • Updated Responses example to show a full tool-call round trip

Improvements:

  1. Improved ResponsesChatSession parity with ChatSession

    • Better support for tool-call round trips using function_call_output
    • Session usage and examples now align more closely across both APIs
  2. Improved streaming tool-call handling

    • Streaming tool-call deltas are aggregated into complete assistant messages
  3. Expanded documentation and test coverage

    • README now documents tool calling and per-request overrides
    • Added tests for tool calls, streaming aggregation, and session overrides