Class: ChatgptRb::DSL::Conversation

Inherits:
Base
  • Object
show all
Defined in:
lib/chatgpt_rb/dsl/conversation.rb

Instance Attribute Summary

Attributes inherited from Base

#object

Instance Method Summary collapse

Methods inherited from Base

configure, #initialize, supported_fields

Constructor Details

This class inherits a constructor from ChatgptRb::DSL::Base

Instance Method Details

#function(name, &configuration) ⇒ Object

Parameters:

  • name (String)

    the name of the function

  • configuration (Block)


12
13
14
# File 'lib/chatgpt_rb/dsl/conversation.rb', line 12

def function(name, &configuration)
  object.functions[name] = ChatgptRb::DSL::Function.configure(ChatgptRb::Function.new(name:), &configuration)
end