Class: LiteLLMClient::FilesApi

Inherits:
Object
  • Object
show all
Defined in:
lib/litellm_client/api/files_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ FilesApi

Returns a new instance of FilesApi.



19
20
21
# File 'lib/litellm_client/api/files_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/litellm_client/api/files_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#create_file_files_post(purpose, file, opts = {}) ⇒ Object

Create File Upload a file that can be used across - Assistants API, Batch API This is the equivalent of POST api.openai.com/v1/files Supports Identical Params as: platform.openai.com/docs/api-reference/files/create Example Curl “‘ curl localhost:4000/v1/files -H "Authorization: Bearer sk-1234" -F purpose="batch" -F file="@mydata.jsonl" “`

Parameters:

  • purpose (String)
  • file (File)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :provider (String)
  • :target_model_names (String) — default: default to ''
  • :custom_llm_provider (String) — default: default to 'openai'

Returns:

  • (Object)


31
32
33
34
# File 'lib/litellm_client/api/files_api.rb', line 31

def create_file_files_post(purpose, file, opts = {})
  data, _status_code, _headers = create_file_files_post_with_http_info(purpose, file, opts)
  data
end

#create_file_files_post_with_http_info(purpose, file, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Create File Upload a file that can be used across - Assistants API, Batch API This is the equivalent of POST api.openai.com/v1/files Supports Identical Params as: platform.openai.com/docs/api-reference/files/create Example Curl &#x60;&#x60;&#x60; curl localhost:4000/v1/files -H &quot;Authorization: Bearer sk-1234&quot; -F purpose&#x3D;&quot;batch&quot; -F file&#x3D;&quot;@mydata.jsonl&quot; &#x60;&#x60;&#x60;

Parameters:

  • purpose (String)
  • file (File)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :provider (String)
  • :target_model_names (String) — default: default to ''
  • :custom_llm_provider (String) — default: default to 'openai'

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# File 'lib/litellm_client/api/files_api.rb', line 45

def create_file_files_post_with_http_info(purpose, file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FilesApi.create_file_files_post ...'
  end
  # verify the required parameter 'purpose' is set
  if @api_client.config.client_side_validation && purpose.nil?
    fail ArgumentError, "Missing the required parameter 'purpose' when calling FilesApi.create_file_files_post"
  end
  # verify the required parameter 'file' is set
  if @api_client.config.client_side_validation && file.nil?
    fail ArgumentError, "Missing the required parameter 'file' when calling FilesApi.create_file_files_post"
  end
  # resource path
  local_var_path = '/files'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'provider'] = opts[:'provider'] if !opts[:'provider'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['multipart/form-data'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['purpose'] = purpose
  form_params['file'] = file
  form_params['target_model_names'] = opts[:'target_model_names'] if !opts[:'target_model_names'].nil?
  form_params['custom_llm_provider'] = opts[:'custom_llm_provider'] if !opts[:'custom_llm_provider'].nil?

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['APIKeyHeader']

  new_options = opts.merge(
    :operation => :"FilesApi.create_file_files_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FilesApi#create_file_files_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_file_provider_v1_files_post(provider, purpose, file, opts = {}) ⇒ Object

Create File Upload a file that can be used across - Assistants API, Batch API This is the equivalent of POST api.openai.com/v1/files Supports Identical Params as: platform.openai.com/docs/api-reference/files/create Example Curl “‘ curl localhost:4000/v1/files -H "Authorization: Bearer sk-1234" -F purpose="batch" -F file="@mydata.jsonl" “`

Parameters:

  • provider (String)
  • purpose (String)
  • file (File)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :target_model_names (String) — default: default to ''
  • :custom_llm_provider (String) — default: default to 'openai'

Returns:

  • (Object)


116
117
118
119
# File 'lib/litellm_client/api/files_api.rb', line 116

def create_file_provider_v1_files_post(provider, purpose, file, opts = {})
  data, _status_code, _headers = create_file_provider_v1_files_post_with_http_info(provider, purpose, file, opts)
  data
end

#create_file_provider_v1_files_post_with_http_info(provider, purpose, file, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Create File Upload a file that can be used across - Assistants API, Batch API This is the equivalent of POST api.openai.com/v1/files Supports Identical Params as: platform.openai.com/docs/api-reference/files/create Example Curl &#x60;&#x60;&#x60; curl localhost:4000/v1/files -H &quot;Authorization: Bearer sk-1234&quot; -F purpose&#x3D;&quot;batch&quot; -F file&#x3D;&quot;@mydata.jsonl&quot; &#x60;&#x60;&#x60;

