Class: RubyLLM::Providers::OllamaCloud
- Inherits:
-
RubyLLM::Provider
- Object
- RubyLLM::Provider
- RubyLLM::Providers::OllamaCloud
- Defined in:
- lib/ruby_llm/providers/ollama_cloud.rb,
lib/ruby_llm/providers/ollama_cloud/models.rb
Overview
Ollama Cloud API integration.
Defined Under Namespace
Modules: Models Classes: ChatCompletions
Constant Summary
Constants included from Support::Inspectable
Support::Inspectable::TRUNCATE_AT
Instance Attribute Summary
Attributes inherited from RubyLLM::Provider
Class Method Summary collapse
-
.assume_models_exist? ⇒ Boolean
Returns
true: Ollama retires cloud models faster than the registry tracks them, so model ids are accepted as given. - .configuration_options ⇒ Object
- .configuration_requirements ⇒ Object
Instance Method Summary collapse
Methods inherited from RubyLLM::Provider
#animate_later, #assume_models_exist?, #batch_cost, #batch_cost_amounts, #batch_cost_multiplier, #batch_protocol_name, #batch_results, #batch_status, #batches?, #cache_content, #cancel_batch, #capabilities, capabilities, #compact, #complete, #configuration_requirements, #configured?, configured?, configured_providers, configured_remote_providers, #count_tokens, #create_batch, #delete_cache, display_name, #download_file, #embed, #extend_cache, #files?, #find_batch, #find_cache, #find_file, #find_research_job, #initialize, #list_file_uris, #list_models, local?, #local?, local_providers, #long_context_pricing?, model_registry_files, model_required?, models_dev_alias, models_dev_model_id, #moderate, #name, #ocr, #paint, #parse_error, #preprocess_message, protocol, #protocol_for, #protocols, protocols, providers, register, remote?, remote_providers, #render, #render_embedding, #rerank, #research_later, resolve, resolve!, resolve_registry_id, #retry_delay, #slug, #speak, #tokenize, #tool_approval_response, #transcribe, #upload_file
Methods included from Support::Inspectable
#full_inspect, #inspect, #pretty_print
Constructor Details
This class inherits a constructor from RubyLLM::Provider
Class Method Details
.assume_models_exist? ⇒ Boolean
Returns true: Ollama retires cloud models faster than the
registry tracks them, so model ids are accepted as given. Call
RubyLLM.models.refresh to pull the live catalog.
34 35 36 |
# File 'lib/ruby_llm/providers/ollama_cloud.rb', line 34 def assume_models_exist? true end |
.configuration_options ⇒ Object
23 24 25 |
# File 'lib/ruby_llm/providers/ollama_cloud.rb', line 23 def %i[ollama_cloud_api_key ollama_cloud_api_base] end |
.configuration_requirements ⇒ Object
27 28 29 |
# File 'lib/ruby_llm/providers/ollama_cloud.rb', line 27 def configuration_requirements %i[ollama_cloud_api_key] end |
Instance Method Details
#api_base ⇒ Object
14 15 16 |
# File 'lib/ruby_llm/providers/ollama_cloud.rb', line 14 def api_base @config.ollama_cloud_api_base || 'https://ollama.com/v1' end |
#headers ⇒ Object
18 19 20 |
# File 'lib/ruby_llm/providers/ollama_cloud.rb', line 18 def headers { 'Authorization' => "Bearer #{@config.ollama_cloud_api_key}" } end |