Class: Brute::MessageTransport::LangChain

Inherits:
RubyOpenAI
  • Object
show all
Defined in:
lib/brute/message_transport/lang_chain.rb

Overview

MessageTransport for the langchainrb gem. Its LLM classes speak the OpenAI-style wire format, so the message conversion is RubyOpenAI's — what differs is usage, which langchainrb answers through per-provider response methods rather than a usage object.

Class Method Summary collapse

Methods inherited from RubyOpenAI

dump

Class Method Details

.usage_metrics(response) ⇒ Object



15
16
17
# File 'lib/brute/message_transport/lang_chain.rb', line 15

def self.usage_metrics(response)
  Brute::UsageDetection::LangChain.detect(response)
end