Class: LiteLLMClient::AssistantsApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ AssistantsApi

Returns a new instance of AssistantsApi.



19
20
21
# File 'lib/litellm_client/api/assistants_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/assistants_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#add_messages_threads_thread_id_messages_post(thread_id, opts = {}) ⇒ Object

Add Messages Create a message. API Reference - platform.openai.com/docs/api-reference/messages/createMessage

Parameters:

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

    the optional parameters

Returns:

  • (Object)


27
28
29
30
# File 'lib/litellm_client/api/assistants_api.rb', line 27

def add_messages_threads_thread_id_messages_post(thread_id, opts = {})
  data, _status_code, _headers = add_messages_threads_thread_id_messages_post_with_http_info(thread_id, opts)
  data
end

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

Add Messages Create a message. API Reference - platform.openai.com/docs/api-reference/messages/createMessage

Parameters:

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

    the optional parameters

Returns:

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

    Object data, response status code and response headers



37
38
39
40
41
42
43
44
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
# File 'lib/litellm_client/api/assistants_api.rb', line 37

def add_messages_threads_thread_id_messages_post_with_http_info(thread_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AssistantsApi.add_messages_threads_thread_id_messages_post ...'
  end
  # verify the required parameter 'thread_id' is set
  if @api_client.config.client_side_validation && thread_id.nil?
    fail ArgumentError, "Missing the required parameter 'thread_id' when calling AssistantsApi.add_messages_threads_thread_id_messages_post"
  end
  # resource path
  local_var_path = '/threads/{thread_id}/messages'.sub('{' + 'thread_id' + '}', CGI.escape(thread_id.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 => :"AssistantsApi.add_messages_threads_thread_id_messages_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: AssistantsApi#add_messages_threads_thread_id_messages_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#add_messages_v1_threads_thread_id_messages_post(thread_id, opts = {}) ⇒ Object

Add Messages Create a message. API Reference - platform.openai.com/docs/api-reference/messages/createMessage

Parameters:

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

    the optional parameters

Returns:

  • (Object)


90
91
92
93
# File 'lib/litellm_client/api/assistants_api.rb', line 90

def add_messages_v1_threads_thread_id_messages_post(thread_id, opts = {})
  data, _status_code, _headers = add_messages_v1_threads_thread_id_messages_post_with_http_info(thread_id, opts)
  data
end

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

Add Messages Create a message. API Reference - platform.openai.com/docs/api-reference/messages/createMessage

Parameters:

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

    the optional parameters

Returns:

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

    Object data, response status code and response headers



100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# File 'lib/litellm_client/api/assistants_api.rb', line 100

def add_messages_v1_threads_thread_id_messages_post_with_http_info(thread_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AssistantsApi.add_messages_v1_threads_thread_id_messages_post ...'
  end
  # verify the required parameter 'thread_id' is set
  if @api_client.config.client_side_validation && thread_id.nil?
    fail ArgumentError, "Missing the required parameter 'thread_id' when calling AssistantsApi.add_messages_v1_threads_thread_id_messages_post"
  end
  # resource path
  local_var_path = '/v1/threads/{thread_id}/messages'.sub('{' + 'thread_id' + '}', CGI.escape(thread_id.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 => :"AssistantsApi.add_messages_v1_threads_thread_id_messages_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: AssistantsApi#add_messages_v1_threads_thread_id_messages_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_assistant_assistants_post(opts = {}) ⇒ Object

Create Assistant Create assistant API Reference docs - platform.openai.com/docs/api-reference/assistants/createAssistant

Parameters:

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

    the optional parameters

Returns:

  • (Object)


152
153
154
155
# File 'lib/litellm_client/api/assistants_api.rb', line 152

def create_assistant_assistants_post(opts = {})
  data, _status_code, _headers = create_assistant_assistants_post_with_http_info(opts)
  data
end

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

Create Assistant Create assistant API Reference docs - platform.openai.com/docs/api-reference/assistants/createAssistant

Parameters:

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

    the optional parameters

Returns:

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

    Object data, response status code and response headers



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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
# File 'lib/litellm_client/api/assistants_api.rb', line 161

def create_assistant_assistants_post_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AssistantsApi.create_assistant_assistants_post ...'
  end
  # resource path
  local_var_path = '/assistants'

  # 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 => :"AssistantsApi.create_assistant_assistants_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: AssistantsApi#create_assistant_assistants_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_assistant_v1_assistants_post(opts = {}) ⇒ Object

Create Assistant Create assistant API Reference docs - platform.openai.com/docs/api-reference/assistants/createAssistant

Parameters:

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

    the optional parameters

Returns:

  • (Object)


209
210
211
212
# File 'lib/litellm_client/api/assistants_api.rb', line 209

def create_assistant_v1_assistants_post(opts = {})
  data, _status_code, _headers = create_assistant_v1_assistants_post_with_http_info(opts)
  data
end

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

Create Assistant Create assistant API Reference docs - platform.openai.com/docs/api-reference/assistants/createAssistant

Parameters:

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

    the optional parameters

Returns:

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

    Object data, response status code and response headers



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
# File 'lib/litellm_client/api/assistants_api.rb', line 218

def create_assistant_v1_assistants_post_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AssistantsApi.create_assistant_v1_assistants_post ...'
  end
  # resource path
  local_var_path = '/v1/assistants'

  # 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 => :"AssistantsApi.create_assistant_v1_assistants_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: AssistantsApi#create_assistant_v1_assistants_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_threads_threads_post(opts = {}) ⇒ Object

Create Threads Create a thread. API Reference - platform.openai.com/docs/api-reference/threads/createThread

Parameters:

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

    the optional parameters

Returns:

  • (Object)


266
267
268
269
# File 'lib/litellm_client/api/assistants_api.rb', line 266

def create_threads_threads_post(opts = {})
  data, _status_code, _headers = create_threads_threads_post_with_http_info(opts)
  data
end

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

Create Threads Create a thread. API Reference - platform.openai.com/docs/api-reference/threads/createThread

Parameters:

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

    the optional parameters

Returns:

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

    Object data, response status code and response headers



275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
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
# File 'lib/litellm_client/api/assistants_api.rb', line 275

def create_threads_threads_post_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AssistantsApi.create_threads_threads_post ...'
  end
  # resource path
  local_var_path = '/threads'

  # 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 => :"AssistantsApi.create_threads_threads_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: AssistantsApi#create_threads_threads_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_threads_v1_threads_post(opts = {}) ⇒ Object

Create Threads Create a thread. API Reference - platform.openai.com/docs/api-reference/threads/createThread

Parameters:

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

    the optional parameters

Returns:

  • (Object)


323
324
325
326
# File 'lib/litellm_client/api/assistants_api.rb', line 323

def create_threads_v1_threads_post(opts = {})
  data, _status_code, _headers = create_threads_v1_threads_post_with_http_info(opts)
  data
end

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

Create Threads Create a thread. API Reference - platform.openai.com/docs/api-reference/threads/createThread

Parameters:

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

    the optional parameters

Returns:

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

    Object data, response status code and response headers



332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
# File 'lib/litellm_client/api/assistants_api.rb', line 332

def create_threads_v1_threads_post_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AssistantsApi.create_threads_v1_threads_post ...'
  end
  # resource path
  local_var_path = '/v1/threads'

  # 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 => :"AssistantsApi.create_threads_v1_threads_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: AssistantsApi#create_threads_v1_threads_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_assistant_assistants_assistant_id_delete(assistant_id, opts = {}) ⇒ Object

Delete Assistant Delete assistant API Reference docs - platform.openai.com/docs/api-reference/assistants/createAssistant

Parameters:

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

    the optional parameters

Returns:

  • (Object)


381
382
383
384
# File 'lib/litellm_client/api/assistants_api.rb', line 381

def delete_assistant_assistants_assistant_id_delete(assistant_id, opts = {})
  data, _status_code, _headers = delete_assistant_assistants_assistant_id_delete_with_http_info(assistant_id, opts)
  data
end

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

Delete Assistant Delete assistant API Reference docs - platform.openai.com/docs/api-reference/assistants/createAssistant

Parameters:

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

    the optional parameters

Returns:

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

    Object data, response status code and response headers



391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
# File 'lib/litellm_client/api/assistants_api.rb', line 391

def delete_assistant_assistants_assistant_id_delete_with_http_info(assistant_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AssistantsApi.delete_assistant_assistants_assistant_id_delete ...'
  end
  # verify the required parameter 'assistant_id' is set
  if @api_client.config.client_side_validation && assistant_id.nil?
    fail ArgumentError, "Missing the required parameter 'assistant_id' when calling AssistantsApi.delete_assistant_assistants_assistant_id_delete"
  end
  # resource path
  local_var_path = '/assistants/{assistant_id}'.sub('{' + 'assistant_id' + '}', CGI.escape(assistant_id.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 => :"AssistantsApi.delete_assistant_assistants_assistant_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: AssistantsApi#delete_assistant_assistants_assistant_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_assistant_v1_assistants_assistant_id_delete(assistant_id, opts = {}) ⇒ Object

Delete Assistant Delete assistant API Reference docs - platform.openai.com/docs/api-reference/assistants/createAssistant

Parameters:

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

    the optional parameters

Returns:

  • (Object)


444
445
446
447
# File 'lib/litellm_client/api/assistants_api.rb', line 444

def delete_assistant_v1_assistants_assistant_id_delete(assistant_id, opts = {})
  data, _status_code, _headers = delete_assistant_v1_assistants_assistant_id_delete_with_http_info(assistant_id, opts)
  data
end

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

Delete Assistant Delete assistant API Reference docs - platform.openai.com/docs/api-reference/assistants/createAssistant

Parameters:

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

    the optional parameters

Returns:

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

    Object data, response status code and response headers



454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
# File 'lib/litellm_client/api/assistants_api.rb', line 454

def delete_assistant_v1_assistants_assistant_id_delete_with_http_info(assistant_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AssistantsApi.delete_assistant_v1_assistants_assistant_id_delete ...'
  end
  # verify the required parameter 'assistant_id' is set
  if @api_client.config.client_side_validation && assistant_id.nil?
    fail ArgumentError, "Missing the required parameter 'assistant_id' when calling AssistantsApi.delete_assistant_v1_assistants_assistant_id_delete"
  end
  # resource path
  local_var_path = '/v1/assistants/{assistant_id}'.sub('{' + 'assistant_id' + '}', CGI.escape(assistant_id.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 => :"AssistantsApi.delete_assistant_v1_assistants_assistant_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: AssistantsApi#delete_assistant_v1_assistants_assistant_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_assistants_assistants_get(opts = {}) ⇒ Object

Get Assistants Returns a list of assistants. API Reference docs - platform.openai.com/docs/api-reference/assistants/listAssistants

Parameters:

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

    the optional parameters

Returns:

  • (Object)


506
507
508
509
# File 'lib/litellm_client/api/assistants_api.rb', line 506

def get_assistants_assistants_get(opts = {})
  data, _status_code, _headers = get_assistants_assistants_get_with_http_info(opts)
  data
end

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

Get Assistants Returns a list of assistants. API Reference docs - platform.openai.com/docs/api-reference/assistants/listAssistants

Parameters:

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

    the optional parameters

Returns:

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

    Object data, response status code and response headers



515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
# File 'lib/litellm_client/api/assistants_api.rb', line 515

def get_assistants_assistants_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AssistantsApi.get_assistants_assistants_get ...'
  end
  # resource path
  local_var_path = '/assistants'

  # 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 => :"AssistantsApi.get_assistants_assistants_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: AssistantsApi#get_assistants_assistants_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_assistants_v1_assistants_get(opts = {}) ⇒ Object

Get Assistants Returns a list of assistants. API Reference docs - platform.openai.com/docs/api-reference/assistants/listAssistants

Parameters:

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

    the optional parameters

Returns:

  • (Object)


563
564
565
566
# File 'lib/litellm_client/api/assistants_api.rb', line 563

def get_assistants_v1_assistants_get(opts = {})
  data, _status_code, _headers = get_assistants_v1_assistants_get_with_http_info(opts)
  data
end

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

Get Assistants Returns a list of assistants. API Reference docs - platform.openai.com/docs/api-reference/assistants/listAssistants

Parameters:

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

    the optional parameters

Returns:

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

    Object data, response status code and response headers



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
603
604
605
606
607
608
609
610
611
612
613
614
# File 'lib/litellm_client/api/assistants_api.rb', line 572

def get_assistants_v1_assistants_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AssistantsApi.get_assistants_v1_assistants_get ...'
  end
  # resource path
  local_var_path = '/v1/assistants'

  # 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 => :"AssistantsApi.get_assistants_v1_assistants_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: AssistantsApi#get_assistants_v1_assistants_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_messages_threads_thread_id_messages_get(thread_id, opts = {}) ⇒ Object

Get Messages Returns a list of messages for a given thread. API Reference - platform.openai.com/docs/api-reference/messages/listMessages

Parameters:

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

    the optional parameters

Returns:

  • (Object)


621
622
623
624
# File 'lib/litellm_client/api/assistants_api.rb', line 621

def get_messages_threads_thread_id_messages_get(thread_id, opts = {})
  data, _status_code, _headers = get_messages_threads_thread_id_messages_get_with_http_info(thread_id, opts)
  data
end

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

Get Messages Returns a list of messages for a given thread. API Reference - platform.openai.com/docs/api-reference/messages/listMessages

Parameters:

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

    the optional parameters

Returns:

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

    Object data, response status code and response headers



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
669
670
671
672
673
674
675
676
677
# File 'lib/litellm_client/api/assistants_api.rb', line 631

def get_messages_threads_thread_id_messages_get_with_http_info(thread_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AssistantsApi.get_messages_threads_thread_id_messages_get ...'
  end
  # verify the required parameter 'thread_id' is set
  if @api_client.config.client_side_validation && thread_id.nil?
    fail ArgumentError, "Missing the required parameter 'thread_id' when calling AssistantsApi.get_messages_threads_thread_id_messages_get"
  end
  # resource path
  local_var_path = '/threads/{thread_id}/messages'.sub('{' + 'thread_id' + '}', CGI.escape(thread_id.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 => :"AssistantsApi.get_messages_threads_thread_id_messages_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: AssistantsApi#get_messages_threads_thread_id_messages_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_messages_v1_threads_thread_id_messages_get(thread_id, opts = {}) ⇒ Object

Get Messages Returns a list of messages for a given thread. API Reference - platform.openai.com/docs/api-reference/messages/listMessages

Parameters:

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

    the optional parameters

Returns:

  • (Object)


684
685
686
687
# File 'lib/litellm_client/api/assistants_api.rb', line 684

def get_messages_v1_threads_thread_id_messages_get(thread_id, opts = {})
  data, _status_code, _headers = get_messages_v1_threads_thread_id_messages_get_with_http_info(thread_id, opts)
  data
end

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

Get Messages Returns a list of messages for a given thread. API Reference - platform.openai.com/docs/api-reference/messages/listMessages

Parameters:

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

    the optional parameters

Returns:

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

    Object data, response status code and response headers



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
735
736
737
738
739
740
# File 'lib/litellm_client/api/assistants_api.rb', line 694

def get_messages_v1_threads_thread_id_messages_get_with_http_info(thread_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AssistantsApi.get_messages_v1_threads_thread_id_messages_get ...'
  end
  # verify the required parameter 'thread_id' is set
  if @api_client.config.client_side_validation && thread_id.nil?
    fail ArgumentError, "Missing the required parameter 'thread_id' when calling AssistantsApi.get_messages_v1_threads_thread_id_messages_get"
  end
  # resource path
  local_var_path = '/v1/threads/{thread_id}/messages'.sub('{' + 'thread_id' + '}', CGI.escape(thread_id.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 => :"AssistantsApi.get_messages_v1_threads_thread_id_messages_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: AssistantsApi#get_messages_v1_threads_thread_id_messages_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_thread_threads_thread_id_get(thread_id, opts = {}) ⇒ Object

Get Thread Retrieves a thread. API Reference - platform.openai.com/docs/api-reference/threads/getThread

Parameters:

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

    the optional parameters

Returns:

  • (Object)


747
748
749
750
# File 'lib/litellm_client/api/assistants_api.rb', line 747

def get_thread_threads_thread_id_get(thread_id, opts = {})
  data, _status_code, _headers = get_thread_threads_thread_id_get_with_http_info(thread_id, opts)
  data
end

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

Get Thread Retrieves a thread. API Reference - platform.openai.com/docs/api-reference/threads/getThread

Parameters:

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

    the optional parameters

Returns:

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

    Object data, response status code and response headers



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
800
801
802
803
# File 'lib/litellm_client/api/assistants_api.rb', line 757

def get_thread_threads_thread_id_get_with_http_info(thread_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AssistantsApi.get_thread_threads_thread_id_get ...'
  end
  # verify the required parameter 'thread_id' is set
  if @api_client.config.client_side_validation && thread_id.nil?
    fail ArgumentError, "Missing the required parameter 'thread_id' when calling AssistantsApi.get_thread_threads_thread_id_get"
  end
  # resource path
  local_var_path = '/threads/{thread_id}'.sub('{' + 'thread_id' + '}', CGI.escape(thread_id.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 => :"AssistantsApi.get_thread_threads_thread_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: AssistantsApi#get_thread_threads_thread_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_thread_v1_threads_thread_id_get(thread_id, opts = {}) ⇒ Object

Get Thread Retrieves a thread. API Reference - platform.openai.com/docs/api-reference/threads/getThread

Parameters:

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

    the optional parameters

Returns:

  • (Object)


810
811
812
813
# File 'lib/litellm_client/api/assistants_api.rb', line 810

def get_thread_v1_threads_thread_id_get(thread_id, opts = {})
  data, _status_code, _headers = get_thread_v1_threads_thread_id_get_with_http_info(thread_id, opts)
  data
end

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

Get Thread Retrieves a thread. API Reference - platform.openai.com/docs/api-reference/threads/getThread

Parameters:

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

    the optional parameters

Returns:

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

    Object data, response status code and response headers



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
866
# File 'lib/litellm_client/api/assistants_api.rb', line 820

def get_thread_v1_threads_thread_id_get_with_http_info(thread_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AssistantsApi.get_thread_v1_threads_thread_id_get ...'
  end
  # verify the required parameter 'thread_id' is set
  if @api_client.config.client_side_validation && thread_id.nil?
    fail ArgumentError, "Missing the required parameter 'thread_id' when calling AssistantsApi.get_thread_v1_threads_thread_id_get"
  end
  # resource path
  local_var_path = '/v1/threads/{thread_id}'.sub('{' + 'thread_id' + '}', CGI.escape(thread_id.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 => :"AssistantsApi.get_thread_v1_threads_thread_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: AssistantsApi#get_thread_v1_threads_thread_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#run_thread_threads_thread_id_runs_post(thread_id, opts = {}) ⇒ Object

Run Thread Create a run. API Reference: platform.openai.com/docs/api-reference/runs/createRun

Parameters:

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

    the optional parameters

Returns:

  • (Object)


873
874
875
876
# File 'lib/litellm_client/api/assistants_api.rb', line 873

def run_thread_threads_thread_id_runs_post(thread_id, opts = {})
  data, _status_code, _headers = run_thread_threads_thread_id_runs_post_with_http_info(thread_id, opts)
  data
end

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

Run Thread Create a run. API Reference: platform.openai.com/docs/api-reference/runs/createRun

Parameters:

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

    the optional parameters

Returns:

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

    Object data, response status code and response headers



883
884
885
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
# File 'lib/litellm_client/api/assistants_api.rb', line 883

def run_thread_threads_thread_id_runs_post_with_http_info(thread_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AssistantsApi.run_thread_threads_thread_id_runs_post ...'
  end
  # verify the required parameter 'thread_id' is set
  if @api_client.config.client_side_validation && thread_id.nil?
    fail ArgumentError, "Missing the required parameter 'thread_id' when calling AssistantsApi.run_thread_threads_thread_id_runs_post"
  end
  # resource path
  local_var_path = '/threads/{thread_id}/runs'.sub('{' + 'thread_id' + '}', CGI.escape(thread_id.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 => :"AssistantsApi.run_thread_threads_thread_id_runs_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: AssistantsApi#run_thread_threads_thread_id_runs_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#run_thread_v1_threads_thread_id_runs_post(thread_id, opts = {}) ⇒ Object

Run Thread Create a run. API Reference: platform.openai.com/docs/api-reference/runs/createRun

Parameters:

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

    the optional parameters

Returns:

  • (Object)


936
937
938
939
# File 'lib/litellm_client/api/assistants_api.rb', line 936

def run_thread_v1_threads_thread_id_runs_post(thread_id, opts = {})
  data, _status_code, _headers = run_thread_v1_threads_thread_id_runs_post_with_http_info(thread_id, opts)
  data
end

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

Run Thread Create a run. API Reference: platform.openai.com/docs/api-reference/runs/createRun

Parameters:

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

    the optional parameters

Returns:

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

    Object data, response status code and response headers



946
947
948
949
950
951
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
# File 'lib/litellm_client/api/assistants_api.rb', line 946

def run_thread_v1_threads_thread_id_runs_post_with_http_info(thread_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AssistantsApi.run_thread_v1_threads_thread_id_runs_post ...'
  end
  # verify the required parameter 'thread_id' is set
  if @api_client.config.client_side_validation && thread_id.nil?
    fail ArgumentError, "Missing the required parameter 'thread_id' when calling AssistantsApi.run_thread_v1_threads_thread_id_runs_post"
  end
  # resource path
  local_var_path = '/v1/threads/{thread_id}/runs'.sub('{' + 'thread_id' + '}', CGI.escape(thread_id.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 => :"AssistantsApi.run_thread_v1_threads_thread_id_runs_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: AssistantsApi#run_thread_v1_threads_thread_id_runs_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end