Class: Luogu::OpenAI::ChatRequestParams

Inherits:
Struct
  • Object
show all
Defined in:
lib/luogu/openai.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#frequency_penaltyObject

Returns the value of attribute frequency_penalty

Returns:

  • (Object)

    the current value of frequency_penalty



8
9
10
# File 'lib/luogu/openai.rb', line 8

def frequency_penalty
  @frequency_penalty
end

#logit_biasObject

Returns the value of attribute logit_bias

Returns:

  • (Object)

    the current value of logit_bias



8
9
10
# File 'lib/luogu/openai.rb', line 8

def logit_bias
  @logit_bias
end

#max_tokensObject

Returns the value of attribute max_tokens

Returns:

  • (Object)

    the current value of max_tokens



8
9
10
# File 'lib/luogu/openai.rb', line 8

def max_tokens
  @max_tokens
end

#messagesObject

Returns the value of attribute messages

Returns:

  • (Object)

    the current value of messages



8
9
10
# File 'lib/luogu/openai.rb', line 8

def messages
  @messages
end

#modelObject

Returns the value of attribute model

Returns:

  • (Object)

    the current value of model



8
9
10
# File 'lib/luogu/openai.rb', line 8

def model
  @model
end

#nObject

Returns the value of attribute n

Returns:

  • (Object)

    the current value of n



8
9
10
# File 'lib/luogu/openai.rb', line 8

def n
  @n
end

#presence_penaltyObject

Returns the value of attribute presence_penalty

Returns:

  • (Object)

    the current value of presence_penalty



8
9
10
# File 'lib/luogu/openai.rb', line 8

def presence_penalty
  @presence_penalty
end

#stopObject

Returns the value of attribute stop

Returns:

  • (Object)

    the current value of stop



8
9
10
# File 'lib/luogu/openai.rb', line 8

def stop
  @stop
end

#streamObject

Returns the value of attribute stream

Returns:

  • (Object)

    the current value of stream



8
9
10
# File 'lib/luogu/openai.rb', line 8

def stream
  @stream
end

#temperatureObject

Returns the value of attribute temperature

Returns:

  • (Object)

    the current value of temperature



8
9
10
# File 'lib/luogu/openai.rb', line 8

def temperature
  @temperature
end

#top_pObject

Returns the value of attribute top_p

Returns:

  • (Object)

    the current value of top_p



8
9
10
# File 'lib/luogu/openai.rb', line 8

def top_p
  @top_p
end

#userObject

Returns the value of attribute user

Returns:

  • (Object)

    the current value of user



8
9
10
# File 'lib/luogu/openai.rb', line 8

def user
  @user
end

Instance Method Details

#to_hObject Also known as: to_hash



12
13
14
# File 'lib/luogu/openai.rb', line 12

def to_h
  super.reject { |_, v| v.nil? }
end