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])
  • logprobs: (Boolean)
  • top_logprobs: (Integer)
  • max_completion_tokens: (Integer)
  • service_tier: (String)
  • store: (Boolean)
  • metadata: (Hash[String, String])
  • prediction: (String)
  • audio: (String)
  • web_search_options: (String)
  • extra_body: (String)


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

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], ?logprobs: bool, ?top_logprobs: Integer, ?max_completion_tokens: Integer, ?service_tier: String, ?store: bool, ?metadata: Hash[String, String], ?prediction: String, ?audio: String, ?web_search_options: String, ?extra_body: String) -> void

Instance Attribute Details

#audioString? (readonly)

Returns the value of attribute audio.

Returns:

  • (String, nil)


182
183
184
# File 'sig/types.rbs', line 182

def audio
  @audio
end

#extra_bodyString? (readonly)

Returns the value of attribute extra_body.

Returns:

  • (String, nil)


184
185
186
# File 'sig/types.rbs', line 184

def extra_body
  @extra_body
end

#frequency_penaltyFloat? (readonly)

Returns the value of attribute frequency_penalty.

Returns:

  • (Float, nil)


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

def frequency_penalty
  @frequency_penalty
end

#logit_biasHash[String, Float]? (readonly)

Returns the value of attribute logit_bias.

Returns:

  • (Hash[String, Float], nil)


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

def logit_bias
  @logit_bias
end

#logprobsBoolean? (readonly)

Returns the value of attribute logprobs.

Returns:

  • (Boolean, nil)


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

def logprobs
  @logprobs
end

#max_completion_tokensInteger? (readonly)

Returns the value of attribute max_completion_tokens.

Returns:

  • (Integer, nil)


177
178
179
# File 'sig/types.rbs', line 177

def max_completion_tokens
  @max_completion_tokens
end

#max_tokensInteger? (readonly)

Returns the value of attribute max_tokens.

Returns:

  • (Integer, nil)


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

def max_tokens
  @max_tokens
end

#messagesArray[Message] (readonly)

Returns the value of attribute messages.

Returns:



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

def messages
  @messages
end

#metadataHash[String, String]? (readonly)

Returns the value of attribute metadata.

Returns:

  • (Hash[String, String], nil)


180
181
182
# File 'sig/types.rbs', line 180

def 
  @metadata
end

#modalitiesArray[Modality]? (readonly)

Returns the value of attribute modalities.

Returns:



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

def modalities
  @modalities
end

#modelString (readonly)

Returns the value of attribute model.

Returns:

  • (String)


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

def model
  @model
end

#nInteger? (readonly)

Returns the value of attribute n.

Returns:

  • (Integer, nil)


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

def n
  @n
end

#parallel_tool_callsBoolean? (readonly)

Returns the value of attribute parallel_tool_calls.

Returns:

  • (Boolean, nil)


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

def parallel_tool_calls
  @parallel_tool_calls
end

#predictionString? (readonly)

Returns the value of attribute prediction.

Returns:

  • (String, nil)


181
182
183
# File 'sig/types.rbs', line 181

def prediction
  @prediction
end

#presence_penaltyFloat? (readonly)

Returns the value of attribute presence_penalty.

Returns:

  • (Float, nil)


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

def presence_penalty
  @presence_penalty
end

#reasoning_effortReasoningEffort? (readonly)

Returns the value of attribute reasoning_effort.

Returns:



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

def reasoning_effort
  @reasoning_effort
end

#response_formatResponseFormat? (readonly)

Returns the value of attribute response_format.

Returns:



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

def response_format
  @response_format
end

#seedInteger? (readonly)

Returns the value of attribute seed.

Returns:

  • (Integer, nil)


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

def seed
  @seed
end

#service_tierString? (readonly)

Returns the value of attribute service_tier.

Returns:

  • (String, nil)


178
179
180
# File 'sig/types.rbs', line 178

def service_tier
  @service_tier
end

#stopStopSequence? (readonly)

Returns the value of attribute stop.

Returns:



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

def stop
  @stop
end

#storeBoolean? (readonly)

Returns the value of attribute store.

Returns:

  • (Boolean, nil)


179
180
181
# File 'sig/types.rbs', line 179

def store
  @store
end

#streamBoolean? (readonly)

Returns the value of attribute stream.

Returns:

  • (Boolean, nil)


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

def stream
  @stream
end

#stream_optionsStreamOptions? (readonly)

Returns the value of attribute stream_options.

Returns:



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

def stream_options
  @stream_options
end

#temperatureFloat? (readonly)

Returns the value of attribute temperature.

Returns:

  • (Float, nil)


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

def temperature
  @temperature
end

#tool_choiceToolChoice? (readonly)

Returns the value of attribute tool_choice.

Returns:



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

def tool_choice
  @tool_choice
end

#toolsArray[ChatCompletionTool]? (readonly)

Returns the value of attribute tools.

Returns:



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

def tools
  @tools
end

#top_logprobsInteger? (readonly)

Returns the value of attribute top_logprobs.

Returns:

  • (Integer, nil)


176
177
178
# File 'sig/types.rbs', line 176

def top_logprobs
  @top_logprobs
end

#top_pFloat? (readonly)

Returns the value of attribute top_p.

Returns:

  • (Float, nil)


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

def top_p
  @top_p
end

#userString? (readonly)

Returns the value of attribute user.

Returns:

  • (String, nil)


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

def user
  @user
end

#web_search_optionsString? (readonly)

Returns the value of attribute web_search_options.

Returns:

  • (String, nil)


183
184
185
# File 'sig/types.rbs', line 183

def web_search_options
  @web_search_options
end