Class: LiteLLMClient::TagManagementApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ TagManagementApi

Returns a new instance of TagManagementApi.



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

def api_client
  @api_client
end

Instance Method Details

#delete_tag_tag_delete_post(tag_delete_request, opts = {}) ⇒ Object

Delete Tag Delete a tag. Parameters: - name: str - The name of the tag to delete

Parameters:

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

    the optional parameters

Returns:

  • (Object)


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

def delete_tag_tag_delete_post(tag_delete_request, opts = {})
  data, _status_code, _headers = delete_tag_tag_delete_post_with_http_info(tag_delete_request, opts)
  data
end

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

Delete Tag Delete a tag. Parameters: - name: str - The name of the tag to delete

Parameters:

  • tag_delete_request (TagDeleteRequest)
  • 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
84
85
86
87
88
# File 'lib/litellm_client/api/tag_management_api.rb', line 37

def delete_tag_tag_delete_post_with_http_info(tag_delete_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TagManagementApi.delete_tag_tag_delete_post ...'
  end
  # verify the required parameter 'tag_delete_request' is set
  if @api_client.config.client_side_validation && tag_delete_request.nil?
    fail ArgumentError, "Missing the required parameter 'tag_delete_request' when calling TagManagementApi.delete_tag_tag_delete_post"
  end
  # resource path
  local_var_path = '/tag/delete'

  # 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(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(tag_delete_request)

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

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

  new_options = opts.merge(
    :operation => :"TagManagementApi.delete_tag_tag_delete_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: TagManagementApi#delete_tag_tag_delete_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_tag_daily_activity_tag_daily_activity_get(opts = {}) ⇒ SpendAnalyticsPaginatedResponse

Get Tag Daily Activity Get daily activity for specific tags or all tags. Args: tags (Optional): Comma-separated list of tags to filter by. If not provided, returns data for all tags. start_date (Optional): Start date for the activity period (YYYY-MM-DD). end_date (Optional): End date for the activity period (YYYY-MM-DD). model (Optional): Filter by model name. api_key (Optional): Filter by API key. page (int): Page number for pagination. page_size (int): Number of items per page. Returns: SpendAnalyticsPaginatedResponse: Paginated response containing daily activity data.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :tags (String)
  • :start_date (String)
  • :end_date (String)
  • :model (String)
  • :api_key (String)
  • :page (Integer) — default: default to 1
  • :page_size (Integer) — default: default to 10

Returns:



101
102
103
104
# File 'lib/litellm_client/api/tag_management_api.rb', line 101

def get_tag_daily_activity_tag_daily_activity_get(opts = {})
  data, _status_code, _headers = get_tag_daily_activity_tag_daily_activity_get_with_http_info(opts)
  data
end

#get_tag_daily_activity_tag_daily_activity_get_with_http_info(opts = {}) ⇒ Array<(SpendAnalyticsPaginatedResponse, Integer, Hash)>

Get Tag Daily Activity Get daily activity for specific tags or all tags. Args: tags (Optional): Comma-separated list of tags to filter by. If not provided, returns data for all tags. start_date (Optional): Start date for the activity period (YYYY-MM-DD). end_date (Optional): End date for the activity period (YYYY-MM-DD). model (Optional): Filter by model name. api_key (Optional): Filter by API key. page (int): Page number for pagination. page_size (int): Number of items per page. Returns: SpendAnalyticsPaginatedResponse: Paginated response containing daily activity data.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :tags (String)
  • :start_date (String)
  • :end_date (String)
  • :model (String)
  • :api_key (String)
  • :page (Integer) — default: default to 1
  • :page_size (Integer) — default: default to 10

Returns:



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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
# File 'lib/litellm_client/api/tag_management_api.rb', line 117

def get_tag_daily_activity_tag_daily_activity_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TagManagementApi.get_tag_daily_activity_tag_daily_activity_get ...'
  end
  # resource path
  local_var_path = '/tag/daily/activity'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'tags'] = opts[:'tags'] if !opts[:'tags'].nil?
  query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil?
  query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
  query_params[:'model'] = opts[:'model'] if !opts[:'model'].nil?
  query_params[:'api_key'] = opts[:'api_key'] if !opts[:'api_key'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].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] || 'SpendAnalyticsPaginatedResponse'

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

  new_options = opts.merge(
    :operation => :"TagManagementApi.get_tag_daily_activity_tag_daily_activity_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: TagManagementApi#get_tag_daily_activity_tag_daily_activity_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#info_tag_tag_info_post(tag_info_request, opts = {}) ⇒ Object

Info Tag Get information about specific tags. Parameters: - names: List - List of tag names to get information for

Parameters:

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

    the optional parameters

Returns:

  • (Object)


173
174
175
176
# File 'lib/litellm_client/api/tag_management_api.rb', line 173

def info_tag_tag_info_post(tag_info_request, opts = {})
  data, _status_code, _headers = info_tag_tag_info_post_with_http_info(tag_info_request, opts)
  data
end

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

Info Tag Get information about specific tags. Parameters: - names: List - List of tag names to get information for

Parameters:

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

    the optional parameters

Returns:

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

    Object data, response status code and response headers



183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/litellm_client/api/tag_management_api.rb', line 183

def info_tag_tag_info_post_with_http_info(tag_info_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TagManagementApi.info_tag_tag_info_post ...'
  end
  # verify the required parameter 'tag_info_request' is set
  if @api_client.config.client_side_validation && tag_info_request.nil?
    fail ArgumentError, "Missing the required parameter 'tag_info_request' when calling TagManagementApi.info_tag_tag_info_post"
  end
  # resource path
  local_var_path = '/tag/info'

  # 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(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(tag_info_request)

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

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

  new_options = opts.merge(
    :operation => :"TagManagementApi.info_tag_tag_info_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: TagManagementApi#info_tag_tag_info_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_tags_tag_list_get(opts = {}) ⇒ Array<TagConfig>

List Tags List all available tags.

Parameters:

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

    the optional parameters

Returns:



240
241
242
243
# File 'lib/litellm_client/api/tag_management_api.rb', line 240

def list_tags_tag_list_get(opts = {})
  data, _status_code, _headers = list_tags_tag_list_get_with_http_info(opts)
  data
end

#list_tags_tag_list_get_with_http_info(opts = {}) ⇒ Array<(Array<TagConfig>, Integer, Hash)>

List Tags List all available tags.

Parameters:

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

    the optional parameters

Returns:

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

    Array<TagConfig> data, response status code and response headers



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

def list_tags_tag_list_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TagManagementApi.list_tags_tag_list_get ...'
  end
  # resource path
  local_var_path = '/tag/list'

  # 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] || 'Array<TagConfig>'

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

  new_options = opts.merge(
    :operation => :"TagManagementApi.list_tags_tag_list_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: TagManagementApi#list_tags_tag_list_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#new_tag_tag_new_post(tag_new_request, opts = {}) ⇒ Object

New Tag Create a new tag. Parameters: - name: str - The name of the tag - description: Optional - Description of what this tag represents - models: List - List of LLM models allowed for this tag

Parameters:

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

    the optional parameters

Returns:

  • (Object)


298
299
300
301
# File 'lib/litellm_client/api/tag_management_api.rb', line 298

def new_tag_tag_new_post(tag_new_request, opts = {})
  data, _status_code, _headers = new_tag_tag_new_post_with_http_info(tag_new_request, opts)
  data
end

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

New Tag Create a new tag. Parameters: - name: str - The name of the tag - description: Optional - Description of what this tag represents - models: List - List of LLM models allowed for this tag

Parameters:

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

    the optional parameters

Returns:

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

    Object data, response status code and response headers



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
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
# File 'lib/litellm_client/api/tag_management_api.rb', line 308

def new_tag_tag_new_post_with_http_info(tag_new_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TagManagementApi.new_tag_tag_new_post ...'
  end
  # verify the required parameter 'tag_new_request' is set
  if @api_client.config.client_side_validation && tag_new_request.nil?
    fail ArgumentError, "Missing the required parameter 'tag_new_request' when calling TagManagementApi.new_tag_tag_new_post"
  end
  # resource path
  local_var_path = '/tag/new'

  # 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(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(tag_new_request)

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

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

  new_options = opts.merge(
    :operation => :"TagManagementApi.new_tag_tag_new_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: TagManagementApi#new_tag_tag_new_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_tag_tag_update_post(tag_update_request, opts = {}) ⇒ Object

Update Tag Update an existing tag. Parameters: - name: str - The name of the tag to update - description: Optional - Updated description - models: List - Updated list of allowed LLM models

Parameters:

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

    the optional parameters

Returns:

  • (Object)


366
367
368
369
# File 'lib/litellm_client/api/tag_management_api.rb', line 366

def update_tag_tag_update_post(tag_update_request, opts = {})
  data, _status_code, _headers = update_tag_tag_update_post_with_http_info(tag_update_request, opts)
  data
end

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

Update Tag Update an existing tag. Parameters: - name: str - The name of the tag to update - description: Optional - Updated description - models: List - Updated list of allowed LLM models

Parameters:

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

    the optional parameters

Returns:

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

    Object data, response status code and response headers



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
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
# File 'lib/litellm_client/api/tag_management_api.rb', line 376

def update_tag_tag_update_post_with_http_info(tag_update_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TagManagementApi.update_tag_tag_update_post ...'
  end
  # verify the required parameter 'tag_update_request' is set
  if @api_client.config.client_side_validation && tag_update_request.nil?
    fail ArgumentError, "Missing the required parameter 'tag_update_request' when calling TagManagementApi.update_tag_tag_update_post"
  end
  # resource path
  local_var_path = '/tag/update'

  # 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(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(tag_update_request)

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

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

  new_options = opts.merge(
    :operation => :"TagManagementApi.update_tag_tag_update_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: TagManagementApi#update_tag_tag_update_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end