Module: Langchain::Datadog::Assistant
- Includes:
- Tracing
- Defined in:
- lib/langchain/datadog/assistant.rb
Overview
Implements hooks for Langchain::Assistant class to capture LLM calls and report them to the Datadog LLM Observability API.
Instance Method Summary collapse
Methods included from Tracing
active_parent_id, active_span_id, active_trace_id, agent, end_span, start_span, workflow
Instance Method Details
#run ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/langchain/datadog/assistant.rb', line 10 def run(...) return super unless Datadog.enabled? span do super extract_content .last if state == :completed end end |