Class: RubyLLM::MCP::Handlers::SamplingHandler
- Inherits:
-
Object
- Object
- RubyLLM::MCP::Handlers::SamplingHandler
- Includes:
- Concerns::ErrorHandling, Concerns::GuardChecks, Concerns::Lifecycle, Concerns::Logging, Concerns::ModelFiltering, Concerns::Options, Concerns::SamplingActions
- Defined in:
- lib/ruby_llm/mcp/handlers/sampling_handler.rb
Overview
Base class for sampling request handlers Provides access to sample object, guards, and helper methods
Instance Attribute Summary collapse
-
#coordinator ⇒ Object
readonly
Returns the value of attribute coordinator.
Attributes included from Concerns::SamplingActions
Attributes included from Concerns::Options
Instance Method Summary collapse
-
#initialize(sample:, coordinator:, **options) ⇒ SamplingHandler
constructor
Initialize sampling handler.
Methods included from Concerns::ModelFiltering
Methods included from Concerns::GuardChecks
Methods included from Concerns::ErrorHandling
Methods included from Concerns::Lifecycle
Methods included from Concerns::Options
Constructor Details
#initialize(sample:, coordinator:, **options) ⇒ SamplingHandler
Initialize sampling handler
56 57 58 59 60 |
# File 'lib/ruby_llm/mcp/handlers/sampling_handler.rb', line 56 def initialize(sample:, coordinator:, **) @sample = sample @coordinator = coordinator super(**) end |
Instance Attribute Details
#coordinator ⇒ Object (readonly)
Returns the value of attribute coordinator.
50 51 52 |
# File 'lib/ruby_llm/mcp/handlers/sampling_handler.rb', line 50 def coordinator @coordinator end |