liter_llm 1.18.0-aarch64-linux → 1.18.3-aarch64-linux

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