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)


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

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)


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

def audio
  @audio
end

#extra_bodyString? (readonly)

Returns the value of attribute extra_body.

Returns:

  • (String, nil)


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

def extra_body
  @extra_body
end

#frequency_penaltyFloat? (readonly)

Returns the value of attribute frequency_penalty.

Returns:

  • (Float, nil)


144
145
146
# File 'sig/types.rbs', line 144

def frequency_penalty
  @frequency_penalty
end

#logit_biasHash[String, Float]? (readonly)

Returns the value of attribute logit_bias.

Returns:

  • (Hash[String, Float], nil)


145
146
147
# File 'sig/types.rbs', line 145

def logit_bias
  @logit_bias
end

#logprobsBoolean? (readonly)

Returns the value of attribute logprobs.

Returns:

  • (Boolean, nil)


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

def logprobs
  @logprobs
end

#max_completion_tokensInteger? (readonly)

Returns the value of attribute max_completion_tokens.

Returns:

  • (Integer, nil)


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

def max_completion_tokens
  @max_completion_tokens
end

#max_tokensInteger? (readonly)

Returns the value of attribute max_tokens.

Returns:

  • (Integer, nil)


142
143
144
# File 'sig/types.rbs', line 142

def max_tokens
  @max_tokens
end

#messagesArray[Message] (readonly)

Returns the value of attribute messages.

Returns:



136
137
138
# File 'sig/types.rbs', line 136

def messages
  @messages
end

#metadataHash[String, String]? (readonly)

Returns the value of attribute metadata.

Returns:

  • (Hash[String, String], nil)


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

def 
  @metadata
end

#modalitiesArray[Modality]? (readonly)

Returns the value of attribute modalities.

Returns:



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

def modalities
  @modalities
end

#modelString (readonly)

Returns the value of attribute model.

Returns:

  • (String)


135
136
137
# File 'sig/types.rbs', line 135

def model
  @model
end

#nInteger? (readonly)

Returns the value of attribute n.

Returns:

  • (Integer, nil)


139
140
141
# File 'sig/types.rbs', line 139

def n
  @n
end

#parallel_tool_callsBoolean? (readonly)

Returns the value of attribute parallel_tool_calls.

Returns:

  • (Boolean, nil)


149
150
151
# File 'sig/types.rbs', line 149

def parallel_tool_calls
  @parallel_tool_calls
end

#predictionString? (readonly)

Returns the value of attribute prediction.

Returns:

  • (String, nil)


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

def prediction
  @prediction
end

#presence_penaltyFloat? (readonly)

Returns the value of attribute presence_penalty.

Returns:

  • (Float, nil)


143
144
145
# File 'sig/types.rbs', line 143

def presence_penalty
  @presence_penalty
end

#reasoning_effortReasoningEffort? (readonly)

Returns the value of attribute reasoning_effort.

Returns:



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

def reasoning_effort
  @reasoning_effort
end

#response_formatResponseFormat? (readonly)

Returns the value of attribute response_format.

Returns:



150
151
152
# File 'sig/types.rbs', line 150

def response_format
  @response_format
end

#seedInteger? (readonly)

Returns the value of attribute seed.

Returns:

  • (Integer, nil)


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

def seed
  @seed
end

#service_tierString? (readonly)

Returns the value of attribute service_tier.

Returns:

  • (String, nil)


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

def service_tier
  @service_tier
end

#stopStopSequence? (readonly)

Returns the value of attribute stop.

Returns:



141
142
143
# File 'sig/types.rbs', line 141

def stop
  @stop
end

#storeBoolean? (readonly)

Returns the value of attribute store.

Returns:

  • (Boolean, nil)


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

def store
  @store
end

#streamBoolean? (readonly)

Returns the value of attribute stream.

Returns:

  • (Boolean, nil)


140
141
142
# File 'sig/types.rbs', line 140

def stream
  @stream
end

#stream_optionsStreamOptions? (readonly)

Returns the value of attribute stream_options.

Returns:



151
152
153
# File 'sig/types.rbs', line 151

def stream_options
  @stream_options
end

#temperatureFloat? (readonly)

Returns the value of attribute temperature.

Returns:

  • (Float, nil)


137
138
139
# File 'sig/types.rbs', line 137

def temperature
  @temperature
end

#tool_choiceToolChoice? (readonly)

Returns the value of attribute tool_choice.

Returns:



148
149
150
# File 'sig/types.rbs', line 148

def tool_choice
  @tool_choice
end

#toolsArray[ChatCompletionTool]? (readonly)

Returns the value of attribute tools.

Returns:



147
148
149
# File 'sig/types.rbs', line 147

def tools
  @tools
end

#top_logprobsInteger? (readonly)

Returns the value of attribute top_logprobs.

Returns:

  • (Integer, nil)


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

def top_logprobs
  @top_logprobs
end

#top_pFloat? (readonly)

Returns the value of attribute top_p.

Returns:

  • (Float, nil)


138
139
140
# File 'sig/types.rbs', line 138

def top_p
  @top_p
end

#userString? (readonly)

Returns the value of attribute user.

Returns:

  • (String, nil)


146
147
148
# File 'sig/types.rbs', line 146

def user
  @user
end

#web_search_optionsString? (readonly)

Returns the value of attribute web_search_options.

Returns:

  • (String, nil)


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

def web_search_options
  @web_search_options
end