class RubyLLM::Context
Holds per-call configs
Attributes
Public Class Methods
Source
# File lib/ruby_llm/context.rb, line 8 def initialize(config) @config = config @connections = {} end
Public Instance Methods
Source
# File lib/ruby_llm/context.rb, line 13 def chat(*args, **kwargs, &) Chat.new(*args, **kwargs, context: self, &) end
# File lib/ruby_llm/context.rb, line 25 def connection_for(provider_instance) provider_instance.connection end
Source
# File lib/ruby_llm/context.rb, line 17 def embed(*args, **kwargs, &) Embedding.embed(*args, **kwargs, context: self, &) end
Source
# File lib/ruby_llm/context.rb, line 21 def paint(*args, **kwargs, &) Image.paint(*args, **kwargs, context: self, &) end