Parameters:

  • provider (String)
  • purpose (String)
  • file (File)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :target_model_names (String) — default: default to ''
  • :custom_llm_provider (String) — default: default to 'openai'

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
# File 'lib/litellm_client/api/files_api.rb', line 130

def create_file_provider_v1_files_post_with_http_info(provider, purpose, file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FilesApi.create_file_provider_v1_files_post ...'
  end
  # verify the required parameter 'purpose' is set
  if @api_client.config.client_side_validation && purpose.nil?
    fail ArgumentError, "Missing the required parameter 'purpose' when calling FilesApi.create_file_provider_v1_files_post"
  end
  # verify the required parameter 'file' is set
  if @api_client.config.client_side_validation && file.nil?
    fail ArgumentError, "Missing the required parameter 'file' when calling FilesApi.create_file_provider_v1_files_post"
  end
  # resource path
  local_var_path = '/{provider}/v1/files'.sub('{' + 'provider' + '}', CGI.escape(provider.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['multipart/form-data'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['purpose'] = purpose
  form_params['file'] = file
  form_params['target_model_names'] = opts[:'target_model_names'] if !opts[:'target_model_names'].nil?
  form_params['custom_llm_provider'] = opts[:'custom_llm_provider'] if !opts[:'custom_llm_provider'].nil?

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['APIKeyHeader']

  new_options = opts.merge(
    :operation => :"FilesApi.create_file_provider_v1_files_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FilesApi#create_file_provider_v1_files_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_file_v1_files_post(purpose, file, opts = {}) ⇒ Object

Create File Upload a file that can be used across - Assistants API, Batch API This is the equivalent of POST api.openai.com/v1/files Supports Identical Params as: platform.openai.com/docs/api-reference/files/create Example Curl “‘ curl localhost:4000/v1/files -H "Authorization: Bearer sk-1234" -F purpose="batch" -F file="@mydata.jsonl" “`

Parameters:

  • purpose (String)
  • file (File)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :provider (String)
  • :target_model_names (String) — default: default to ''
  • :custom_llm_provider (String) — default: default to 'openai'

Returns:

  • (Object)


200
201
202
203
# File 'lib/litellm_client/api/files_api.rb', line 200

def create_file_v1_files_post(purpose, file, opts = {})
  data, _status_code, _headers = create_file_v1_files_post_with_http_info(purpose, file, opts)
  data
end

#create_file_v1_files_post_with_http_info(purpose, file, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Create File Upload a file that can be used across - Assistants API, Batch API This is the equivalent of POST api.openai.com/v1/files Supports Identical Params as: platform.openai.com/docs/api-reference/files/create Example Curl &#x60;&#x60;&#x60; curl localhost:4000/v1/files -H &quot;Authorization: Bearer sk-1234&quot; -F purpose&#x3D;&quot;batch&quot; -F file&#x3D;&quot;@mydata.jsonl&quot; &#x60;&#x60;&#x60;

Parameters:

  • purpose (String)
  • file (File)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :provider (String)
  • :target_model_names (String) — default: default to ''
  • :custom_llm_provider (String) — default: default to 'openai'

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
# File 'lib/litellm_client/api/files_api.rb', line 214

def create_file_v1_files_post_with_http_info(purpose, file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FilesApi.create_file_v1_files_post ...'
  end
  # verify the required parameter 'purpose' is set
  if @api_client.config.client_side_validation && purpose.nil?
    fail ArgumentError, "Missing the required parameter 'purpose' when calling FilesApi.create_file_v1_files_post"
  end
  # verify the required parameter 'file' is set
  if @api_client.config.client_side_validation && file.nil?
    fail ArgumentError, "Missing the required parameter 'file' when calling FilesApi.create_file_v1_files_post"
  end
  # resource path
  local_var_path = '/v1/files'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'provider'] = opts[:'provider'] if !opts[:'provider'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['multipart/form-data'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['purpose'] = purpose
  form_params['file'] = file
  form_params['target_model_names'] = opts[:'target_model_names'] if !opts[:'target_model_names'].nil?
  form_params['custom_llm_provider'] = opts[:'custom_llm_provider'] if !opts[:'custom_llm_provider'].nil?

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['APIKeyHeader']

  new_options = opts.merge(
    :operation => :"FilesApi.create_file_v1_files_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FilesApi#create_file_v1_files_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_file_files_file_id_delete(file_id, opts = {}) ⇒ Object

Delete File Deletes a specified file. that can be used across - Assistants API, Batch API This is the equivalent of DELETE api.openai.com/v1/files/file_id Supports Identical Params as: platform.openai.com/docs/api-reference/files/delete Example Curl “‘ curl localhost:4000/v1/files/file-abc123 -X DELETE -H "Authorization: Bearer $OPENAI_API_KEY" “`

Parameters:

  • file_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :provider (String)

Returns:

  • (Object)


282
283
284
285
# File 'lib/litellm_client/api/files_api.rb', line 282

def delete_file_files_file_id_delete(file_id, opts = {})
  data, _status_code, _headers = delete_file_files_file_id_delete_with_http_info(file_id, opts)
  data
end

#delete_file_files_file_id_delete_with_http_info(file_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Delete File Deletes a specified file. that can be used across - Assistants API, Batch API This is the equivalent of DELETE api.openai.com/v1/files/file_id Supports Identical Params as: platform.openai.com/docs/api-reference/files/delete Example Curl &#x60;&#x60;&#x60; curl localhost:4000/v1/files/file-abc123 -X DELETE -H &quot;Authorization: Bearer $OPENAI_API_KEY&quot; &#x60;&#x60;&#x60;

Parameters:

  • file_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :provider (String)

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
# File 'lib/litellm_client/api/files_api.rb', line 293

def delete_file_files_file_id_delete_with_http_info(file_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FilesApi.delete_file_files_file_id_delete ...'
  end
  # verify the required parameter 'file_id' is set
  if @api_client.config.client_side_validation && file_id.nil?
    fail ArgumentError, "Missing the required parameter 'file_id' when calling FilesApi.delete_file_files_file_id_delete"
  end
  # resource path
  local_var_path = '/files/{file_id}'.sub('{' + 'file_id' + '}', CGI.escape(file_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'provider'] = opts[:'provider'] if !opts[:'provider'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['APIKeyHeader']

  new_options = opts.merge(
    :operation => :"FilesApi.delete_file_files_file_id_delete",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FilesApi#delete_file_files_file_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_file_provider_v1_files_file_id_delete(file_id, provider, opts = {}) ⇒ Object

Delete File Deletes a specified file. that can be used across - Assistants API, Batch API This is the equivalent of DELETE api.openai.com/v1/files/file_id Supports Identical Params as: platform.openai.com/docs/api-reference/files/delete Example Curl “‘ curl localhost:4000/v1/files/file-abc123 -X DELETE -H "Authorization: Bearer $OPENAI_API_KEY" “`

Parameters:

  • file_id (String)
  • provider (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


348
349
350
351
# File 'lib/litellm_client/api/files_api.rb', line 348

def delete_file_provider_v1_files_file_id_delete(file_id, provider, opts = {})
  data, _status_code, _headers = delete_file_provider_v1_files_file_id_delete_with_http_info(file_id, provider, opts)
  data
end

#delete_file_provider_v1_files_file_id_delete_with_http_info(file_id, provider, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Delete File Deletes a specified file. that can be used across - Assistants API, Batch API This is the equivalent of DELETE api.openai.com/v1/files/file_id Supports Identical Params as: platform.openai.com/docs/api-reference/files/delete Example Curl &#x60;&#x60;&#x60; curl localhost:4000/v1/files/file-abc123 -X DELETE -H &quot;Authorization: Bearer $OPENAI_API_KEY&quot; &#x60;&#x60;&#x60;

Parameters:

  • file_id (String)
  • provider (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
# File 'lib/litellm_client/api/files_api.rb', line 359

def delete_file_provider_v1_files_file_id_delete_with_http_info(file_id, provider, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FilesApi.delete_file_provider_v1_files_file_id_delete ...'
  end
  # verify the required parameter 'file_id' is set
  if @api_client.config.client_side_validation && file_id.nil?
    fail ArgumentError, "Missing the required parameter 'file_id' when calling FilesApi.delete_file_provider_v1_files_file_id_delete"
  end
  # resource path
  local_var_path = '/{provider}/v1/files/{file_id}'.sub('{' + 'file_id' + '}', CGI.escape(file_id.to_s)).sub('{' + 'provider' + '}', CGI.escape(provider.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['APIKeyHeader']

  new_options = opts.merge(
    :operation => :"FilesApi.delete_file_provider_v1_files_file_id_delete",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FilesApi#delete_file_provider_v1_files_file_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_file_v1_files_file_id_delete(file_id, opts = {}) ⇒ Object

Delete File Deletes a specified file. that can be used across - Assistants API, Batch API This is the equivalent of DELETE api.openai.com/v1/files/file_id Supports Identical Params as: platform.openai.com/docs/api-reference/files/delete Example Curl “‘ curl localhost:4000/v1/files/file-abc123 -X DELETE -H "Authorization: Bearer $OPENAI_API_KEY" “`

Parameters:

  • file_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :provider (String)

Returns:

  • (Object)


413
414
415
416
# File 'lib/litellm_client/api/files_api.rb', line 413

def delete_file_v1_files_file_id_delete(file_id, opts = {})
  data, _status_code, _headers = delete_file_v1_files_file_id_delete_with_http_info(file_id, opts)
  data
end

#delete_file_v1_files_file_id_delete_with_http_info(file_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Delete File Deletes a specified file. that can be used across - Assistants API, Batch API This is the equivalent of DELETE api.openai.com/v1/files/file_id Supports Identical Params as: platform.openai.com/docs/api-reference/files/delete Example Curl &#x60;&#x60;&#x60; curl localhost:4000/v1/files/file-abc123 -X DELETE -H &quot;Authorization: Bearer $OPENAI_API_KEY&quot; &#x60;&#x60;&#x60;

Parameters:

  • file_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :provider (String)

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
# File 'lib/litellm_client/api/files_api.rb', line 424

def delete_file_v1_files_file_id_delete_with_http_info(file_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FilesApi.delete_file_v1_files_file_id_delete ...'
  end
  # verify the required parameter 'file_id' is set
  if @api_client.config.client_side_validation && file_id.nil?
    fail ArgumentError, "Missing the required parameter 'file_id' when calling FilesApi.delete_file_v1_files_file_id_delete"
  end
  # resource path
  local_var_path = '/v1/files/{file_id}'.sub('{' + 'file_id' + '}', CGI.escape(file_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'provider'] = opts[:'provider'] if !opts[:'provider'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['APIKeyHeader']

  new_options = opts.merge(
    :operation => :"FilesApi.delete_file_v1_files_file_id_delete",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FilesApi#delete_file_v1_files_file_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_file_content_files_file_id_content_get(file_id, opts = {}) ⇒ Object

Get File Content Returns information about a specific file. that can be used across - Assistants API, Batch API This is the equivalent of GET api.openai.com/v1/files/file_id/content Supports Identical Params as: platform.openai.com/docs/api-reference/files/retrieve-contents Example Curl “‘ curl localhost:4000/v1/files/file-abc123/content -H "Authorization: Bearer sk-1234" “`

Parameters:

  • file_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :provider (String)

Returns:

  • (Object)


479
480
481
482
# File 'lib/litellm_client/api/files_api.rb', line 479

def get_file_content_files_file_id_content_get(file_id, opts = {})
  data, _status_code, _headers = get_file_content_files_file_id_content_get_with_http_info(file_id, opts)
  data
end

#get_file_content_files_file_id_content_get_with_http_info(file_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Get File Content Returns information about a specific file. that can be used across - Assistants API, Batch API This is the equivalent of GET api.openai.com/v1/files/file_id/content Supports Identical Params as: platform.openai.com/docs/api-reference/files/retrieve-contents Example Curl &#x60;&#x60;&#x60; curl localhost:4000/v1/files/file-abc123/content -H &quot;Authorization: Bearer sk-1234&quot; &#x60;&#x60;&#x60;

Parameters:

  • file_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :provider (String)

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
# File 'lib/litellm_client/api/files_api.rb', line 490

def get_file_content_files_file_id_content_get_with_http_info(file_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FilesApi.get_file_content_files_file_id_content_get ...'
  end
  # verify the required parameter 'file_id' is set
  if @api_client.config.client_side_validation && file_id.nil?
    fail ArgumentError, "Missing the required parameter 'file_id' when calling FilesApi.get_file_content_files_file_id_content_get"
  end
  # resource path
  local_var_path = '/files/{file_id}/content'.sub('{' + 'file_id' + '}', CGI.escape(file_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'provider'] = opts[:'provider'] if !opts[:'provider'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['APIKeyHeader']

  new_options = opts.merge(
    :operation => :"FilesApi.get_file_content_files_file_id_content_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FilesApi#get_file_content_files_file_id_content_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_file_content_provider_v1_files_file_id_content_get(file_id, provider, opts = {}) ⇒ Object

Get File Content Returns information about a specific file. that can be used across - Assistants API, Batch API This is the equivalent of GET api.openai.com/v1/files/file_id/content Supports Identical Params as: platform.openai.com/docs/api-reference/files/retrieve-contents Example Curl “‘ curl localhost:4000/v1/files/file-abc123/content -H "Authorization: Bearer sk-1234" “`

Parameters:

  • file_id (String)
  • provider (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


545
546
547
548
# File 'lib/litellm_client/api/files_api.rb', line 545

def get_file_content_provider_v1_files_file_id_content_get(file_id, provider, opts = {})
  data, _status_code, _headers = get_file_content_provider_v1_files_file_id_content_get_with_http_info(file_id, provider, opts)
  data
end

#get_file_content_provider_v1_files_file_id_content_get_with_http_info(file_id, provider, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Get File Content Returns information about a specific file. that can be used across - Assistants API, Batch API This is the equivalent of GET api.openai.com/v1/files/file_id/content Supports Identical Params as: platform.openai.com/docs/api-reference/files/retrieve-contents Example Curl &#x60;&#x60;&#x60; curl localhost:4000/v1/files/file-abc123/content -H &quot;Authorization: Bearer sk-1234&quot; &#x60;&#x60;&#x60;

Parameters:

  • file_id (String)
  • provider (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
# File 'lib/litellm_client/api/files_api.rb', line 556

def get_file_content_provider_v1_files_file_id_content_get_with_http_info(file_id, provider, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FilesApi.get_file_content_provider_v1_files_file_id_content_get ...'
  end
  # verify the required parameter 'file_id' is set
  if @api_client.config.client_side_validation && file_id.nil?
    fail ArgumentError, "Missing the required parameter 'file_id' when calling FilesApi.get_file_content_provider_v1_files_file_id_content_get"
  end
  # resource path
  local_var_path = '/{provider}/v1/files/{file_id}/content'.sub('{' + 'file_id' + '}', CGI.escape(file_id.to_s)).sub('{' + 'provider' + '}', CGI.escape(provider.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['APIKeyHeader']

  new_options = opts.merge(
    :operation => :"FilesApi.get_file_content_provider_v1_files_file_id_content_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FilesApi#get_file_content_provider_v1_files_file_id_content_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_file_content_v1_files_file_id_content_get(file_id, opts = {}) ⇒ Object

Get File Content Returns information about a specific file. that can be used across - Assistants API, Batch API This is the equivalent of GET api.openai.com/v1/files/file_id/content Supports Identical Params as: platform.openai.com/docs/api-reference/files/retrieve-contents Example Curl “‘ curl localhost:4000/v1/files/file-abc123/content -H "Authorization: Bearer sk-1234" “`

Parameters:

  • file_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :provider (String)

Returns:

  • (Object)


610
611
612
613
# File 'lib/litellm_client/api/files_api.rb', line 610

def get_file_content_v1_files_file_id_content_get(file_id, opts = {})
  data, _status_code, _headers = get_file_content_v1_files_file_id_content_get_with_http_info(file_id, opts)
  data
end

#get_file_content_v1_files_file_id_content_get_with_http_info(file_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Get File Content Returns information about a specific file. that can be used across - Assistants API, Batch API This is the equivalent of GET api.openai.com/v1/files/file_id/content Supports Identical Params as: platform.openai.com/docs/api-reference/files/retrieve-contents Example Curl &#x60;&#x60;&#x60; curl localhost:4000/v1/files/file-abc123/content -H &quot;Authorization: Bearer sk-1234&quot; &#x60;&#x60;&#x60;

Parameters:

  • file_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :provider (String)

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
# File 'lib/litellm_client/api/files_api.rb', line 621

def get_file_content_v1_files_file_id_content_get_with_http_info(file_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FilesApi.get_file_content_v1_files_file_id_content_get ...'
  end
  # verify the required parameter 'file_id' is set
  if @api_client.config.client_side_validation && file_id.nil?
    fail ArgumentError, "Missing the required parameter 'file_id' when calling FilesApi.get_file_content_v1_files_file_id_content_get"
  end
  # resource path
  local_var_path = '/v1/files/{file_id}/content'.sub('{' + 'file_id' + '}', CGI.escape(file_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'provider'] = opts[:'provider'] if !opts[:'provider'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['APIKeyHeader']

  new_options = opts.merge(
    :operation => :"FilesApi.get_file_content_v1_files_file_id_content_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FilesApi#get_file_content_v1_files_file_id_content_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_file_files_file_id_get(file_id, opts = {}) ⇒ Object

Get File Returns information about a specific file. that can be used across - Assistants API, Batch API This is the equivalent of GET api.openai.com/v1/files/file_id Supports Identical Params as: platform.openai.com/docs/api-reference/files/retrieve Example Curl “‘ curl localhost:4000/v1/files/file-abc123 -H "Authorization: Bearer sk-1234" “`

Parameters:

  • file_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :provider (String)

Returns:

  • (Object)


676
677
678
679
# File 'lib/litellm_client/api/files_api.rb', line 676

def get_file_files_file_id_get(file_id, opts = {})
  data, _status_code, _headers = get_file_files_file_id_get_with_http_info(file_id, opts)
  data
end

#get_file_files_file_id_get_with_http_info(file_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Get File Returns information about a specific file. that can be used across - Assistants API, Batch API This is the equivalent of GET api.openai.com/v1/files/file_id Supports Identical Params as: platform.openai.com/docs/api-reference/files/retrieve Example Curl &#x60;&#x60;&#x60; curl localhost:4000/v1/files/file-abc123 -H &quot;Authorization: Bearer sk-1234&quot; &#x60;&#x60;&#x60;

Parameters:

  • file_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :provider (String)

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
# File 'lib/litellm_client/api/files_api.rb', line 687

def get_file_files_file_id_get_with_http_info(file_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FilesApi.get_file_files_file_id_get ...'
  end
  # verify the required parameter 'file_id' is set
  if @api_client.config.client_side_validation && file_id.nil?
    fail ArgumentError, "Missing the required parameter 'file_id' when calling FilesApi.get_file_files_file_id_get"
  end
  # resource path
  local_var_path = '/files/{file_id}'.sub('{' + 'file_id' + '}', CGI.escape(file_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'provider'] = opts[:'provider'] if !opts[:'provider'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['APIKeyHeader']

  new_options = opts.merge(
    :operation => :"FilesApi.get_file_files_file_id_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FilesApi#get_file_files_file_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_file_provider_v1_files_file_id_get(file_id, provider, opts = {}) ⇒ Object

Get File Returns information about a specific file. that can be used across - Assistants API, Batch API This is the equivalent of GET api.openai.com/v1/files/file_id Supports Identical Params as: platform.openai.com/docs/api-reference/files/retrieve Example Curl “‘ curl localhost:4000/v1/files/file-abc123 -H "Authorization: Bearer sk-1234" “`

Parameters:

  • file_id (String)
  • provider (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


742
743
744
745
# File 'lib/litellm_client/api/files_api.rb', line 742

def get_file_provider_v1_files_file_id_get(file_id, provider, opts = {})
  data, _status_code, _headers = get_file_provider_v1_files_file_id_get_with_http_info(file_id, provider, opts)
  data
end

#get_file_provider_v1_files_file_id_get_with_http_info(file_id, provider, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Get File Returns information about a specific file. that can be used across - Assistants API, Batch API This is the equivalent of GET api.openai.com/v1/files/file_id Supports Identical Params as: platform.openai.com/docs/api-reference/files/retrieve Example Curl &#x60;&#x60;&#x60; curl localhost:4000/v1/files/file-abc123 -H &quot;Authorization: Bearer sk-1234&quot; &#x60;&#x60;&#x60;

Parameters:

  • file_id (String)
  • provider (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
# File 'lib/litellm_client/api/files_api.rb', line 753

def get_file_provider_v1_files_file_id_get_with_http_info(file_id, provider, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FilesApi.get_file_provider_v1_files_file_id_get ...'
  end
  # verify the required parameter 'file_id' is set
  if @api_client.config.client_side_validation && file_id.nil?
    fail ArgumentError, "Missing the required parameter 'file_id' when calling FilesApi.get_file_provider_v1_files_file_id_get"
  end
  # resource path
  local_var_path = '/{provider}/v1/files/{file_id}'.sub('{' + 'file_id' + '}', CGI.escape(file_id.to_s)).sub('{' + 'provider' + '}', CGI.escape(provider.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['APIKeyHeader']

  new_options = opts.merge(
    :operation => :"FilesApi.get_file_provider_v1_files_file_id_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FilesApi#get_file_provider_v1_files_file_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_file_v1_files_file_id_get(file_id, opts = {}) ⇒ Object

Get File Returns information about a specific file. that can be used across - Assistants API, Batch API This is the equivalent of GET api.openai.com/v1/files/file_id Supports Identical Params as: platform.openai.com/docs/api-reference/files/retrieve Example Curl “‘ curl localhost:4000/v1/files/file-abc123 -H "Authorization: Bearer sk-1234" “`

Parameters:

  • file_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :provider (String)

Returns:

  • (Object)


807
808
809
810
# File 'lib/litellm_client/api/files_api.rb', line 807

def get_file_v1_files_file_id_get(file_id, opts = {})
  data, _status_code, _headers = get_file_v1_files_file_id_get_with_http_info(file_id, opts)
  data
end

#get_file_v1_files_file_id_get_with_http_info(file_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Get File Returns information about a specific file. that can be used across - Assistants API, Batch API This is the equivalent of GET api.openai.com/v1/files/file_id Supports Identical Params as: platform.openai.com/docs/api-reference/files/retrieve Example Curl &#x60;&#x60;&#x60; curl localhost:4000/v1/files/file-abc123 -H &quot;Authorization: Bearer sk-1234&quot; &#x60;&#x60;&#x60;

Parameters:

  • file_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :provider (String)

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
# File 'lib/litellm_client/api/files_api.rb', line 818

def get_file_v1_files_file_id_get_with_http_info(file_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FilesApi.get_file_v1_files_file_id_get ...'
  end
  # verify the required parameter 'file_id' is set
  if @api_client.config.client_side_validation && file_id.nil?
    fail ArgumentError, "Missing the required parameter 'file_id' when calling FilesApi.get_file_v1_files_file_id_get"
  end
  # resource path
  local_var_path = '/v1/files/{file_id}'.sub('{' + 'file_id' + '}', CGI.escape(file_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'provider'] = opts[:'provider'] if !opts[:'provider'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['APIKeyHeader']

  new_options = opts.merge(
    :operation => :"FilesApi.get_file_v1_files_file_id_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FilesApi#get_file_v1_files_file_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_files_files_get(opts = {}) ⇒ Object

List Files Returns information about a specific file. that can be used across - Assistants API, Batch API This is the equivalent of GET api.openai.com/v1/files/ Supports Identical Params as: platform.openai.com/docs/api-reference/files/list Example Curl “‘ curl localhost:4000/v1/files -H "Authorization: Bearer sk-1234" “`

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :provider (String)
  • :target_model_names (String)
  • :purpose (String)

Returns:

  • (Object)


874
875
876
877
# File 'lib/litellm_client/api/files_api.rb', line 874

def list_files_files_get(opts = {})
  data, _status_code, _headers = list_files_files_get_with_http_info(opts)
  data
end

#list_files_files_get_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>

List Files Returns information about a specific file. that can be used across - Assistants API, Batch API This is the equivalent of GET api.openai.com/v1/files/ Supports Identical Params as: platform.openai.com/docs/api-reference/files/list Example Curl &#x60;&#x60;&#x60; curl localhost:4000/v1/files -H &quot;Authorization: Bearer sk-1234&quot; &#x60;&#x60;&#x60;

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :provider (String)
  • :target_model_names (String)
  • :purpose (String)

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
# File 'lib/litellm_client/api/files_api.rb', line 886

def list_files_files_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FilesApi.list_files_files_get ...'
  end
  # resource path
  local_var_path = '/files'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'provider'] = opts[:'provider'] if !opts[:'provider'].nil?
  query_params[:'target_model_names'] = opts[:'target_model_names'] if !opts[:'target_model_names'].nil?
  query_params[:'purpose'] = opts[:'purpose'] if !opts[:'purpose'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['APIKeyHeader']

  new_options = opts.merge(
    :operation => :"FilesApi.list_files_files_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FilesApi#list_files_files_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_files_provider_v1_files_get(provider, opts = {}) ⇒ Object

List Files Returns information about a specific file. that can be used across - Assistants API, Batch API This is the equivalent of GET api.openai.com/v1/files/ Supports Identical Params as: platform.openai.com/docs/api-reference/files/list Example Curl “‘ curl localhost:4000/v1/files -H "Authorization: Bearer sk-1234" “`

Parameters:

  • provider (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :target_model_names (String)
  • :purpose (String)

Returns:

  • (Object)


940
941
942
943
# File 'lib/litellm_client/api/files_api.rb', line 940

def list_files_provider_v1_files_get(provider, opts = {})
  data, _status_code, _headers = list_files_provider_v1_files_get_with_http_info(provider, opts)
  data
end

#list_files_provider_v1_files_get_with_http_info(provider, opts = {}) ⇒ Array<(Object, Integer, Hash)>

List Files Returns information about a specific file. that can be used across - Assistants API, Batch API This is the equivalent of GET api.openai.com/v1/files/ Supports Identical Params as: platform.openai.com/docs/api-reference/files/list Example Curl &#x60;&#x60;&#x60; curl localhost:4000/v1/files -H &quot;Authorization: Bearer sk-1234&quot; &#x60;&#x60;&#x60;

Parameters:

  • provider (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :target_model_names (String)
  • :purpose (String)

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
# File 'lib/litellm_client/api/files_api.rb', line 952

def list_files_provider_v1_files_get_with_http_info(provider, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FilesApi.list_files_provider_v1_files_get ...'
  end
  # resource path
  local_var_path = '/{provider}/v1/files'.sub('{' + 'provider' + '}', CGI.escape(provider.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'target_model_names'] = opts[:'target_model_names'] if !opts[:'target_model_names'].nil?
  query_params[:'purpose'] = opts[:'purpose'] if !opts[:'purpose'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['APIKeyHeader']

  new_options = opts.merge(
    :operation => :"FilesApi.list_files_provider_v1_files_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FilesApi#list_files_provider_v1_files_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_files_v1_files_get(opts = {}) ⇒ Object

List Files Returns information about a specific file. that can be used across - Assistants API, Batch API This is the equivalent of GET api.openai.com/v1/files/ Supports Identical Params as: platform.openai.com/docs/api-reference/files/list Example Curl “‘ curl localhost:4000/v1/files -H "Authorization: Bearer sk-1234" “`

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :provider (String)
  • :target_model_names (String)
  • :purpose (String)

Returns:

  • (Object)


1005
1006
1007
1008
# File 'lib/litellm_client/api/files_api.rb', line 1005

def list_files_v1_files_get(opts = {})
  data, _status_code, _headers = list_files_v1_files_get_with_http_info(opts)
  data
end

#list_files_v1_files_get_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>

List Files Returns information about a specific file. that can be used across - Assistants API, Batch API This is the equivalent of GET api.openai.com/v1/files/ Supports Identical Params as: platform.openai.com/docs/api-reference/files/list Example Curl &#x60;&#x60;&#x60; curl localhost:4000/v1/files -H &quot;Authorization: Bearer sk-1234&quot; &#x60;&#x60;&#x60;

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :provider (String)
  • :target_model_names (String)
  • :purpose (String)

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
# File 'lib/litellm_client/api/files_api.rb', line 1017

def list_files_v1_files_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FilesApi.list_files_v1_files_get ...'
  end
  # resource path
  local_var_path = '/v1/files'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'provider'] = opts[:'provider'] if !opts[:'provider'].nil?
  query_params[:'target_model_names'] = opts[:'target_model_names'] if !opts[:'target_model_names'].nil?
  query_params[:'purpose'] = opts[:'purpose'] if !opts[:'purpose'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['APIKeyHeader']

  new_options = opts.merge(
    :operation => :"FilesApi.list_files_v1_files_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FilesApi#list_files_v1_files_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end