Module: Braintrust::Trace::AlexRudall::RubyOpenAI
- Defined in:
- lib/braintrust/contrib/ruby_openai/deprecated.rb
Class Method Summary collapse
-
.wrap(client, tracer_provider: nil) ⇒ OpenAI::Client
Wrap an OpenAI::Client (ruby-openai gem) to automatically create spans.
Class Method Details
.wrap(client, tracer_provider: nil) ⇒ OpenAI::Client
Wrap an OpenAI::Client (ruby-openai gem) to automatically create spans. This is the legacy API - delegates to the new contrib framework.
16 17 18 19 20 |
# File 'lib/braintrust/contrib/ruby_openai/deprecated.rb', line 16 def self.wrap(client, tracer_provider: nil) Log.warn("Braintrust::Trace::AlexRudall::RubyOpenAI.wrap() is deprecated and will be removed in a future version: use Braintrust.instrument!() instead.") Braintrust.instrument!(:ruby_openai, target: client, tracer_provider: tracer_provider) client end |