Class: LiteLLMClient::ModelManagementApi
- Inherits:
-
Object
- Object
- LiteLLMClient::ModelManagementApi
- Defined in:
- lib/litellm_client/api/model_management_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#add_new_model_model_new_post(deployment, opts = {}) ⇒ Object
Add New Model Allows adding new models to the model list in the config.yaml.
-
#add_new_model_model_new_post_with_http_info(deployment, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Add New Model Allows adding new models to the model list in the config.yaml.
-
#delete_model_model_delete_post(model_info_delete, opts = {}) ⇒ Object
Delete Model Allows deleting models in the model list in the config.yaml.
-
#delete_model_model_delete_post_with_http_info(model_info_delete, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Delete Model Allows deleting models in the model list in the config.yaml.
-
#initialize(api_client = ApiClient.default) ⇒ ModelManagementApi
constructor
A new instance of ModelManagementApi.
-
#model_group_info_model_group_info_get(opts = {}) ⇒ Object
Model Group Info Get information about all the deployments on litellm proxy, including config.yaml descriptions (except api key and api base) - /model_group/info returns all model groups.
-
#model_group_info_model_group_info_get_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
Model Group Info Get information about all the deployments on litellm proxy, including config.yaml descriptions (except api key and api base) - /model_group/info returns all model groups.
-
#model_info_v1_model_info_get(opts = {}) ⇒ Object
Model Info V1 Provides more info about each model in /models, including config.yaml descriptions (except api key and api base) Parameters: litellm_model_id: Optional = None (this is the value of ‘x-litellm-model-id` returned in response headers) - When litellm_model_id is passed, it will return the info for that specific model - When litellm_model_id is not passed, it will return the info for all models Returns: Returns a dictionary containing information about each model.
-
#model_info_v1_model_info_get_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
Model Info V1 Provides more info about each model in /models, including config.yaml descriptions (except api key and api base) Parameters: litellm_model_id: Optional = None (this is the value of `x-litellm-model-id` returned in response headers) - When litellm_model_id is passed, it will return the info for that specific model - When litellm_model_id is not passed, it will return the info for all models Returns: Returns a dictionary containing information about each model.
-
#model_info_v1_v1_model_info_get(opts = {}) ⇒ Object
Model Info V1 Provides more info about each model in /models, including config.yaml descriptions (except api key and api base) Parameters: litellm_model_id: Optional = None (this is the value of ‘x-litellm-model-id` returned in response headers) - When litellm_model_id is passed, it will return the info for that specific model - When litellm_model_id is not passed, it will return the info for all models Returns: Returns a dictionary containing information about each model.
-
#model_info_v1_v1_model_info_get_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
Model Info V1 Provides more info about each model in /models, including config.yaml descriptions (except api key and api base) Parameters: litellm_model_id: Optional = None (this is the value of `x-litellm-model-id` returned in response headers) - When litellm_model_id is passed, it will return the info for that specific model - When litellm_model_id is not passed, it will return the info for all models Returns: Returns a dictionary containing information about each model.
-
#model_list_models_get(opts = {}) ⇒ Object
Model List Use ‘/model/info` - to get detailed model information, example - pricing, mode, etc.
-
#model_list_models_get_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
Model List Use `/model/info` - to get detailed model information, example - pricing, mode, etc.
-
#model_list_v1_models_get(opts = {}) ⇒ Object
Model List Use ‘/model/info` - to get detailed model information, example - pricing, mode, etc.
-
#model_list_v1_models_get_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
Model List Use `/model/info` - to get detailed model information, example - pricing, mode, etc.
-
#patch_model_model_model_id_update_patch(model_id, update_deployment, opts = {}) ⇒ Object
Patch Model PATCH Endpoint for partial model updates.
-
#patch_model_model_model_id_update_patch_with_http_info(model_id, update_deployment, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Patch Model PATCH Endpoint for partial model updates.
-
#update_model_model_update_post(update_deployment, opts = {}) ⇒ Object
Update Model Edit existing model params.
-
#update_model_model_update_post_with_http_info(update_deployment, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Update Model Edit existing model params.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ModelManagementApi
Returns a new instance of ModelManagementApi.
19 20 21 |
# File 'lib/litellm_client/api/model_management_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/litellm_client/api/model_management_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#add_new_model_model_new_post(deployment, opts = {}) ⇒ Object
Add New Model Allows adding new models to the model list in the config.yaml
27 28 29 30 |
# File 'lib/litellm_client/api/model_management_api.rb', line 27 def add_new_model_model_new_post(deployment, opts = {}) data, _status_code, _headers = add_new_model_model_new_post_with_http_info(deployment, opts) data end |
#add_new_model_model_new_post_with_http_info(deployment, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Add New Model Allows adding new models to the model list in the config.yaml
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/model_management_api.rb', line 37 def add_new_model_model_new_post_with_http_info(deployment, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ModelManagementApi.add_new_model_model_new_post ...' end # verify the required parameter 'deployment' is set if @api_client.config.client_side_validation && deployment.nil? fail ArgumentError, "Missing the required parameter 'deployment' when calling ModelManagementApi.add_new_model_model_new_post" end # resource path local_var_path = '/model/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(deployment) # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['APIKeyHeader'] = opts.merge( :operation => :"ModelManagementApi.add_new_model_model_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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ModelManagementApi#add_new_model_model_new_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_model_model_delete_post(model_info_delete, opts = {}) ⇒ Object
Delete Model Allows deleting models in the model list in the config.yaml
95 96 97 98 |
# File 'lib/litellm_client/api/model_management_api.rb', line 95 def delete_model_model_delete_post(model_info_delete, opts = {}) data, _status_code, _headers = delete_model_model_delete_post_with_http_info(model_info_delete, opts) data end |
#delete_model_model_delete_post_with_http_info(model_info_delete, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Delete Model Allows deleting models in the model list in the config.yaml
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 147 148 149 150 151 152 153 154 155 156 |
# File 'lib/litellm_client/api/model_management_api.rb', line 105 def delete_model_model_delete_post_with_http_info(model_info_delete, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ModelManagementApi.delete_model_model_delete_post ...' end # verify the required parameter 'model_info_delete' is set if @api_client.config.client_side_validation && model_info_delete.nil? fail ArgumentError, "Missing the required parameter 'model_info_delete' when calling ModelManagementApi.delete_model_model_delete_post" end # resource path local_var_path = '/model/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(model_info_delete) # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['APIKeyHeader'] = opts.merge( :operation => :"ModelManagementApi.delete_model_model_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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ModelManagementApi#delete_model_model_delete_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#model_group_info_model_group_info_get(opts = {}) ⇒ Object
Model Group Info Get information about all the deployments on litellm proxy, including config.yaml descriptions (except api key and api base) - /model_group/info returns all model groups. End users of proxy should use /model_group/info since those models will be used for /chat/completions, /embeddings, etc. - /model_group/info?model_group=rerank-english-v3.0 returns all model groups for a specific model group (‘model_name` in config.yaml) Example Request (All Models): “`shell curl -X ’GET’ ‘localhost:4000/model_group/info’ -H ‘accept: application/json’ -H ‘x-api-key: sk-1234’ “‘ Example Request (Specific Model Group): “`shell curl -X ’GET’ ‘localhost:4000/model_group/info?model_group=rerank-english-v3.0’ -H ‘accept: application/json’ -H ‘Authorization: Bearer sk-1234’ “‘ Example Request (Specific Wildcard Model Group): (e.g. `model_name: openai/*` on config.yaml) “`shell curl -X ’GET’ ‘localhost:4000/model_group/info?model_group=openai/tts-1’ -H ‘accept: application/json’ -H ‘Authorization: Bearersk-1234’ “‘ Learn how to use and set wildcard models [here](docs.litellm.ai/docs/wildcard_routing) Example Response: “`json { "data": [ { "model_group": "rerank-english-v3.0", "providers": [ "cohere" ], "max_input_tokens": null, "max_output_tokens": null, "input_cost_per_token": 0.0, "output_cost_per_token": 0.0, "mode": null, "tpm": null, "rpm": null, "supports_parallel_function_calling": false, "supports_vision": false, "supports_function_calling": false, "supported_openai_params": [ "stream", "temperature", "max_tokens", "logit_bias", "top_p", "frequency_penalty", "presence_penalty", "stop", "n", "extra_headers" ] }, { "model_group": "gpt-3.5-turbo", "providers": [ "openai" ], "max_input_tokens": 16385.0, "max_output_tokens": 4096.0, "input_cost_per_token": 1.5e-06, "output_cost_per_token": 2e-06, "mode": "chat", "tpm": null, "rpm": null, "supports_parallel_function_calling": false, "supports_vision": false, "supports_function_calling": true, "supported_openai_params": [ "frequency_penalty", "logit_bias", "logprobs", "top_logprobs", "max_tokens", "max_completion_tokens", "n", "presence_penalty", "seed", "stop", "stream", "stream_options", "temperature", "top_p", "tools", "tool_choice", "function_call", "functions", "max_retries", "extra_headers", "parallel_tool_calls", "response_format" ] }, { "model_group": "llava-hf", "providers": [ "openai" ], "max_input_tokens": null, "max_output_tokens": null, "input_cost_per_token": 0.0, "output_cost_per_token": 0.0, "mode": null, "tpm": null, "rpm": null, "supports_parallel_function_calling": false, "supports_vision": true, "supports_function_calling": false, "supported_openai_params": [ "frequency_penalty", "logit_bias", "logprobs", "top_logprobs", "max_tokens", "max_completion_tokens", "n", "presence_penalty", "seed", "stop", "stream", "stream_options", "temperature", "top_p", "tools", "tool_choice", "function_call", "functions", "max_retries", "extra_headers", "parallel_tool_calls", "response_format" ] } ] } “`
163 164 165 166 |
# File 'lib/litellm_client/api/model_management_api.rb', line 163 def model_group_info_model_group_info_get(opts = {}) data, _status_code, _headers = model_group_info_model_group_info_get_with_http_info(opts) data end |
#model_group_info_model_group_info_get_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
Model Group Info Get information about all the deployments on litellm proxy, including config.yaml descriptions (except api key and api base) - /model_group/info returns all model groups. End users of proxy should use /model_group/info since those models will be used for /chat/completions, /embeddings, etc. - /model_group/info?model_group=rerank-english-v3.0 returns all model groups for a specific model group (`model_name` in config.yaml) Example Request (All Models): ```shell curl -X 'GET' 'localhost:4000/model_group/info' -H 'accept: application/json' -H 'x-api-key: sk-1234' ``` Example Request (Specific Model Group): ```shell curl -X 'GET' 'localhost:4000/model_group/info?model_group=rerank-english-v3.0' -H 'accept: application/json' -H 'Authorization: Bearer sk-1234' ``` Example Request (Specific Wildcard Model Group): (e.g. `model_name: openai/*` on config.yaml) ```shell curl -X 'GET' 'localhost:4000/model_group/info?model_group=openai/tts-1' -H 'accept: application/json' -H 'Authorization: Bearersk-1234' ``` Learn how to use and set wildcard models [here](docs.litellm.ai/docs/wildcard_routing) Example Response: ```json { "data": [ { "model_group": "rerank-english-v3.0", "providers": [ "cohere" ], "max_input_tokens": null, "max_output_tokens": null, "input_cost_per_token": 0.0, "output_cost_per_token": 0.0, "mode": null, "tpm": null, "rpm": null, "supports_parallel_function_calling": false, "supports_vision": false, "supports_function_calling": false, "supported_openai_params": [ "stream", "temperature", "max_tokens", "logit_bias", "top_p", "frequency_penalty", "presence_penalty", "stop", "n", "extra_headers" ] }, { "model_group": "gpt-3.5-turbo", "providers": [ "openai" ], "max_input_tokens": 16385.0, "max_output_tokens": 4096.0, "input_cost_per_token": 1.5e-06, "output_cost_per_token": 2e-06, "mode": "chat", "tpm": null, "rpm": null, "supports_parallel_function_calling": false, "supports_vision": false, "supports_function_calling": true, "supported_openai_params": [ "frequency_penalty", "logit_bias", "logprobs", "top_logprobs", "max_tokens", "max_completion_tokens", "n", "presence_penalty", "seed", "stop", "stream", "stream_options", "temperature", "top_p", "tools", "tool_choice", "function_call", "functions", "max_retries", "extra_headers", "parallel_tool_calls", "response_format" ] }, { "model_group": "llava-hf", "providers": [ "openai" ], "max_input_tokens": null, "max_output_tokens": null, "input_cost_per_token": 0.0, "output_cost_per_token": 0.0, "mode": null, "tpm": null, "rpm": null, "supports_parallel_function_calling": false, "supports_vision": true, "supports_function_calling": false, "supported_openai_params": [ "frequency_penalty", "logit_bias", "logprobs", "top_logprobs", "max_tokens", "max_completion_tokens", "n", "presence_penalty", "seed", "stop", "stream", "stream_options", "temperature", "top_p", "tools", "tool_choice", "function_call", "functions", "max_retries", "extra_headers", "parallel_tool_calls", "response_format" ] } ] } ```
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 204 205 206 207 208 209 210 211 212 213 214 215 216 |
# File 'lib/litellm_client/api/model_management_api.rb', line 173 def model_group_info_model_group_info_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ModelManagementApi.model_group_info_model_group_info_get ...' end # resource path local_var_path = '/model_group/info' # query parameters query_params = opts[:query_params] || {} query_params[:'model_group'] = opts[:'model_group'] if !opts[:'model_group'].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'] = opts.merge( :operation => :"ModelManagementApi.model_group_info_model_group_info_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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ModelManagementApi#model_group_info_model_group_info_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#model_info_v1_model_info_get(opts = {}) ⇒ Object
Model Info V1 Provides more info about each model in /models, including config.yaml descriptions (except api key and api base) Parameters: litellm_model_id: Optional = None (this is the value of ‘x-litellm-model-id` returned in response headers) - When litellm_model_id is passed, it will return the info for that specific model - When litellm_model_id is not passed, it will return the info for all models Returns: Returns a dictionary containing information about each model. Example Response: “`json { "data": [ { "model_name": "fake-openai-endpoint", "litellm_params": { "api_base": "exampleopenaiendpoint-production.up.railway.app/", "model": "openai/fake" }, "model_info": { "id": "112f74fab24a7a5245d2ced3536dd8f5f9192c57ee6e332af0f0512e08bed5af", "db_model": false } } ] } “`
223 224 225 226 |
# File 'lib/litellm_client/api/model_management_api.rb', line 223 def model_info_v1_model_info_get(opts = {}) data, _status_code, _headers = model_info_v1_model_info_get_with_http_info(opts) data end |
#model_info_v1_model_info_get_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
Model Info V1 Provides more info about each model in /models, including config.yaml descriptions (except api key and api base) Parameters: litellm_model_id: Optional = None (this is the value of `x-litellm-model-id` returned in response headers) - When litellm_model_id is passed, it will return the info for that specific model - When litellm_model_id is not passed, it will return the info for all models Returns: Returns a dictionary containing information about each model. Example Response: ```json { "data": [ { "model_name": "fake-openai-endpoint", "litellm_params": { "api_base": "exampleopenaiendpoint-production.up.railway.app/", "model": "openai/fake" }, "model_info": { "id": "112f74fab24a7a5245d2ced3536dd8f5f9192c57ee6e332af0f0512e08bed5af", "db_model": false } } ] } ```
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 275 276 |
# File 'lib/litellm_client/api/model_management_api.rb', line 233 def model_info_v1_model_info_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ModelManagementApi.model_info_v1_model_info_get ...' end # resource path local_var_path = '/model/info' # query parameters query_params = opts[:query_params] || {} query_params[:'litellm_model_id'] = opts[:'litellm_model_id'] if !opts[:'litellm_model_id'].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'] = opts.merge( :operation => :"ModelManagementApi.model_info_v1_model_info_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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ModelManagementApi#model_info_v1_model_info_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#model_info_v1_v1_model_info_get(opts = {}) ⇒ Object
Model Info V1 Provides more info about each model in /models, including config.yaml descriptions (except api key and api base) Parameters: litellm_model_id: Optional = None (this is the value of ‘x-litellm-model-id` returned in response headers) - When litellm_model_id is passed, it will return the info for that specific model - When litellm_model_id is not passed, it will return the info for all models Returns: Returns a dictionary containing information about each model. Example Response: “`json { "data": [ { "model_name": "fake-openai-endpoint", "litellm_params": { "api_base": "exampleopenaiendpoint-production.up.railway.app/", "model": "openai/fake" }, "model_info": { "id": "112f74fab24a7a5245d2ced3536dd8f5f9192c57ee6e332af0f0512e08bed5af", "db_model": false } } ] } “`
283 284 285 286 |
# File 'lib/litellm_client/api/model_management_api.rb', line 283 def model_info_v1_v1_model_info_get(opts = {}) data, _status_code, _headers = model_info_v1_v1_model_info_get_with_http_info(opts) data end |
#model_info_v1_v1_model_info_get_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
Model Info V1 Provides more info about each model in /models, including config.yaml descriptions (except api key and api base) Parameters: litellm_model_id: Optional = None (this is the value of `x-litellm-model-id` returned in response headers) - When litellm_model_id is passed, it will return the info for that specific model - When litellm_model_id is not passed, it will return the info for all models Returns: Returns a dictionary containing information about each model. Example Response: ```json { "data": [ { "model_name": "fake-openai-endpoint", "litellm_params": { "api_base": "exampleopenaiendpoint-production.up.railway.app/", "model": "openai/fake" }, "model_info": { "id": "112f74fab24a7a5245d2ced3536dd8f5f9192c57ee6e332af0f0512e08bed5af", "db_model": false } } ] } ```
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 |
# File 'lib/litellm_client/api/model_management_api.rb', line 293 def model_info_v1_v1_model_info_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ModelManagementApi.model_info_v1_v1_model_info_get ...' end # resource path local_var_path = '/v1/model/info' # query parameters query_params = opts[:query_params] || {} query_params[:'litellm_model_id'] = opts[:'litellm_model_id'] if !opts[:'litellm_model_id'].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'] = opts.merge( :operation => :"ModelManagementApi.model_info_v1_v1_model_info_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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ModelManagementApi#model_info_v1_v1_model_info_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#model_list_models_get(opts = {}) ⇒ Object
Model List Use ‘/model/info` - to get detailed model information, example - pricing, mode, etc. This is just for compatibility with openai projects like aider.
346 347 348 349 |
# File 'lib/litellm_client/api/model_management_api.rb', line 346 def model_list_models_get(opts = {}) data, _status_code, _headers = model_list_models_get_with_http_info(opts) data end |
#model_list_models_get_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
Model List Use `/model/info` - to get detailed model information, example - pricing, mode, etc. This is just for compatibility with openai projects like aider.
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/model_management_api.rb', line 359 def model_list_models_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ModelManagementApi.model_list_models_get ...' end # resource path local_var_path = '/models' # query parameters query_params = opts[:query_params] || {} query_params[:'return_wildcard_routes'] = opts[:'return_wildcard_routes'] if !opts[:'return_wildcard_routes'].nil? query_params[:'team_id'] = opts[:'team_id'] if !opts[:'team_id'].nil? query_params[:'include_model_access_groups'] = opts[:'include_model_access_groups'] if !opts[:'include_model_access_groups'].nil? query_params[:'only_model_access_groups'] = opts[:'only_model_access_groups'] if !opts[:'only_model_access_groups'].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'] = opts.merge( :operation => :"ModelManagementApi.model_list_models_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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ModelManagementApi#model_list_models_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#model_list_v1_models_get(opts = {}) ⇒ Object
Model List Use ‘/model/info` - to get detailed model information, example - pricing, mode, etc. This is just for compatibility with openai projects like aider.
415 416 417 418 |
# File 'lib/litellm_client/api/model_management_api.rb', line 415 def model_list_v1_models_get(opts = {}) data, _status_code, _headers = model_list_v1_models_get_with_http_info(opts) data end |
#model_list_v1_models_get_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
Model List Use `/model/info` - to get detailed model information, example - pricing, mode, etc. This is just for compatibility with openai projects like aider.
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 472 473 474 |
# File 'lib/litellm_client/api/model_management_api.rb', line 428 def model_list_v1_models_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ModelManagementApi.model_list_v1_models_get ...' end # resource path local_var_path = '/v1/models' # query parameters query_params = opts[:query_params] || {} query_params[:'return_wildcard_routes'] = opts[:'return_wildcard_routes'] if !opts[:'return_wildcard_routes'].nil? query_params[:'team_id'] = opts[:'team_id'] if !opts[:'team_id'].nil? query_params[:'include_model_access_groups'] = opts[:'include_model_access_groups'] if !opts[:'include_model_access_groups'].nil? query_params[:'only_model_access_groups'] = opts[:'only_model_access_groups'] if !opts[:'only_model_access_groups'].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'] = opts.merge( :operation => :"ModelManagementApi.model_list_v1_models_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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ModelManagementApi#model_list_v1_models_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#patch_model_model_model_id_update_patch(model_id, update_deployment, opts = {}) ⇒ Object
Patch Model PATCH Endpoint for partial model updates. Only updates the fields specified in the request while preserving other existing values. Follows proper PATCH semantics by only modifying provided fields. Args: model_id: The ID of the model to update patch_data: The fields to update and their new values user_api_key_dict: User authentication information Returns: Updated model information Raises: ProxyException: For various error conditions including authentication and database errors
482 483 484 485 |
# File 'lib/litellm_client/api/model_management_api.rb', line 482 def patch_model_model_model_id_update_patch(model_id, update_deployment, opts = {}) data, _status_code, _headers = patch_model_model_model_id_update_patch_with_http_info(model_id, update_deployment, opts) data end |
#patch_model_model_model_id_update_patch_with_http_info(model_id, update_deployment, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Patch Model PATCH Endpoint for partial model updates. Only updates the fields specified in the request while preserving other existing values. Follows proper PATCH semantics by only modifying provided fields. Args: model_id: The ID of the model to update patch_data: The fields to update and their new values user_api_key_dict: User authentication information Returns: Updated model information Raises: ProxyException: For various error conditions including authentication and database errors
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 538 539 540 541 542 543 544 545 546 547 548 |
# File 'lib/litellm_client/api/model_management_api.rb', line 493 def patch_model_model_model_id_update_patch_with_http_info(model_id, update_deployment, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ModelManagementApi.patch_model_model_model_id_update_patch ...' end # verify the required parameter 'model_id' is set if @api_client.config.client_side_validation && model_id.nil? fail ArgumentError, "Missing the required parameter 'model_id' when calling ModelManagementApi.patch_model_model_model_id_update_patch" end # verify the required parameter 'update_deployment' is set if @api_client.config.client_side_validation && update_deployment.nil? fail ArgumentError, "Missing the required parameter 'update_deployment' when calling ModelManagementApi.patch_model_model_model_id_update_patch" end # resource path local_var_path = '/model/{model_id}/update'.sub('{' + 'model_id' + '}', CGI.escape(model_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'] # 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(update_deployment) # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['APIKeyHeader'] = opts.merge( :operation => :"ModelManagementApi.patch_model_model_model_id_update_patch", :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(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ModelManagementApi#patch_model_model_model_id_update_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_model_model_update_post(update_deployment, opts = {}) ⇒ Object
Update Model Edit existing model params
555 556 557 558 |
# File 'lib/litellm_client/api/model_management_api.rb', line 555 def update_model_model_update_post(update_deployment, opts = {}) data, _status_code, _headers = update_model_model_update_post_with_http_info(update_deployment, opts) data end |
#update_model_model_update_post_with_http_info(update_deployment, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Update Model Edit existing model params
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 603 604 605 606 607 608 609 610 611 612 613 614 615 616 |
# File 'lib/litellm_client/api/model_management_api.rb', line 565 def update_model_model_update_post_with_http_info(update_deployment, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ModelManagementApi.update_model_model_update_post ...' end # verify the required parameter 'update_deployment' is set if @api_client.config.client_side_validation && update_deployment.nil? fail ArgumentError, "Missing the required parameter 'update_deployment' when calling ModelManagementApi.update_model_model_update_post" end # resource path local_var_path = '/model/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(update_deployment) # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['APIKeyHeader'] = opts.merge( :operation => :"ModelManagementApi.update_model_model_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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ModelManagementApi#update_model_model_update_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |