Class: Charai::OllamaConfiguration
- Inherits:
-
Object
- Object
- Charai::OllamaConfiguration
- Defined in:
- lib/charai/openai_configuration.rb
Instance Attribute Summary collapse
-
#endpoint_url ⇒ Object
readonly
Returns the value of attribute endpoint_url.
Instance Method Summary collapse
- #add_auth_header(headers) ⇒ Object
- #decorate_body(payload) ⇒ Object
-
#initialize(endpoint_url:, model:) ⇒ OllamaConfiguration
constructor
A new instance of OllamaConfiguration.
Constructor Details
#initialize(endpoint_url:, model:) ⇒ OllamaConfiguration
Returns a new instance of OllamaConfiguration.
41 42 43 44 |
# File 'lib/charai/openai_configuration.rb', line 41 def initialize(endpoint_url:, model:) @endpoint_url = endpoint_url @model = model end |
Instance Attribute Details
#endpoint_url ⇒ Object (readonly)
Returns the value of attribute endpoint_url.
46 47 48 |
# File 'lib/charai/openai_configuration.rb', line 46 def endpoint_url @endpoint_url end |
Instance Method Details
#add_auth_header(headers) ⇒ Object
48 49 50 51 |
# File 'lib/charai/openai_configuration.rb', line 48 def add_auth_header(headers) # auth header is not required. headers end |
#decorate_body(payload) ⇒ Object
53 54 55 56 |
# File 'lib/charai/openai_configuration.rb', line 53 def decorate_body(payload) payload[:model] = @model payload end |