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



4
5
6
# File 'lib/luogu/openai.rb', line 4

def frequency_penalty
  @frequency_penalty
end

#logit_biasObject

Returns the value of attribute logit_bias

Returns:

  • (Object)

    the current value of logit_bias



4
5
6
# File 'lib/luogu/openai.rb', line 4

def logit_bias
  @logit_bias
end

#max_tokensObject

Returns the value of attribute max_tokens

Returns:

  • (Object)

    the current value of max_tokens



4
5
6
# File 'lib/luogu/openai.rb', line 4

def max_tokens
  @max_tokens
end

#messagesObject

Returns the value of attribute messages

Returns:

  • (Object)

    the current value of messages



4
5
6
# File 'lib/luogu/openai.rb', line 4

def messages
  @messages
end

#modelObject

Returns the value of attribute model

Returns:

  • (Object)

    the current value of model



4
5
6
# File 'lib/luogu/openai.rb', line 4

def model
  @model
end

#nObject

Returns the value of attribute n

Returns:

  • (Object)

    the current value of n



4
5
6
# File 'lib/luogu/openai.rb', line 4

def n
  @n
end

#presence_penaltyObject

Returns the value of attribute presence_penalty

Returns:

  • (Object)

    the current value of presence_penalty



4
5
6
# File 'lib/luogu/openai.rb', line 4

def presence_penalty
  @presence_penalty
end

#stopObject

Returns the value of attribute stop

Returns:

  • (Object)

    the current value of stop



4
5
6
# File 'lib/luogu/openai.rb', line 4

def stop
  @stop
end

#streamObject

Returns the value of attribute stream

Returns:

  • (Object)

    the current value of stream



4
5
6
# File 'lib/luogu/openai.rb', line 4

def stream
  @stream
end

#temperatureObject

Returns the value of attribute temperature

Returns:

  • (Object)

    the current value of temperature



4
5
6
# File 'lib/luogu/openai.rb', line 4

def temperature
  @temperature
end

#top_pObject

Returns the value of attribute top_p

Returns:

  • (Object)

    the current value of top_p



4
5
6
# File 'lib/luogu/openai.rb', line 4

def top_p
  @top_p
end

#userObject

Returns the value of attribute user

Returns:

  • (Object)

    the current value of user



4
5
6
# File 'lib/luogu/openai.rb', line 4

def user
  @user
end

Instance Method Details

#to_hObject Also known as: to_hash



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

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