module Riffer::Agent::Run
rbs_inline: enabled
Public Instance Methods
Source
# File lib/riffer/agent/run.rb, line 9 def generate(agent:, prompt: nil, files: nil, tags: {}) append_user_message(agent, prompt, files: files) run_loop(agent, tags: tags) end
Source
# File lib/riffer/agent/run.rb, line 16 def stream(agent:, prompt: nil, files: nil, tags: {}) append_user_message(agent, prompt, files: files) # The enumerator body runs in its own fiber, where the fiber-local OTEL # context is empty — capture here so the run span parents to the caller's # trace. trace_context = Riffer::Tracing.current_context Enumerator.new do |stream_yielder| Riffer::Tracing.with_context(trace_context) { run_loop(agent, tags: tags, stream_yielder: stream_yielder) } end end