Class: RubyLLM::MCP::Configuration::AdapterConfig
- Inherits:
-
Object
- Object
- RubyLLM::MCP::Configuration::AdapterConfig
- Defined in:
- lib/ruby_llm/mcp/configuration.rb
Constant Summary collapse
- VALID_ADAPTERS =
%i[ruby_llm mcp_sdk].freeze
- VALID_TRANSPORTS =
%i[stdio sse streamable streamable_http http].freeze
Instance Attribute Summary collapse
-
#default_adapter ⇒ Object
Returns the value of attribute default_adapter.
Instance Method Summary collapse
- #adapter_for(config) ⇒ Object
-
#initialize ⇒ AdapterConfig
constructor
A new instance of AdapterConfig.
- #validate!(adapter:, transport:) ⇒ Object
Constructor Details
#initialize ⇒ AdapterConfig
Returns a new instance of AdapterConfig.
12 13 14 |
# File 'lib/ruby_llm/mcp/configuration.rb', line 12 def initialize @default_adapter = :ruby_llm end |
Instance Attribute Details
#default_adapter ⇒ Object
Returns the value of attribute default_adapter.
10 11 12 |
# File 'lib/ruby_llm/mcp/configuration.rb', line 10 def default_adapter @default_adapter end |
Instance Method Details
#adapter_for(config) ⇒ Object
22 23 24 |
# File 'lib/ruby_llm/mcp/configuration.rb', line 22 def adapter_for(config) config[:sdk] || config[:adapter] || @default_adapter end |
#validate!(adapter:, transport:) ⇒ Object
16 17 18 19 20 |
# File 'lib/ruby_llm/mcp/configuration.rb', line 16 def validate!(adapter:, transport:) validate_adapter!(adapter) validate_transport!(transport) validate_adapter_transport_combination!(adapter, transport) end |