Method: OpenaiChatgpt::Choice#initialize

Defined in:
lib/openai_chatgpt/choice.rb

#initialize(obj) ⇒ Choice

Returns a new instance of Choice.



8
9
10
11
12
# File 'lib/openai_chatgpt/choice.rb', line 8

def initialize(obj)
  @content = obj.message.content
  @index = obj.index
  @role = obj.message.role
end