Module: ActiveAgent::Parameterized::ClassMethods
- Defined in:
- lib/active_agent/parameterized.rb
Instance Method Summary collapse
- #with(params = {}) ⇒ Object (also: #prompt_with)
Instance Method Details
#with(params = {}) ⇒ Object Also known as: prompt_with
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/active_agent/parameterized.rb', line 16 def with(params = {}) # Separate runtime options from regular params # runtime_options = params.extract!(:model, :temperature, :max_tokens, :stream, :top_p, # :frequency_penalty, :presence_penalty, :response_format, # :seed, :stop, :tools_choice, :user) # # Pass runtime options as :options parameter # params[:options] = runtime_options if runtime_options.any? ActiveAgent::Parameterized::Agent.new(self, params) end |