Class: LiterLlm::ChatCompletionRequest

Inherits:
Object
  • Object
show all
Defined in:
sig/types.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeChatCompletionRequest

Returns a new instance of ChatCompletionRequest.

Parameters:

  • model: (String)
  • messages: (Array[Message])
  • temperature: (Float)
  • top_p: (Float)
  • n: (Integer)
  • stream: (Boolean)
  • stop: (StopSequence)
  • max_tokens: (Integer)
  • presence_penalty: (Float)
  • frequency_penalty: (Float)
  • logit_bias: (Hash[String, Float])
  • user: (String)
  • tools: (Array[ChatCompletionTool])
  • tool_choice: (ToolChoice)
  • parallel_tool_calls: (Boolean)
  • response_format: (ResponseFormat)
  • stream_options: (StreamOptions)
  • seed: (Integer)
  • reasoning_effort: (ReasoningEffort)
  • modalities: (Array[Modality])
  • extra_body: (json_value)


175
# File 'sig/types.rbs', line 175

def initialize: (?model: String, ?messages: Array[Message], ?temperature: Float, ?top_p: Float, ?n: Integer, ?stream: bool, ?stop: StopSequence, ?max_tokens: Integer, ?presence_penalty: Float, ?frequency_penalty: Float, ?logit_bias: Hash[String, Float], ?user: String, ?tools: Array[ChatCompletionTool], ?tool_choice: ToolChoice, ?parallel_tool_calls: bool, ?response_format: ResponseFormat, ?stream_options: StreamOptions, ?seed: Integer, ?reasoning_effort: ReasoningEffort, ?modalities: Array[Modality], ?extra_body: json_value) -> void

Instance Attribute Details

#extra_bodyjson_value?

Returns the value of attribute extra_body.

Returns:

  • (json_value, nil)


173
174
175
# File 'sig/types.rbs', line 173

def extra_body
  @extra_body
end

#frequency_penaltyFloat?

Returns the value of attribute frequency_penalty.

Returns:

  • (Float, nil)


162
163
164
# File 'sig/types.rbs', line 162

def frequency_penalty
  @frequency_penalty
end

#logit_biasHash[String, Float]?

Returns the value of attribute logit_bias.

Returns:

  • (Hash[String, Float], nil)


163
164
165
# File 'sig/types.rbs', line 163

def logit_bias
  @logit_bias
end

#max_tokensInteger?

Returns the value of attribute max_tokens.

Returns:

  • (Integer, nil)


160
161
162
# File 'sig/types.rbs', line 160

def max_tokens
  @max_tokens
end

#messagesArray[Message]?

Returns the value of attribute messages.

Returns:



154
155
156
# File 'sig/types.rbs', line 154

def messages
  @messages
end

#modalitiesArray[Modality]?

Returns the value of attribute modalities.

Returns:



172
173
174
# File 'sig/types.rbs', line 172

def modalities
  @modalities
end

#modelString?

Returns the value of attribute model.

Returns:

  • (String, nil)


153
154
155
# File 'sig/types.rbs', line 153

def model
  @model
end

#nInteger?

Returns the value of attribute n.

Returns:

  • (Integer, nil)


157
158
159
# File 'sig/types.rbs', line 157

def n
  @n
end

#parallel_tool_callsBoolean?

Returns the value of attribute parallel_tool_calls.

Returns:

  • (Boolean, nil)


167
168
169
# File 'sig/types.rbs', line 167

def parallel_tool_calls
  @parallel_tool_calls
end

#presence_penaltyFloat?

Returns the value of attribute presence_penalty.

Returns:

  • (Float, nil)


161
162
163
# File 'sig/types.rbs', line 161

def presence_penalty
  @presence_penalty
end

#reasoning_effortReasoningEffort?

Returns the value of attribute reasoning_effort.

Returns:



171
172
173
# File 'sig/types.rbs', line 171

def reasoning_effort
  @reasoning_effort
end

#response_formatResponseFormat?

Returns the value of attribute response_format.

Returns:



168
169
170
# File 'sig/types.rbs', line 168

def response_format
  @response_format
end

#seedInteger?

Returns the value of attribute seed.

Returns:

  • (Integer, nil)


170
171
172
# File 'sig/types.rbs', line 170

def seed
  @seed
end

#stopStopSequence?

Returns the value of attribute stop.

Returns:



159
160
161
# File 'sig/types.rbs', line 159

def stop
  @stop
end

#streamBoolean?

Returns the value of attribute stream.

Returns:

  • (Boolean, nil)


158
159
160
# File 'sig/types.rbs', line 158

def stream
  @stream
end

#stream_optionsStreamOptions?

Returns the value of attribute stream_options.

Returns:



169
170
171
# File 'sig/types.rbs', line 169

def stream_options
  @stream_options
end

#temperatureFloat?

Returns the value of attribute temperature.

Returns:

  • (Float, nil)


155
156
157
# File 'sig/types.rbs', line 155

def temperature
  @temperature
end

#tool_choiceToolChoice?

Returns the value of attribute tool_choice.

Returns:



166
167
168
# File 'sig/types.rbs', line 166

def tool_choice
  @tool_choice
end

#toolsArray[ChatCompletionTool]?

Returns the value of attribute tools.

Returns:



165
166
167
# File 'sig/types.rbs', line 165

def tools
  @tools
end

#top_pFloat?

Returns the value of attribute top_p.

Returns:

  • (Float, nil)


156
157
158
# File 'sig/types.rbs', line 156

def top_p
  @top_p
end

#userString?

Returns the value of attribute user.

Returns:

  • (String, nil)


164
165
166
# File 'sig/types.rbs', line 164

def user
  @user
end