Module function_calling

Module function_calling 

Source
Expand description

OpenAI Function Calling Integration

This module provides functionality to convert tool definitions into OpenAI’s ChatCompletionTool format and parse function call responses from the SDK.

Structs§

FunctionCall
Represents a parsed tool call from OpenAI’s function calling response

Functions§

parse_tool_call_from_message
Parses a tool call from OpenAI’s ChatCompletionResponseMessage Expects the tool call to be in the message’s tool_calls array
tool_to_openai_function
Converts a tool definition into OpenAI ChatCompletionTool format