Class: ActiveAgent::Providers::OpenAI::ChatProvider

Inherits:
Base show all
Includes:
ToolChoiceClearing
Defined in:
lib/active_agent/providers/open_ai/chat_provider.rb

Overview

Provider implementation for OpenAI’s Chat Completions API

Handles chat-based interactions including streaming responses, function/tool calling, and message management.

Class Method Summary collapse

Methods included from ToolChoiceClearing

#prepare_prompt_request_tools

Methods inherited from Base

#client, service_name

Methods inherited from BaseProvider

#embed, embed_request_type, #initialize, namespace, #preview, #prompt, service_name, tag_name

Methods included from Previewable

#preview_prompt

Methods included from Instrumentation

#instrumentation_prompt_payload

Methods included from ExceptionHandler

#configure_exception_handler, #rescue_with_handler, #with_exception_handling

Constructor Details

This class inherits a constructor from ActiveAgent::Providers::BaseProvider

Class Method Details

.options_klassClass

Returns the options class for this provider.

Returns:

  • (Class)

    the options class for this provider



18
19
20
# File 'lib/active_agent/providers/open_ai/chat_provider.rb', line 18

def self.options_klass
  Options
end

.prompt_request_typeChat::RequestType

Returns request type instance for chat completions.

Returns:



23
24
25
# File 'lib/active_agent/providers/open_ai/chat_provider.rb', line 23

def self.prompt_request_type
  Chat::RequestType.new
end