OpenAIRealtimeExtensions Class

Definition

Provides extension methods for working with OpenAI.RealtimeConversation.RealtimeConversationSession and related types.

public ref class OpenAIRealtimeExtensions abstract sealed
public static class OpenAIRealtimeExtensions
type OpenAIRealtimeExtensions = class
Public Module OpenAIRealtimeExtensions
Inheritance
OpenAIRealtimeExtensions

Methods

HandleToolCallsAsync(RealtimeConversationSession, ConversationUpdate, IReadOnlyList<AIFunction>, Nullable<Boolean>, JsonSerializerOptions, CancellationToken)

Handles tool calls.

If the update represents a tool call, calls the corresponding tool and adds the result to the session.

If the update represents the end of a response, checks if this was due to a tool call and if so, instructs the session to begin responding to it.

ToConversationFunctionTool(AIFunction)

Converts a AIFunction into a OpenAI.RealtimeConversation.ConversationFunctionTool so that it can be used with OpenAI.RealtimeConversation.RealtimeConversationClient.

Applies to