Module: RubyLlmMesh
- Defined in:
- lib/ruby_llm_mesh.rb,
lib/ruby_llm_mesh/budget.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/native_core.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/sovereign_mesh.rb,
lib/ruby_llm_mesh/circuit_breaker.rb,
lib/ruby_llm_mesh/providers/openai.rb,
lib/ruby_llm_mesh/cache/redis_store.rb,
lib/ruby_llm_mesh/cache/memory_store.rb,
lib/ruby_llm_mesh/mesh/peer_registry.rb,
lib/ruby_llm_mesh/mesh/health_monitor.rb,
lib/ruby_llm_mesh/providers/anthropic.rb,
lib/ruby_llm_mesh/cache/semantic_cache.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, Cache, Mesh, NativeCore, Providers, Rag
Classes: AllProvidersFailedError, AuthenticationError, Budget, BudgetExceededError, CircuitBreaker, CircuitOpenError, Configuration, ConfigurationError, Error, ProviderError, Railtie, RateLimitError, Response, Router, SovereignMesh, TimeoutError
Constant Summary
collapse
- VERSION =
"2.2.0"
Class Method Summary
collapse
Class Method Details
.boot_mesh!(port: configuration.mesh_port) ⇒ Boolean
45
46
47
|
# File 'lib/ruby_llm_mesh.rb', line 45
def boot_mesh!(port: configuration.mesh_port)
NativeCore.start_node(port)
end
|
.budget_status ⇒ Object
53
54
55
|
# File 'lib/ruby_llm_mesh.rb', line 53
def budget_status
Budget.instance(config: configuration).status
end
|
36
37
38
|
# File 'lib/ruby_llm_mesh.rb', line 36
def chat(**)
complete(**)
end
|
.complete(prompt:, providers: nil, fallback: nil, **options) ⇒ Object
32
33
34
|
# File 'lib/ruby_llm_mesh.rb', line 32
def complete(prompt:, providers: nil, fallback: nil, **options)
Router.new.complete(prompt: prompt, providers: providers, fallback: fallback, **options)
end
|
87
88
89
|
# File 'lib/ruby_llm_mesh/configuration.rb', line 87
def configuration
@configuration ||= Configuration.new
end
|
This method returns an undefined value.
91
92
93
|
# File 'lib/ruby_llm_mesh/configuration.rb', line 91
def configure
yield configuration
end
|
.execute(intent:, strategy: :auto, **options) ⇒ Response
Sovereign mesh entrypoint — native P2P and/or real cloud failover.
41
42
43
|
# File 'lib/ruby_llm_mesh.rb', line 41
def execute(intent:, strategy: :auto, **options)
SovereignMesh.new.execute(intent: intent, strategy: strategy, **options)
end
|
.reset_configuration! ⇒ void
This method returns an undefined value.