Class: ActiveAgent::Providers::OpenAI::Base
- Inherits:
-
BaseProvider
- Object
- BaseProvider
- ActiveAgent::Providers::OpenAI::Base
- Defined in:
- lib/active_agent/providers/open_ai/_base.rb
Overview
Base provider class for OpenAI API implementations.
Provides common functionality for OpenAI-based providers including client configuration, service identification, and tool call processing.
Direct Known Subclasses
ChatProvider, ResponsesProvider, ActiveAgent::Providers::OpenAIProvider
Class Method Summary collapse
-
.service_name ⇒ String
Returns the service name for OpenAI providers.
Instance Method Summary collapse
-
#client ⇒ OpenAI::Client
Returns a configured OpenAI client instance.
Methods inherited from BaseProvider
#embed, embed_request_type, #initialize, namespace, options_klass, #preview, #prompt, prompt_request_type, tag_name
Methods included from ToolChoiceClearing
Methods included from Previewable
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
.service_name ⇒ String
Returns the service name for OpenAI providers.
20 21 22 |
# File 'lib/active_agent/providers/open_ai/_base.rb', line 20 def self.service_name "OpenAI" end |
Instance Method Details
#client ⇒ OpenAI::Client
Returns a configured OpenAI client instance.
27 28 29 |
# File 'lib/active_agent/providers/open_ai/_base.rb', line 27 def client ::OpenAI::Client.new(**.serialize) end |