Module: AskChatgpt::DefaultBehavior
- Included in:
- Executor
- Defined in:
- lib/ask_chatgpt/default_behavior.rb
Constant Summary collapse
- DEFAULT_PROMPTS =
[:improve, :refactor, :question, :find_bug, :code_review, :rspec_test, :unit_test, :explain]
Instance Method Summary collapse
- #add_prompt(prompt) ⇒ Object
- #with_model(*models) ⇒ Object (also: #with_models)
Instance Method Details
#add_prompt(prompt) ⇒ Object
26 27 28 29 |
# File 'lib/ask_chatgpt/default_behavior.rb', line 26 def add_prompt(prompt) scope << prompt self end |
#with_model(*models) ⇒ Object Also known as: with_models
5 6 7 8 9 10 11 |
# File 'lib/ask_chatgpt/default_behavior.rb', line 5 def with_model(*models) self.tap do models.each do |model| add_prompt AskChatGPT::Prompts::Model.new(model) end end end |