liter_llm 1.9.3 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +7 -7
- data/ext/liter_llm_rb/native/Cargo.lock +6 -5
- data/ext/liter_llm_rb/native/Cargo.toml +2 -2
- data/ext/liter_llm_rb/src/lib.rs +1184 -9
- data/lib/liter_llm/native.rb +75 -96
- data/lib/liter_llm/version.rb +2 -2
- data/lib/liter_llm.rb +1 -1
- data/sig/types.rbs +648 -586
- metadata +2 -5
data/sig/types.rbs
CHANGED
|
@@ -1,681 +1,684 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:c7947a41084f71e69944233535fbeda5cd13b37144078f1895b6b57a7802d3fe
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify --exit-code
|
|
5
5
|
|
|
6
6
|
module LiterLlm
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
VERSION: String
|
|
9
9
|
|
|
10
|
-
type json_value = Hash[String, untyped] | Array[untyped] | String | Integer | Float | bool | nil
|
|
10
|
+
type json_value = Hash[String, untyped] | Array[untyped] | String | Integer | Float | bool | nil
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
class SystemMessage
|
|
13
|
+
attr_accessor content: UserContent?
|
|
14
|
+
attr_accessor name: String?
|
|
15
15
|
|
|
16
16
|
def initialize: (?content: UserContent, ?name: String) -> void
|
|
17
|
-
|
|
17
|
+
end
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
class UserMessage
|
|
20
|
+
attr_accessor content: UserContent?
|
|
21
|
+
attr_accessor name: String?
|
|
22
22
|
|
|
23
23
|
def initialize: (?content: UserContent, ?name: String) -> void
|
|
24
|
-
|
|
24
|
+
end
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
class ImageUrl
|
|
27
|
+
attr_accessor url: String?
|
|
28
|
+
attr_accessor detail: ImageDetail?
|
|
29
29
|
|
|
30
30
|
def initialize: (?url: String, ?detail: ImageDetail) -> void
|
|
31
|
-
|
|
31
|
+
end
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
class DocumentContent
|
|
34
|
+
attr_accessor data: String?
|
|
35
|
+
attr_accessor media_type: String?
|
|
36
36
|
|
|
37
37
|
def initialize: (?data: String, ?media_type: String) -> void
|
|
38
|
-
|
|
38
|
+
end
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
class AudioContent
|
|
41
|
+
attr_accessor data: String?
|
|
42
|
+
attr_accessor format: String?
|
|
43
43
|
|
|
44
44
|
def initialize: (?data: String, ?format: String) -> void
|
|
45
|
-
|
|
45
|
+
end
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
class AssistantMessage
|
|
48
|
+
attr_accessor content: AssistantContent?
|
|
49
|
+
attr_accessor name: String?
|
|
50
50
|
attr_accessor tool_calls: Array[ToolCall]?
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
attr_accessor refusal: String?
|
|
52
|
+
attr_accessor function_call: FunctionCall?
|
|
53
|
+
attr_accessor reasoning_content: String?
|
|
53
54
|
|
|
54
|
-
def initialize: (?content: AssistantContent, ?name: String, ?tool_calls: Array[ToolCall], ?refusal: String, ?function_call: FunctionCall) -> void
|
|
55
|
+
def initialize: (?content: AssistantContent, ?name: String, ?tool_calls: Array[ToolCall], ?refusal: String, ?function_call: FunctionCall, ?reasoning_content: String) -> void
|
|
55
56
|
def text: () -> String?
|
|
56
57
|
def refusal_text: () -> String?
|
|
57
|
-
def
|
|
58
|
-
def
|
|
59
|
-
|
|
58
|
+
def reasoning_text: () -> String?
|
|
59
|
+
def output_images: () -> Array[ImageUrl]
|
|
60
|
+
def output_audio: () -> Array[AudioContent]
|
|
61
|
+
end
|
|
60
62
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
class ToolMessage
|
|
64
|
+
attr_accessor content: String?
|
|
65
|
+
attr_accessor tool_call_id: String?
|
|
66
|
+
attr_accessor name: String?
|
|
65
67
|
|
|
66
68
|
def initialize: (?content: String, ?tool_call_id: String, ?name: String) -> void
|
|
67
|
-
|
|
69
|
+
end
|
|
68
70
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
71
|
+
class DeveloperMessage
|
|
72
|
+
attr_accessor content: String?
|
|
73
|
+
attr_accessor name: String?
|
|
72
74
|
|
|
73
75
|
def initialize: (?content: String, ?name: String) -> void
|
|
74
|
-
|
|
76
|
+
end
|
|
75
77
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
78
|
+
class FunctionMessage
|
|
79
|
+
attr_accessor content: String?
|
|
80
|
+
attr_accessor name: String?
|
|
79
81
|
|
|
80
82
|
def initialize: (?content: String, ?name: String) -> void
|
|
81
|
-
|
|
83
|
+
end
|
|
82
84
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
85
|
+
class ChatCompletionTool
|
|
86
|
+
attr_reader tool_type: ToolType
|
|
87
|
+
attr_reader function: FunctionDefinition
|
|
86
88
|
|
|
87
89
|
def initialize: (tool_type: ToolType, function: FunctionDefinition) -> void
|
|
88
|
-
|
|
90
|
+
end
|
|
89
91
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
class FunctionDefinition
|
|
93
|
+
attr_reader name: String
|
|
94
|
+
attr_reader description: String
|
|
95
|
+
attr_reader parameters: json_value
|
|
96
|
+
attr_reader strict: bool
|
|
95
97
|
|
|
96
98
|
def initialize: (name: String, ?description: String, ?parameters: json_value, ?strict: bool) -> void
|
|
97
|
-
|
|
99
|
+
end
|
|
98
100
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
class ToolCall
|
|
102
|
+
attr_reader id: String
|
|
103
|
+
attr_reader call_type: ToolType
|
|
104
|
+
attr_reader function: FunctionCall
|
|
103
105
|
|
|
104
106
|
def initialize: (id: String, call_type: ToolType, function: FunctionCall) -> void
|
|
105
|
-
|
|
107
|
+
end
|
|
106
108
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
109
|
+
class FunctionCall
|
|
110
|
+
attr_reader name: String
|
|
111
|
+
attr_reader arguments: String
|
|
110
112
|
|
|
111
113
|
def initialize: (name: String, arguments: String) -> void
|
|
112
|
-
|
|
114
|
+
end
|
|
113
115
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
116
|
+
class SpecificToolChoice
|
|
117
|
+
attr_accessor choice_type: ToolType?
|
|
118
|
+
attr_accessor function: SpecificFunction?
|
|
117
119
|
|
|
118
120
|
def initialize: (?choice_type: ToolType, ?function: SpecificFunction) -> void
|
|
119
|
-
|
|
121
|
+
end
|
|
120
122
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
+
class SpecificFunction
|
|
124
|
+
attr_accessor name: String?
|
|
123
125
|
|
|
124
126
|
def initialize: (?name: String) -> void
|
|
125
|
-
|
|
127
|
+
end
|
|
126
128
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
class JsonSchemaFormat
|
|
130
|
+
attr_accessor name: String?
|
|
131
|
+
attr_accessor description: String?
|
|
132
|
+
attr_accessor schema: json_value?
|
|
133
|
+
attr_accessor strict: bool?
|
|
132
134
|
|
|
133
135
|
def initialize: (?name: String, ?description: String, ?schema: json_value, ?strict: bool) -> void
|
|
134
|
-
|
|
136
|
+
end
|
|
135
137
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
138
|
+
class Usage
|
|
139
|
+
attr_accessor prompt_tokens: Integer?
|
|
140
|
+
attr_accessor completion_tokens: Integer?
|
|
141
|
+
attr_accessor total_tokens: Integer?
|
|
142
|
+
attr_accessor prompt_tokens_details: PromptTokensDetails?
|
|
141
143
|
|
|
142
144
|
def initialize: (?prompt_tokens: Integer, ?completion_tokens: Integer, ?total_tokens: Integer, ?prompt_tokens_details: PromptTokensDetails) -> void
|
|
143
|
-
|
|
145
|
+
end
|
|
144
146
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
147
|
+
class PromptTokensDetails
|
|
148
|
+
attr_accessor cached_tokens: Integer?
|
|
149
|
+
attr_accessor audio_tokens: Integer?
|
|
148
150
|
|
|
149
151
|
def initialize: (?cached_tokens: Integer, ?audio_tokens: Integer) -> void
|
|
150
|
-
|
|
152
|
+
end
|
|
151
153
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
+
class ChatCompletionRequest
|
|
155
|
+
attr_accessor model: String?
|
|
154
156
|
attr_accessor messages: Array[Message]?
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
157
|
+
attr_accessor temperature: Float?
|
|
158
|
+
attr_accessor top_p: Float?
|
|
159
|
+
attr_accessor n: Integer?
|
|
160
|
+
attr_accessor stream: bool?
|
|
161
|
+
attr_accessor stop: StopSequence?
|
|
162
|
+
attr_accessor max_tokens: Integer?
|
|
163
|
+
attr_accessor presence_penalty: Float?
|
|
164
|
+
attr_accessor frequency_penalty: Float?
|
|
163
165
|
attr_accessor logit_bias: Hash[String, Float]?
|
|
164
|
-
|
|
166
|
+
attr_accessor user: String?
|
|
165
167
|
attr_accessor tools: Array[ChatCompletionTool]?
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
168
|
+
attr_accessor tool_choice: ToolChoice?
|
|
169
|
+
attr_accessor parallel_tool_calls: bool?
|
|
170
|
+
attr_accessor response_format: ResponseFormat?
|
|
171
|
+
attr_accessor stream_options: StreamOptions?
|
|
172
|
+
attr_accessor seed: Integer?
|
|
173
|
+
attr_accessor reasoning_effort: ReasoningEffort?
|
|
172
174
|
attr_accessor modalities: Array[Modality]?
|
|
173
|
-
|
|
175
|
+
attr_accessor extra_body: json_value?
|
|
174
176
|
|
|
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
|
|
176
|
-
|
|
177
|
+
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
|
|
178
|
+
end
|
|
177
179
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
+
class StreamOptions
|
|
181
|
+
attr_accessor include_usage: bool?
|
|
180
182
|
|
|
181
183
|
def initialize: (?include_usage: bool) -> void
|
|
182
|
-
|
|
184
|
+
end
|
|
183
185
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
186
|
+
class ChatCompletionResponse
|
|
187
|
+
attr_accessor id: String?
|
|
188
|
+
attr_accessor object: String?
|
|
189
|
+
attr_accessor created: Integer?
|
|
190
|
+
attr_accessor model: String?
|
|
189
191
|
attr_accessor choices: Array[Choice]?
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
192
|
+
attr_accessor usage: Usage?
|
|
193
|
+
attr_accessor system_fingerprint: String?
|
|
194
|
+
attr_accessor service_tier: String?
|
|
193
195
|
|
|
194
|
-
def initialize: (?id: String, ?object: String, ?created: Integer, ?model: String, ?choices: Array[Choice], ?usage: Usage, ?system_fingerprint: String, ?service_tier: String) -> void
|
|
195
|
-
|
|
196
|
+
def initialize: (?id: String, ?object: String, ?created: Integer, ?model: String, ?choices: Array[Choice], ?usage: Usage, ?system_fingerprint: String, ?service_tier: String) -> void
|
|
197
|
+
end
|
|
196
198
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
199
|
+
class Choice
|
|
200
|
+
attr_accessor index: Integer?
|
|
201
|
+
attr_accessor message: AssistantMessage?
|
|
202
|
+
attr_accessor finish_reason: FinishReason?
|
|
201
203
|
|
|
202
204
|
def initialize: (?index: Integer, ?message: AssistantMessage, ?finish_reason: FinishReason) -> void
|
|
203
|
-
|
|
205
|
+
end
|
|
204
206
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
207
|
+
class ChatCompletionChunk
|
|
208
|
+
attr_accessor id: String?
|
|
209
|
+
attr_accessor object: String?
|
|
210
|
+
attr_accessor created: Integer?
|
|
211
|
+
attr_accessor model: String?
|
|
210
212
|
attr_accessor choices: Array[StreamChoice]?
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
213
|
+
attr_accessor usage: Usage?
|
|
214
|
+
attr_accessor system_fingerprint: String?
|
|
215
|
+
attr_accessor service_tier: String?
|
|
214
216
|
|
|
215
|
-
def initialize: (?id: String, ?object: String, ?created: Integer, ?model: String, ?choices: Array[StreamChoice], ?usage: Usage, ?system_fingerprint: String, ?service_tier: String) -> void
|
|
216
|
-
|
|
217
|
+
def initialize: (?id: String, ?object: String, ?created: Integer, ?model: String, ?choices: Array[StreamChoice], ?usage: Usage, ?system_fingerprint: String, ?service_tier: String) -> void
|
|
218
|
+
end
|
|
217
219
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
220
|
+
class StreamChoice
|
|
221
|
+
attr_accessor index: Integer?
|
|
222
|
+
attr_accessor delta: StreamDelta?
|
|
223
|
+
attr_accessor finish_reason: FinishReason?
|
|
222
224
|
|
|
223
225
|
def initialize: (?index: Integer, ?delta: StreamDelta, ?finish_reason: FinishReason) -> void
|
|
224
|
-
|
|
226
|
+
end
|
|
225
227
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
228
|
+
class StreamDelta
|
|
229
|
+
attr_accessor role: String?
|
|
230
|
+
attr_accessor content: String?
|
|
229
231
|
attr_accessor tool_calls: Array[StreamToolCall]?
|
|
230
|
-
|
|
231
|
-
|
|
232
|
+
attr_accessor function_call: StreamFunctionCall?
|
|
233
|
+
attr_accessor refusal: String?
|
|
234
|
+
attr_accessor reasoning_content: String?
|
|
232
235
|
|
|
233
|
-
def initialize: (?role: String, ?content: String, ?tool_calls: Array[StreamToolCall], ?function_call: StreamFunctionCall, ?refusal: String) -> void
|
|
234
|
-
|
|
236
|
+
def initialize: (?role: String, ?content: String, ?tool_calls: Array[StreamToolCall], ?function_call: StreamFunctionCall, ?refusal: String, ?reasoning_content: String) -> void
|
|
237
|
+
end
|
|
235
238
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
239
|
+
class StreamToolCall
|
|
240
|
+
attr_accessor index: Integer?
|
|
241
|
+
attr_accessor id: String?
|
|
242
|
+
attr_accessor call_type: ToolType?
|
|
243
|
+
attr_accessor function: StreamFunctionCall?
|
|
241
244
|
|
|
242
245
|
def initialize: (?index: Integer, ?id: String, ?call_type: ToolType, ?function: StreamFunctionCall) -> void
|
|
243
|
-
|
|
246
|
+
end
|
|
244
247
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
+
class StreamFunctionCall
|
|
249
|
+
attr_accessor name: String?
|
|
250
|
+
attr_accessor arguments: String?
|
|
248
251
|
|
|
249
252
|
def initialize: (?name: String, ?arguments: String) -> void
|
|
250
|
-
|
|
253
|
+
end
|
|
251
254
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
255
|
+
class EmbeddingRequest
|
|
256
|
+
attr_accessor model: String?
|
|
257
|
+
attr_accessor input: EmbeddingInput?
|
|
258
|
+
attr_accessor encoding_format: EmbeddingFormat?
|
|
259
|
+
attr_accessor dimensions: Integer?
|
|
260
|
+
attr_accessor user: String?
|
|
258
261
|
|
|
259
262
|
def initialize: (?model: String, ?input: EmbeddingInput, ?encoding_format: EmbeddingFormat, ?dimensions: Integer, ?user: String) -> void
|
|
260
|
-
|
|
263
|
+
end
|
|
261
264
|
|
|
262
|
-
|
|
263
|
-
|
|
265
|
+
class EmbeddingResponse
|
|
266
|
+
attr_reader object: String
|
|
264
267
|
attr_reader data: Array[EmbeddingObject]
|
|
265
|
-
|
|
266
|
-
|
|
268
|
+
attr_reader model: String
|
|
269
|
+
attr_reader usage: Usage
|
|
267
270
|
|
|
268
|
-
def initialize: (object: String, data: Array[EmbeddingObject], model: String, ?usage: Usage) -> void
|
|
269
|
-
|
|
271
|
+
def initialize: (object: String, data: Array[EmbeddingObject], model: String, ?usage: Usage) -> void
|
|
272
|
+
end
|
|
270
273
|
|
|
271
|
-
|
|
272
|
-
|
|
274
|
+
class EmbeddingObject
|
|
275
|
+
attr_reader object: String
|
|
273
276
|
attr_reader embedding: Array[Float]
|
|
274
|
-
|
|
277
|
+
attr_reader index: Integer
|
|
275
278
|
|
|
276
|
-
def initialize: (object: String, embedding: Array[Float], index: Integer) -> void
|
|
277
|
-
|
|
279
|
+
def initialize: (object: String, embedding: Array[Float], index: Integer) -> void
|
|
280
|
+
end
|
|
278
281
|
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
282
|
+
class CreateImageRequest
|
|
283
|
+
attr_accessor prompt: String?
|
|
284
|
+
attr_accessor model: String?
|
|
285
|
+
attr_accessor n: Integer?
|
|
286
|
+
attr_accessor size: String?
|
|
287
|
+
attr_accessor quality: String?
|
|
288
|
+
attr_accessor style: String?
|
|
289
|
+
attr_accessor response_format: String?
|
|
290
|
+
attr_accessor user: String?
|
|
288
291
|
|
|
289
292
|
def initialize: (?prompt: String, ?model: String, ?n: Integer, ?size: String, ?quality: String, ?style: String, ?response_format: String, ?user: String) -> void
|
|
290
|
-
|
|
293
|
+
end
|
|
291
294
|
|
|
292
|
-
|
|
293
|
-
|
|
295
|
+
class ImagesResponse
|
|
296
|
+
attr_accessor created: Integer?
|
|
294
297
|
attr_accessor data: Array[Image]?
|
|
295
298
|
|
|
296
|
-
def initialize: (?created: Integer, ?data: Array[Image]) -> void
|
|
297
|
-
|
|
299
|
+
def initialize: (?created: Integer, ?data: Array[Image]) -> void
|
|
300
|
+
end
|
|
298
301
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
302
|
+
class Image
|
|
303
|
+
attr_accessor url: String?
|
|
304
|
+
attr_accessor b64_json: String?
|
|
305
|
+
attr_accessor revised_prompt: String?
|
|
303
306
|
|
|
304
307
|
def initialize: (?url: String, ?b64_json: String, ?revised_prompt: String) -> void
|
|
305
|
-
|
|
308
|
+
end
|
|
306
309
|
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
+
class DecodedDataUrl
|
|
311
|
+
attr_accessor mime: String?
|
|
312
|
+
attr_accessor data: String?
|
|
310
313
|
|
|
311
314
|
def initialize: (?mime: String, ?data: String) -> void
|
|
312
|
-
|
|
315
|
+
end
|
|
313
316
|
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
317
|
+
class CreateSpeechRequest
|
|
318
|
+
attr_accessor model: String?
|
|
319
|
+
attr_accessor input: String?
|
|
320
|
+
attr_accessor voice: String?
|
|
321
|
+
attr_accessor response_format: String?
|
|
322
|
+
attr_accessor speed: Float?
|
|
320
323
|
|
|
321
324
|
def initialize: (?model: String, ?input: String, ?voice: String, ?response_format: String, ?speed: Float) -> void
|
|
322
|
-
|
|
325
|
+
end
|
|
323
326
|
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
327
|
+
class CreateTranscriptionRequest
|
|
328
|
+
attr_accessor model: String?
|
|
329
|
+
attr_accessor file: String?
|
|
330
|
+
attr_accessor language: String?
|
|
331
|
+
attr_accessor prompt: String?
|
|
332
|
+
attr_accessor response_format: String?
|
|
333
|
+
attr_accessor temperature: Float?
|
|
331
334
|
|
|
332
335
|
def initialize: (?model: String, ?file: String, ?language: String, ?prompt: String, ?response_format: String, ?temperature: Float) -> void
|
|
333
|
-
|
|
336
|
+
end
|
|
334
337
|
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
338
|
+
class TranscriptionResponse
|
|
339
|
+
attr_accessor text: String?
|
|
340
|
+
attr_accessor language: String?
|
|
341
|
+
attr_accessor duration: Float?
|
|
339
342
|
attr_accessor segments: Array[TranscriptionSegment]?
|
|
340
343
|
|
|
341
|
-
def initialize: (?text: String, ?language: String, ?duration: Float, ?segments: Array[TranscriptionSegment]) -> void
|
|
342
|
-
|
|
344
|
+
def initialize: (?text: String, ?language: String, ?duration: Float, ?segments: Array[TranscriptionSegment]) -> void
|
|
345
|
+
end
|
|
343
346
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
347
|
+
class TranscriptionSegment
|
|
348
|
+
attr_accessor id: Integer?
|
|
349
|
+
attr_accessor start: Float?
|
|
350
|
+
attr_accessor end: Float?
|
|
351
|
+
attr_accessor text: String?
|
|
349
352
|
|
|
350
353
|
def initialize: (?id: Integer, ?start: Float, ?end: Float, ?text: String) -> void
|
|
351
|
-
|
|
354
|
+
end
|
|
352
355
|
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
+
class ModerationRequest
|
|
357
|
+
attr_accessor input: ModerationInput?
|
|
358
|
+
attr_accessor model: String?
|
|
356
359
|
|
|
357
360
|
def initialize: (?input: ModerationInput, ?model: String) -> void
|
|
358
|
-
|
|
361
|
+
end
|
|
359
362
|
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
+
class ModerationResponse
|
|
364
|
+
attr_reader id: String
|
|
365
|
+
attr_reader model: String
|
|
363
366
|
attr_reader results: Array[ModerationResult]
|
|
364
367
|
|
|
365
|
-
def initialize: (id: String, model: String, results: Array[ModerationResult]) -> void
|
|
366
|
-
|
|
368
|
+
def initialize: (id: String, model: String, results: Array[ModerationResult]) -> void
|
|
369
|
+
end
|
|
367
370
|
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
371
|
+
class ModerationResult
|
|
372
|
+
attr_reader flagged: bool
|
|
373
|
+
attr_reader categories: ModerationCategories
|
|
374
|
+
attr_reader category_scores: ModerationCategoryScores
|
|
372
375
|
|
|
373
376
|
def initialize: (flagged: bool, categories: ModerationCategories, category_scores: ModerationCategoryScores) -> void
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
377
|
+
end
|
|
378
|
+
|
|
379
|
+
class ModerationCategories
|
|
380
|
+
attr_accessor sexual: bool?
|
|
381
|
+
attr_accessor hate: bool?
|
|
382
|
+
attr_accessor harassment: bool?
|
|
383
|
+
attr_accessor self_harm: bool?
|
|
384
|
+
attr_accessor sexual_minors: bool?
|
|
385
|
+
attr_accessor hate_threatening: bool?
|
|
386
|
+
attr_accessor violence_graphic: bool?
|
|
387
|
+
attr_accessor self_harm_intent: bool?
|
|
388
|
+
attr_accessor self_harm_instructions: bool?
|
|
389
|
+
attr_accessor harassment_threatening: bool?
|
|
390
|
+
attr_accessor violence: bool?
|
|
388
391
|
|
|
389
392
|
def initialize: (?sexual: bool, ?hate: bool, ?harassment: bool, ?self_harm: bool, ?sexual_minors: bool, ?hate_threatening: bool, ?violence_graphic: bool, ?self_harm_intent: bool, ?self_harm_instructions: bool, ?harassment_threatening: bool, ?violence: bool) -> void
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
393
|
+
end
|
|
394
|
+
|
|
395
|
+
class ModerationCategoryScores
|
|
396
|
+
attr_accessor sexual: Float?
|
|
397
|
+
attr_accessor hate: Float?
|
|
398
|
+
attr_accessor harassment: Float?
|
|
399
|
+
attr_accessor self_harm: Float?
|
|
400
|
+
attr_accessor sexual_minors: Float?
|
|
401
|
+
attr_accessor hate_threatening: Float?
|
|
402
|
+
attr_accessor violence_graphic: Float?
|
|
403
|
+
attr_accessor self_harm_intent: Float?
|
|
404
|
+
attr_accessor self_harm_instructions: Float?
|
|
405
|
+
attr_accessor harassment_threatening: Float?
|
|
406
|
+
attr_accessor violence: Float?
|
|
404
407
|
|
|
405
408
|
def initialize: (?sexual: Float, ?hate: Float, ?harassment: Float, ?self_harm: Float, ?sexual_minors: Float, ?hate_threatening: Float, ?violence_graphic: Float, ?self_harm_intent: Float, ?self_harm_instructions: Float, ?harassment_threatening: Float, ?violence: Float) -> void
|
|
406
|
-
|
|
409
|
+
end
|
|
407
410
|
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
+
class RerankRequest
|
|
412
|
+
attr_accessor model: String?
|
|
413
|
+
attr_accessor query: String?
|
|
411
414
|
attr_accessor documents: Array[RerankDocument]?
|
|
412
|
-
|
|
413
|
-
|
|
415
|
+
attr_accessor top_n: Integer?
|
|
416
|
+
attr_accessor return_documents: bool?
|
|
414
417
|
|
|
415
|
-
def initialize: (?model: String, ?query: String, ?documents: Array[RerankDocument], ?top_n: Integer, ?return_documents: bool) -> void
|
|
416
|
-
|
|
418
|
+
def initialize: (?model: String, ?query: String, ?documents: Array[RerankDocument], ?top_n: Integer, ?return_documents: bool) -> void
|
|
419
|
+
end
|
|
417
420
|
|
|
418
|
-
|
|
419
|
-
|
|
421
|
+
class RerankResponse
|
|
422
|
+
attr_reader id: String
|
|
420
423
|
attr_reader results: Array[RerankResult]
|
|
421
|
-
|
|
424
|
+
attr_reader meta: json_value
|
|
422
425
|
|
|
423
|
-
def initialize: (?id: String, results: Array[RerankResult], ?meta: json_value) -> void
|
|
424
|
-
|
|
426
|
+
def initialize: (?id: String, results: Array[RerankResult], ?meta: json_value) -> void
|
|
427
|
+
end
|
|
425
428
|
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
429
|
+
class RerankResult
|
|
430
|
+
attr_reader index: Integer
|
|
431
|
+
attr_reader relevance_score: Float
|
|
432
|
+
attr_reader document: RerankResultDocument
|
|
430
433
|
|
|
431
434
|
def initialize: (index: Integer, relevance_score: Float, ?document: RerankResultDocument) -> void
|
|
432
|
-
|
|
435
|
+
end
|
|
433
436
|
|
|
434
|
-
|
|
435
|
-
|
|
437
|
+
class RerankResultDocument
|
|
438
|
+
attr_reader text: String
|
|
436
439
|
|
|
437
440
|
def initialize: (text: String) -> void
|
|
438
|
-
|
|
441
|
+
end
|
|
439
442
|
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
443
|
+
class SearchRequest
|
|
444
|
+
attr_accessor model: String?
|
|
445
|
+
attr_accessor query: String?
|
|
446
|
+
attr_accessor max_results: Integer?
|
|
444
447
|
attr_accessor search_domain_filter: Array[String]?
|
|
445
|
-
|
|
448
|
+
attr_accessor country: String?
|
|
446
449
|
|
|
447
|
-
def initialize: (?model: String, ?query: String, ?max_results: Integer, ?search_domain_filter: Array[String], ?country: String) -> void
|
|
448
|
-
|
|
450
|
+
def initialize: (?model: String, ?query: String, ?max_results: Integer, ?search_domain_filter: Array[String], ?country: String) -> void
|
|
451
|
+
end
|
|
449
452
|
|
|
450
|
-
|
|
453
|
+
class SearchResponse
|
|
451
454
|
attr_reader results: Array[SearchResult]
|
|
452
|
-
|
|
455
|
+
attr_reader model: String
|
|
453
456
|
|
|
454
|
-
def initialize: (results: Array[SearchResult], model: String) -> void
|
|
455
|
-
|
|
457
|
+
def initialize: (results: Array[SearchResult], model: String) -> void
|
|
458
|
+
end
|
|
456
459
|
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
460
|
+
class SearchResult
|
|
461
|
+
attr_reader title: String
|
|
462
|
+
attr_reader url: String
|
|
463
|
+
attr_reader snippet: String
|
|
464
|
+
attr_reader date: String
|
|
462
465
|
|
|
463
466
|
def initialize: (title: String, url: String, snippet: String, ?date: String) -> void
|
|
464
|
-
|
|
467
|
+
end
|
|
465
468
|
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
+
class OcrRequest
|
|
470
|
+
attr_accessor model: String?
|
|
471
|
+
attr_accessor document: OcrDocument?
|
|
469
472
|
attr_accessor pages: Array[Integer]?
|
|
470
|
-
|
|
473
|
+
attr_accessor include_image_base64: bool?
|
|
471
474
|
|
|
472
|
-
def initialize: (?model: String, ?document: OcrDocument, ?pages: Array[Integer], ?include_image_base64: bool) -> void
|
|
473
|
-
|
|
475
|
+
def initialize: (?model: String, ?document: OcrDocument, ?pages: Array[Integer], ?include_image_base64: bool) -> void
|
|
476
|
+
end
|
|
474
477
|
|
|
475
|
-
|
|
478
|
+
class OcrResponse
|
|
476
479
|
attr_reader pages: Array[OcrPage]
|
|
477
|
-
|
|
478
|
-
|
|
480
|
+
attr_reader model: String
|
|
481
|
+
attr_reader usage: Usage
|
|
479
482
|
|
|
480
|
-
def initialize: (pages: Array[OcrPage], model: String, ?usage: Usage) -> void
|
|
481
|
-
|
|
483
|
+
def initialize: (pages: Array[OcrPage], model: String, ?usage: Usage) -> void
|
|
484
|
+
end
|
|
482
485
|
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
+
class OcrPage
|
|
487
|
+
attr_reader index: Integer
|
|
488
|
+
attr_reader markdown: String
|
|
486
489
|
attr_reader images: Array[OcrImage]
|
|
487
|
-
|
|
490
|
+
attr_reader dimensions: PageDimensions
|
|
488
491
|
|
|
489
|
-
def initialize: (index: Integer, markdown: String, ?images: Array[OcrImage], ?dimensions: PageDimensions) -> void
|
|
490
|
-
|
|
492
|
+
def initialize: (index: Integer, markdown: String, ?images: Array[OcrImage], ?dimensions: PageDimensions) -> void
|
|
493
|
+
end
|
|
491
494
|
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
+
class OcrImage
|
|
496
|
+
attr_reader id: String
|
|
497
|
+
attr_reader image_base64: String
|
|
495
498
|
|
|
496
499
|
def initialize: (id: String, ?image_base64: String) -> void
|
|
497
|
-
|
|
500
|
+
end
|
|
498
501
|
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
+
class PageDimensions
|
|
503
|
+
attr_reader width: Integer
|
|
504
|
+
attr_reader height: Integer
|
|
502
505
|
|
|
503
506
|
def initialize: (width: Integer, height: Integer) -> void
|
|
504
|
-
|
|
507
|
+
end
|
|
505
508
|
|
|
506
|
-
|
|
507
|
-
|
|
509
|
+
class ModelsListResponse
|
|
510
|
+
attr_accessor object: String?
|
|
508
511
|
attr_accessor data: Array[ModelObject]?
|
|
509
512
|
|
|
510
|
-
def initialize: (?object: String, ?data: Array[ModelObject]) -> void
|
|
511
|
-
|
|
513
|
+
def initialize: (?object: String, ?data: Array[ModelObject]) -> void
|
|
514
|
+
end
|
|
512
515
|
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
516
|
+
class ModelObject
|
|
517
|
+
attr_accessor id: String?
|
|
518
|
+
attr_accessor object: String?
|
|
519
|
+
attr_accessor created: Integer?
|
|
520
|
+
attr_accessor owned_by: String?
|
|
518
521
|
|
|
519
522
|
def initialize: (?id: String, ?object: String, ?created: Integer, ?owned_by: String) -> void
|
|
520
|
-
|
|
523
|
+
end
|
|
521
524
|
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
525
|
+
class CreateFileRequest
|
|
526
|
+
attr_accessor file: String?
|
|
527
|
+
attr_accessor purpose: FilePurpose?
|
|
528
|
+
attr_accessor filename: String?
|
|
526
529
|
|
|
527
530
|
def initialize: (?file: String, ?purpose: FilePurpose, ?filename: String) -> void
|
|
528
|
-
|
|
531
|
+
end
|
|
529
532
|
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
533
|
+
class FileObject
|
|
534
|
+
attr_accessor id: String?
|
|
535
|
+
attr_accessor object: String?
|
|
536
|
+
attr_accessor bytes: Integer?
|
|
537
|
+
attr_accessor created_at: Integer?
|
|
538
|
+
attr_accessor filename: String?
|
|
539
|
+
attr_accessor purpose: String?
|
|
540
|
+
attr_accessor status: String?
|
|
538
541
|
|
|
539
542
|
def initialize: (?id: String, ?object: String, ?bytes: Integer, ?created_at: Integer, ?filename: String, ?purpose: String, ?status: String) -> void
|
|
540
|
-
|
|
543
|
+
end
|
|
541
544
|
|
|
542
|
-
|
|
543
|
-
|
|
545
|
+
class FileListResponse
|
|
546
|
+
attr_accessor object: String?
|
|
544
547
|
attr_accessor data: Array[FileObject]?
|
|
545
|
-
|
|
548
|
+
attr_accessor has_more: bool?
|
|
546
549
|
|
|
547
|
-
def initialize: (?object: String, ?data: Array[FileObject], ?has_more: bool) -> void
|
|
548
|
-
|
|
550
|
+
def initialize: (?object: String, ?data: Array[FileObject], ?has_more: bool) -> void
|
|
551
|
+
end
|
|
549
552
|
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
553
|
+
class FileListQuery
|
|
554
|
+
attr_accessor purpose: String?
|
|
555
|
+
attr_accessor limit: Integer?
|
|
556
|
+
attr_accessor after: String?
|
|
554
557
|
|
|
555
558
|
def initialize: (?purpose: String, ?limit: Integer, ?after: String) -> void
|
|
556
|
-
|
|
559
|
+
end
|
|
557
560
|
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
561
|
+
class DeleteResponse
|
|
562
|
+
attr_accessor id: String?
|
|
563
|
+
attr_accessor object: String?
|
|
564
|
+
attr_accessor deleted: bool?
|
|
562
565
|
|
|
563
566
|
def initialize: (?id: String, ?object: String, ?deleted: bool) -> void
|
|
564
|
-
|
|
567
|
+
end
|
|
565
568
|
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
569
|
+
class CreateBatchRequest
|
|
570
|
+
attr_accessor input_file_id: String?
|
|
571
|
+
attr_accessor endpoint: String?
|
|
572
|
+
attr_accessor completion_window: String?
|
|
573
|
+
attr_accessor metadata: json_value?
|
|
571
574
|
|
|
572
575
|
def initialize: (?input_file_id: String, ?endpoint: String, ?completion_window: String, ?metadata: json_value) -> void
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
576
|
+
end
|
|
577
|
+
|
|
578
|
+
class BatchObject
|
|
579
|
+
attr_accessor id: String?
|
|
580
|
+
attr_accessor object: String?
|
|
581
|
+
attr_accessor endpoint: String?
|
|
582
|
+
attr_accessor input_file_id: String?
|
|
583
|
+
attr_accessor completion_window: String?
|
|
584
|
+
attr_accessor status: BatchStatus?
|
|
585
|
+
attr_accessor output_file_id: String?
|
|
586
|
+
attr_accessor error_file_id: String?
|
|
587
|
+
attr_accessor created_at: Integer?
|
|
588
|
+
attr_accessor completed_at: Integer?
|
|
589
|
+
attr_accessor failed_at: Integer?
|
|
590
|
+
attr_accessor expired_at: Integer?
|
|
591
|
+
attr_accessor request_counts: BatchRequestCounts?
|
|
592
|
+
attr_accessor metadata: json_value?
|
|
590
593
|
|
|
591
594
|
def initialize: (?id: String, ?object: String, ?endpoint: String, ?input_file_id: String, ?completion_window: String, ?status: BatchStatus, ?output_file_id: String, ?error_file_id: String, ?created_at: Integer, ?completed_at: Integer, ?failed_at: Integer, ?expired_at: Integer, ?request_counts: BatchRequestCounts, ?metadata: json_value) -> void
|
|
592
|
-
|
|
595
|
+
end
|
|
593
596
|
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
597
|
+
class BatchRequestCounts
|
|
598
|
+
attr_accessor total: Integer?
|
|
599
|
+
attr_accessor completed: Integer?
|
|
600
|
+
attr_accessor failed: Integer?
|
|
598
601
|
|
|
599
602
|
def initialize: (?total: Integer, ?completed: Integer, ?failed: Integer) -> void
|
|
600
|
-
|
|
603
|
+
end
|
|
601
604
|
|
|
602
|
-
|
|
603
|
-
|
|
605
|
+
class BatchListResponse
|
|
606
|
+
attr_accessor object: String?
|
|
604
607
|
attr_accessor data: Array[BatchObject]?
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
+
attr_accessor has_more: bool?
|
|
609
|
+
attr_accessor first_id: String?
|
|
610
|
+
attr_accessor last_id: String?
|
|
608
611
|
|
|
609
|
-
def initialize: (?object: String, ?data: Array[BatchObject], ?has_more: bool, ?first_id: String, ?last_id: String) -> void
|
|
610
|
-
|
|
612
|
+
def initialize: (?object: String, ?data: Array[BatchObject], ?has_more: bool, ?first_id: String, ?last_id: String) -> void
|
|
613
|
+
end
|
|
611
614
|
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
+
class BatchListQuery
|
|
616
|
+
attr_accessor limit: Integer?
|
|
617
|
+
attr_accessor after: String?
|
|
615
618
|
|
|
616
619
|
def initialize: (?limit: Integer, ?after: String) -> void
|
|
617
|
-
|
|
620
|
+
end
|
|
618
621
|
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
622
|
+
class CreateResponseRequest
|
|
623
|
+
attr_accessor model: String?
|
|
624
|
+
attr_accessor input: json_value?
|
|
625
|
+
attr_accessor instructions: String?
|
|
623
626
|
attr_accessor tools: Array[ResponseTool]?
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
+
attr_accessor temperature: Float?
|
|
628
|
+
attr_accessor max_output_tokens: Integer?
|
|
629
|
+
attr_accessor metadata: json_value?
|
|
627
630
|
|
|
628
|
-
def initialize: (?model: String, ?input: json_value, ?instructions: String, ?tools: Array[ResponseTool], ?temperature: Float, ?max_output_tokens: Integer, ?metadata: json_value) -> void
|
|
629
|
-
|
|
631
|
+
def initialize: (?model: String, ?input: json_value, ?instructions: String, ?tools: Array[ResponseTool], ?temperature: Float, ?max_output_tokens: Integer, ?metadata: json_value) -> void
|
|
632
|
+
end
|
|
630
633
|
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
+
class ResponseTool
|
|
635
|
+
attr_accessor tool_type: String?
|
|
636
|
+
attr_accessor config: json_value?
|
|
634
637
|
|
|
635
638
|
def initialize: (?tool_type: String, ?config: json_value) -> void
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
639
|
+
end
|
|
640
|
+
|
|
641
|
+
class ResponseObject
|
|
642
|
+
attr_accessor id: String?
|
|
643
|
+
attr_accessor object: String?
|
|
644
|
+
attr_accessor created_at: Integer?
|
|
645
|
+
attr_accessor model: String?
|
|
646
|
+
attr_accessor status: String?
|
|
644
647
|
attr_accessor output: Array[ResponseOutputItem]?
|
|
645
|
-
|
|
646
|
-
|
|
648
|
+
attr_accessor usage: ResponseUsage?
|
|
649
|
+
attr_accessor error: json_value?
|
|
647
650
|
|
|
648
|
-
def initialize: (?id: String, ?object: String, ?created_at: Integer, ?model: String, ?status: String, ?output: Array[ResponseOutputItem], ?usage: ResponseUsage, ?error: json_value) -> void
|
|
649
|
-
|
|
651
|
+
def initialize: (?id: String, ?object: String, ?created_at: Integer, ?model: String, ?status: String, ?output: Array[ResponseOutputItem], ?usage: ResponseUsage, ?error: json_value) -> void
|
|
652
|
+
end
|
|
650
653
|
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
+
class ResponseOutputItem
|
|
655
|
+
attr_accessor item_type: String?
|
|
656
|
+
attr_accessor content: json_value?
|
|
654
657
|
|
|
655
658
|
def initialize: (?item_type: String, ?content: json_value) -> void
|
|
656
|
-
|
|
659
|
+
end
|
|
657
660
|
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
661
|
+
class ResponseUsage
|
|
662
|
+
attr_accessor input_tokens: Integer?
|
|
663
|
+
attr_accessor output_tokens: Integer?
|
|
664
|
+
attr_accessor total_tokens: Integer?
|
|
662
665
|
|
|
663
666
|
def initialize: (?input_tokens: Integer, ?output_tokens: Integer, ?total_tokens: Integer) -> void
|
|
664
|
-
|
|
667
|
+
end
|
|
665
668
|
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
669
|
+
class WaitForBatchConfig
|
|
670
|
+
attr_accessor initial_interval_secs: Float?
|
|
671
|
+
attr_accessor max_interval_secs: Float?
|
|
672
|
+
attr_accessor backoff_multiplier: Float?
|
|
673
|
+
attr_accessor timeout_secs: Float?
|
|
671
674
|
|
|
672
675
|
def initialize: (?initial_interval_secs: Float, ?max_interval_secs: Float, ?backoff_multiplier: Float, ?timeout_secs: Float) -> void
|
|
673
676
|
def self.default: () -> WaitForBatchConfig
|
|
674
|
-
|
|
677
|
+
end
|
|
675
678
|
|
|
676
|
-
|
|
679
|
+
class DefaultClient
|
|
677
680
|
def chat: (ChatCompletionRequest req) -> ChatCompletionResponse
|
|
678
|
-
def chat_stream: (ChatCompletionRequest req) -> Enumerator[ChatStreamIterator]
|
|
681
|
+
def chat_stream: (ChatCompletionRequest req) -> Enumerator[ChatStreamIterator]
|
|
679
682
|
def embed: (EmbeddingRequest req) -> EmbeddingResponse
|
|
680
683
|
def list_models: () -> ModelsListResponse
|
|
681
684
|
def image_generate: (CreateImageRequest req) -> ImagesResponse
|
|
@@ -699,222 +702,281 @@ def chat_stream: (ChatCompletionRequest req) -> Enumerator[ChatStreamIterator]
|
|
|
699
702
|
def create_response: (CreateResponseRequest req) -> ResponseObject
|
|
700
703
|
def retrieve_response: (String response_id) -> ResponseObject
|
|
701
704
|
def cancel_response: (String response_id) -> ResponseObject
|
|
702
|
-
|
|
705
|
+
end
|
|
703
706
|
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
707
|
+
class CustomProviderConfig
|
|
708
|
+
attr_reader name: String
|
|
709
|
+
attr_reader base_url: String
|
|
710
|
+
attr_reader auth_header: AuthHeaderFormat
|
|
708
711
|
attr_reader model_prefixes: Array[String]
|
|
709
712
|
|
|
710
|
-
def initialize: (name: String, base_url: String, auth_header: AuthHeaderFormat, model_prefixes: Array[String]) -> void
|
|
711
|
-
|
|
713
|
+
def initialize: (name: String, base_url: String, auth_header: AuthHeaderFormat, model_prefixes: Array[String]) -> void
|
|
714
|
+
end
|
|
712
715
|
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
716
|
+
class ProviderCapabilities
|
|
717
|
+
attr_accessor vision: bool?
|
|
718
|
+
attr_accessor reasoning: bool?
|
|
719
|
+
attr_accessor structured_output: bool?
|
|
720
|
+
attr_accessor function_calling: bool?
|
|
721
|
+
attr_accessor audio_in: bool?
|
|
722
|
+
attr_accessor audio_out: bool?
|
|
723
|
+
attr_accessor video_in: bool?
|
|
721
724
|
|
|
722
725
|
def initialize: (?vision: bool, ?reasoning: bool, ?structured_output: bool, ?function_calling: bool, ?audio_in: bool, ?audio_out: bool, ?video_in: bool) -> void
|
|
723
|
-
|
|
726
|
+
end
|
|
724
727
|
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
728
|
+
class ProviderConfig
|
|
729
|
+
attr_reader name: String
|
|
730
|
+
attr_reader display_name: String
|
|
731
|
+
attr_reader base_url: String
|
|
732
|
+
attr_reader auth: AuthConfig
|
|
730
733
|
attr_reader endpoints: Array[String]
|
|
731
734
|
attr_reader model_prefixes: Array[String]
|
|
732
735
|
attr_reader param_mappings: Hash[String, String]
|
|
733
736
|
|
|
734
|
-
def initialize: (name: String, ?display_name: String, ?base_url: String, ?auth: AuthConfig, ?endpoints: Array[String], ?model_prefixes: Array[String], ?param_mappings: Hash[String, String]) -> void
|
|
735
|
-
|
|
737
|
+
def initialize: (name: String, ?display_name: String, ?base_url: String, ?auth: AuthConfig, ?endpoints: Array[String], ?model_prefixes: Array[String], ?param_mappings: Hash[String, String]) -> void
|
|
738
|
+
end
|
|
736
739
|
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
+
class AuthConfig
|
|
741
|
+
attr_reader auth_type: AuthType
|
|
742
|
+
attr_reader env_var: String
|
|
740
743
|
|
|
741
744
|
def initialize: (auth_type: AuthType, ?env_var: String) -> void
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
745
|
+
end
|
|
746
|
+
|
|
747
|
+
class ModelInfo
|
|
748
|
+
attr_accessor input_cost_per_token: Float?
|
|
749
|
+
attr_accessor output_cost_per_token: Float?
|
|
750
|
+
attr_accessor cache_read_input_token_cost: Float?
|
|
751
|
+
attr_accessor cache_creation_input_token_cost: Float?
|
|
752
|
+
attr_accessor input_cost_per_audio_token: Float?
|
|
753
|
+
attr_accessor output_cost_per_audio_token: Float?
|
|
754
|
+
attr_accessor output_cost_per_reasoning_token: Float?
|
|
755
|
+
attr_accessor max_tokens: Integer?
|
|
756
|
+
attr_accessor max_input_tokens: Integer?
|
|
757
|
+
attr_accessor max_output_tokens: Integer?
|
|
758
|
+
attr_accessor mode: String?
|
|
759
|
+
attr_accessor supports_vision: bool?
|
|
760
|
+
attr_accessor supports_function_calling: bool?
|
|
761
|
+
attr_accessor supports_reasoning: bool?
|
|
762
|
+
attr_accessor supports_structured_output: bool?
|
|
763
|
+
attr_accessor supports_audio_input: bool?
|
|
764
|
+
attr_accessor supports_audio_output: bool?
|
|
765
|
+
attr_accessor supports_prompt_caching: bool?
|
|
766
|
+
attr_accessor tiers: Array[ModelTier]?
|
|
767
|
+
|
|
768
|
+
def initialize: (?input_cost_per_token: Float, ?output_cost_per_token: Float, ?cache_read_input_token_cost: Float, ?cache_creation_input_token_cost: Float, ?input_cost_per_audio_token: Float, ?output_cost_per_audio_token: Float, ?output_cost_per_reasoning_token: Float, ?max_tokens: Integer, ?max_input_tokens: Integer, ?max_output_tokens: Integer, ?mode: String, ?supports_vision: bool, ?supports_function_calling: bool, ?supports_reasoning: bool, ?supports_structured_output: bool, ?supports_audio_input: bool, ?supports_audio_output: bool, ?supports_prompt_caching: bool, ?tiers: Array[ModelTier]) -> void
|
|
769
|
+
end
|
|
770
|
+
|
|
771
|
+
class ModelTier
|
|
772
|
+
attr_accessor min_context_tokens: Integer?
|
|
773
|
+
attr_accessor input_cost_per_token: Float?
|
|
774
|
+
attr_accessor output_cost_per_token: Float?
|
|
775
|
+
attr_accessor cache_read_input_token_cost: Float?
|
|
776
|
+
attr_accessor cache_creation_input_token_cost: Float?
|
|
777
|
+
attr_accessor input_cost_per_audio_token: Float?
|
|
778
|
+
attr_accessor output_cost_per_audio_token: Float?
|
|
779
|
+
attr_accessor output_cost_per_reasoning_token: Float?
|
|
780
|
+
|
|
781
|
+
def initialize: (?min_context_tokens: Integer, ?input_cost_per_token: Float, ?output_cost_per_token: Float, ?cache_read_input_token_cost: Float, ?cache_creation_input_token_cost: Float, ?input_cost_per_audio_token: Float, ?output_cost_per_audio_token: Float, ?output_cost_per_reasoning_token: Float) -> void
|
|
782
|
+
end
|
|
783
|
+
|
|
784
|
+
class BudgetConfig
|
|
785
|
+
attr_accessor global_limit: Float?
|
|
746
786
|
attr_accessor model_limits: Hash[String, Float]?
|
|
747
|
-
|
|
787
|
+
attr_accessor enforcement: Enforcement?
|
|
748
788
|
|
|
749
|
-
def initialize: (?global_limit: Float, ?model_limits: Hash[String, Float], ?enforcement: Enforcement) -> void
|
|
789
|
+
def initialize: (?global_limit: Float, ?model_limits: Hash[String, Float], ?enforcement: Enforcement) -> void
|
|
750
790
|
def self.default: () -> BudgetConfig
|
|
751
|
-
|
|
791
|
+
end
|
|
752
792
|
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
793
|
+
class CacheConfig
|
|
794
|
+
attr_accessor max_entries: Integer?
|
|
795
|
+
attr_accessor ttl: Integer?
|
|
796
|
+
attr_accessor backend: CacheBackend?
|
|
757
797
|
|
|
758
798
|
def initialize: (?max_entries: Integer, ?ttl: Integer, ?backend: CacheBackend) -> void
|
|
759
799
|
def self.default: () -> CacheConfig
|
|
760
|
-
|
|
800
|
+
end
|
|
761
801
|
|
|
762
|
-
|
|
763
|
-
|
|
802
|
+
class SingleflightResult
|
|
803
|
+
end
|
|
764
804
|
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
805
|
+
class RateLimitConfig
|
|
806
|
+
attr_accessor rpm: Integer?
|
|
807
|
+
attr_accessor tpm: Integer?
|
|
808
|
+
attr_accessor window: Integer?
|
|
769
809
|
|
|
770
810
|
def initialize: (?rpm: Integer, ?tpm: Integer, ?window: Integer) -> void
|
|
771
811
|
def self.default: () -> RateLimitConfig
|
|
772
|
-
|
|
812
|
+
end
|
|
773
813
|
|
|
774
|
-
|
|
775
|
-
|
|
814
|
+
class IntentPrototype
|
|
815
|
+
attr_reader name: String
|
|
776
816
|
attr_reader embedding: Array[Float]
|
|
777
|
-
|
|
817
|
+
attr_reader model: String
|
|
818
|
+
|
|
819
|
+
def initialize: (name: String, embedding: Array[Float], model: String) -> void
|
|
820
|
+
end
|
|
778
821
|
|
|
779
|
-
|
|
780
|
-
|
|
822
|
+
class CatalogRefreshConfig
|
|
823
|
+
attr_accessor enabled: bool?
|
|
824
|
+
attr_accessor source_url: String?
|
|
825
|
+
attr_accessor ttl_seconds: Integer?
|
|
826
|
+
attr_accessor cache_path: String?
|
|
781
827
|
|
|
782
|
-
|
|
783
|
-
|
|
828
|
+
def initialize: (?enabled: bool, ?source_url: String, ?ttl_seconds: Integer, ?cache_path: String) -> void
|
|
829
|
+
def self.default: () -> CatalogRefreshConfig
|
|
830
|
+
end
|
|
784
831
|
|
|
785
|
-
|
|
786
|
-
|
|
832
|
+
class Message
|
|
833
|
+
end
|
|
787
834
|
|
|
788
|
-
|
|
789
|
-
|
|
835
|
+
class UserContent
|
|
836
|
+
end
|
|
790
837
|
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
end
|
|
838
|
+
class ContentPart
|
|
839
|
+
end
|
|
794
840
|
|
|
795
|
-
|
|
796
|
-
|
|
841
|
+
class ImageDetail
|
|
842
|
+
type value = :low | :high | :auto
|
|
843
|
+
end
|
|
797
844
|
|
|
798
|
-
|
|
799
|
-
|
|
845
|
+
class AssistantContent
|
|
846
|
+
end
|
|
800
847
|
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
end
|
|
848
|
+
class AssistantPart
|
|
849
|
+
end
|
|
804
850
|
|
|
805
|
-
|
|
806
|
-
|
|
851
|
+
class ToolType
|
|
852
|
+
type value = :function
|
|
853
|
+
end
|
|
807
854
|
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
end
|
|
855
|
+
class ToolChoice
|
|
856
|
+
end
|
|
811
857
|
|
|
812
|
-
|
|
813
|
-
|
|
858
|
+
class ToolChoiceMode
|
|
859
|
+
type value = :auto | :required | :none
|
|
860
|
+
end
|
|
814
861
|
|
|
815
|
-
|
|
816
|
-
|
|
862
|
+
class ResponseFormat
|
|
863
|
+
end
|
|
817
864
|
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
end
|
|
865
|
+
class StopSequence
|
|
866
|
+
end
|
|
821
867
|
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
868
|
+
class Modality
|
|
869
|
+
type value = :text | :audio | :image
|
|
870
|
+
end
|
|
825
871
|
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
872
|
+
class FinishReason
|
|
873
|
+
type value = :stop | :length | :tool_calls | :content_filter | :function_call | :other
|
|
874
|
+
end
|
|
829
875
|
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
876
|
+
class ReasoningEffort
|
|
877
|
+
type value = :low | :medium | :high
|
|
878
|
+
end
|
|
833
879
|
|
|
834
|
-
|
|
835
|
-
|
|
880
|
+
class EmbeddingFormat
|
|
881
|
+
type value = :float | :base64
|
|
882
|
+
end
|
|
836
883
|
|
|
837
|
-
|
|
838
|
-
|
|
884
|
+
class EmbeddingInput
|
|
885
|
+
end
|
|
839
886
|
|
|
840
|
-
|
|
887
|
+
class ModerationInput
|
|
888
|
+
end
|
|
889
|
+
|
|
890
|
+
class RerankDocument
|
|
841
891
|
def self.object: (String text) -> RerankDocument
|
|
842
892
|
|
|
843
|
-
|
|
893
|
+
end
|
|
894
|
+
|
|
895
|
+
class OcrDocument
|
|
896
|
+
end
|
|
897
|
+
|
|
898
|
+
class FilePurpose
|
|
899
|
+
type value = :assistants | :batch | :fine_tune | :vision
|
|
900
|
+
end
|
|
901
|
+
|
|
902
|
+
class BatchStatus
|
|
903
|
+
type value = :validating | :failed | :in_progress | :finalizing | :completed | :expired | :cancelling | :cancelled
|
|
904
|
+
end
|
|
905
|
+
|
|
906
|
+
class AuthHeaderFormat
|
|
907
|
+
end
|
|
908
|
+
|
|
909
|
+
class StreamFormat
|
|
910
|
+
type value = :sse | :aws_event_stream
|
|
911
|
+
end
|
|
844
912
|
|
|
845
|
-
|
|
846
|
-
|
|
913
|
+
class AuthType
|
|
914
|
+
type value = :bearer | :api_key | :none | :unknown
|
|
915
|
+
end
|
|
847
916
|
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
917
|
+
class Enforcement
|
|
918
|
+
type value = :hard | :soft
|
|
919
|
+
end
|
|
851
920
|
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
end
|
|
921
|
+
class CacheBackend
|
|
922
|
+
end
|
|
855
923
|
|
|
856
|
-
|
|
857
|
-
|
|
924
|
+
class CircuitState
|
|
925
|
+
type value = :closed | :open | :half_open
|
|
926
|
+
end
|
|
858
927
|
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
928
|
+
class HealthStatus
|
|
929
|
+
type value = :healthy | :unhealthy
|
|
930
|
+
end
|
|
862
931
|
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
932
|
+
class RefreshOutcome
|
|
933
|
+
type value = :disabled | :from_cache | :fetched
|
|
934
|
+
end
|
|
866
935
|
|
|
867
|
-
|
|
868
|
-
type value = :hard | :soft
|
|
869
|
-
end
|
|
936
|
+
def self.create_client: (String api_key, ?String base_url, ?Integer timeout_secs, ?Integer max_retries, ?String model_hint) -> DefaultClient
|
|
870
937
|
|
|
871
|
-
|
|
872
|
-
end
|
|
938
|
+
def self.create_client_from_json: (String json) -> DefaultClient
|
|
873
939
|
|
|
874
|
-
|
|
875
|
-
type value = :closed | :open | :half_open
|
|
876
|
-
end
|
|
940
|
+
def self.encode_data_url: (String bytes, ?String mime) -> String
|
|
877
941
|
|
|
878
|
-
|
|
879
|
-
type value = :healthy | :unhealthy
|
|
880
|
-
end
|
|
942
|
+
def self.decode_data_url: (String url) -> DecodedDataUrl?
|
|
881
943
|
|
|
882
|
-
def self.
|
|
944
|
+
def self.register_custom_provider: (CustomProviderConfig config) -> void
|
|
883
945
|
|
|
884
|
-
def self.
|
|
946
|
+
def self.unregister_custom_provider: (String name) -> bool
|
|
885
947
|
|
|
886
|
-
def self.
|
|
948
|
+
def self.capabilities: (String provider_name) -> ProviderCapabilities
|
|
887
949
|
|
|
888
|
-
def self.
|
|
950
|
+
def self.all_providers: () -> Array[ProviderConfig]
|
|
889
951
|
|
|
890
|
-
def self.
|
|
952
|
+
def self.complex_provider_names: () -> Array[String]
|
|
891
953
|
|
|
892
|
-
def self.
|
|
954
|
+
def self.completion_cost: (String model, Integer prompt_tokens, Integer completion_tokens) -> Float?
|
|
893
955
|
|
|
894
|
-
def self.
|
|
956
|
+
def self.completion_cost_with_cache: (String model, Integer prompt_tokens, Integer cached_tokens, Integer completion_tokens) -> Float?
|
|
895
957
|
|
|
896
|
-
def self.
|
|
958
|
+
def self.model_info: (String model) -> ModelInfo?
|
|
897
959
|
|
|
898
|
-
def self.
|
|
960
|
+
def self.clear: () -> void
|
|
899
961
|
|
|
900
|
-
def self.
|
|
962
|
+
def self.count_tokens: (String model, String text) -> Integer
|
|
901
963
|
|
|
902
|
-
def self.
|
|
964
|
+
def self.count_request_tokens: (String model, ChatCompletionRequest req) -> Integer
|
|
903
965
|
|
|
904
|
-
def self.
|
|
966
|
+
def self.check_bound: (String context, Integer current_len, Integer incoming, Integer limit) -> void
|
|
905
967
|
|
|
906
|
-
def self.
|
|
968
|
+
def self.ensure_crypto_provider: () -> void
|
|
907
969
|
|
|
908
|
-
def self.
|
|
970
|
+
def self.install_catalog_overlay_from_str: (String catalog_json) -> void
|
|
909
971
|
|
|
910
|
-
def self.
|
|
972
|
+
def self.clear_catalog_overlay: () -> void
|
|
911
973
|
|
|
912
|
-
def self.
|
|
974
|
+
def self.refresh_catalog: (CatalogRefreshConfig config) -> RefreshOutcome
|
|
913
975
|
|
|
914
|
-
|
|
976
|
+
class LiterLlmErrorInfo
|
|
915
977
|
def status_code: () -> Integer
|
|
916
978
|
def transient?: () -> bool
|
|
917
979
|
def error_type: () -> String
|
|
918
|
-
|
|
980
|
+
end
|
|
919
981
|
|
|
920
982
|
end
|