Module: RubyLlmMesh

Defined in:
lib/ruby_llm_mesh.rb,
lib/ruby_llm_mesh/errors.rb,
lib/ruby_llm_mesh/router.rb,
lib/ruby_llm_mesh/railtie.rb,
lib/ruby_llm_mesh/version.rb,
lib/ruby_llm_mesh/response.rb,
lib/ruby_llm_mesh/rag/tools.rb,
lib/ruby_llm_mesh/rag/chunker.rb,
lib/ruby_llm_mesh/configuration.rb,
lib/ruby_llm_mesh/providers/base.rb,
lib/ruby_llm_mesh/rag/embeddings.rb,
lib/ruby_llm_mesh/circuit_breaker.rb,
lib/ruby_llm_mesh/providers/openai.rb,
lib/ruby_llm_mesh/providers/anthropic.rb,
lib/ruby_llm_mesh/providers/local_node.rb,
lib/ruby_llm_mesh/active_record/acts_as_ai_agent.rb,
sig/ruby_llm_mesh.rbs

Defined Under Namespace

Modules: ActiveRecord, Providers, Rag Classes: AllProvidersFailedError, AuthenticationError, CircuitBreaker, CircuitOpenError, Configuration, ConfigurationError, Error, ProviderError, Railtie, RateLimitError, Response, Router, TimeoutError

Constant Summary collapse

VERSION =

Returns:

  • (String)
"0.1.0"

Class Method Summary collapse

Class Method Details

.chatResponse

Parameters:

  • (Object)

Returns:



28
29
30
# File 'lib/ruby_llm_mesh.rb', line 28

def chat(**)
  complete(**)
end

.complete(prompt:, providers: nil, fallback: nil, **options) ⇒ Object



24
25
26
# File 'lib/ruby_llm_mesh.rb', line 24

def complete(prompt:, providers: nil, fallback: nil, **options)
  Router.new.complete(prompt: prompt, providers: providers, fallback: fallback, **options)
end

.configurationConfiguration

Returns:



36
37
38
# File 'lib/ruby_llm_mesh/configuration.rb', line 36

def configuration
  @configuration ||= Configuration.new
end

.configure {|configuration| ... } ⇒ void

This method returns an undefined value.

Yields:

Yield Parameters:

Yield Returns:

  • (void)


40
41
42
# File 'lib/ruby_llm_mesh/configuration.rb', line 40

def configure
  yield configuration
end

.reset_configuration!void

This method returns an undefined value.



44
45
46
# File 'lib/ruby_llm_mesh/configuration.rb', line 44

def reset_configuration!
  @configuration = Configuration.new
end