diff --git a/README.md b/README.md index f2228bd..72e723b 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ No description provided (generated by Openapi Generator https://github.com/opena This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 0.1.0 -- Package version: 3.1.16 +- Package version: 3.2.4 - Generator version: 7.9.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen @@ -105,6 +105,7 @@ Class | Method | HTTP request | Description *EXTERNALApi* | [**create_setup_payments_setup_checkout_post**](docs/EXTERNALApi.md#create_setup_payments_setup_checkout_post) | **POST** /payments/setup_checkout | Create Setup *EXTERNALApi* | [**delete_api_key_credentials_api_key_id_delete**](docs/EXTERNALApi.md#delete_api_key_credentials_api_key_id_delete) | **DELETE** /credentials/api-key/{id} | Delete Api Key *EXTERNALApi* | [**delete_user_vault_item_endpoint_user_vault_delete**](docs/EXTERNALApi.md#delete_user_vault_item_endpoint_user_vault_delete) | **DELETE** /user_vault | Delete User Vault Item Endpoint +*EXTERNALApi* | [**download_url_file_url_download_post**](docs/EXTERNALApi.md#download_url_file_url_download_post) | **POST** /file_url/download | Download Url *EXTERNALApi* | [**get_all_user_vault_items_endpoint_user_vault_get**](docs/EXTERNALApi.md#get_all_user_vault_items_endpoint_user_vault_get) | **GET** /user_vault | Get All User Vault Items Endpoint *EXTERNALApi* | [**get_api_keys_credentials_api_key_get**](docs/EXTERNALApi.md#get_api_keys_credentials_api_key_get) | **GET** /credentials/api-key | Get Api Keys *EXTERNALApi* | [**get_clusters_clusters_get**](docs/EXTERNALApi.md#get_clusters_clusters_get) | **GET** /clusters | Get Clusters @@ -124,8 +125,10 @@ Class | Method | HTTP request | Description *EXTERNALApi* | [**get_usage_daily_bills_get**](docs/EXTERNALApi.md#get_usage_daily_bills_get) | **GET** /daily_bills | Get Usage *EXTERNALApi* | [**get_usage_deployments_usage_deployment_id_get**](docs/EXTERNALApi.md#get_usage_deployments_usage_deployment_id_get) | **GET** /deployments/usage/{deployment_id} | Get Usage *EXTERNALApi* | [**setup_stripe_customer_payments_setup_post**](docs/EXTERNALApi.md#setup_stripe_customer_payments_setup_post) | **POST** /payments/setup | Setup Stripe Customer +*EXTERNALApi* | [**update_autopay_preferences_autopay_put**](docs/EXTERNALApi.md#update_autopay_preferences_autopay_put) | **PUT** /preferences/autopay | Update Autopay *EXTERNALApi* | [**update_deployment_status_deployments_status_deployment_id_put**](docs/EXTERNALApi.md#update_deployment_status_deployments_status_deployment_id_put) | **PUT** /deployments/status/{deployment_id} | Update Deployment Status *EXTERNALApi* | [**update_user_vault_item_endpoint_user_vault_put**](docs/EXTERNALApi.md#update_user_vault_item_endpoint_user_vault_put) | **PUT** /user_vault | Update User Vault Item Endpoint +*EXTERNALApi* | [**upload_url_file_url_upload_post**](docs/EXTERNALApi.md#upload_url_file_url_upload_post) | **POST** /file_url/upload | Upload Url ## Documentation For Models @@ -135,8 +138,7 @@ Class | Method | HTTP request | Description - [CServeRecipe](docs/CServeRecipe.md) - [CServeRecipePerf](docs/CServeRecipePerf.md) - [CServeRecipeResponse](docs/CServeRecipeResponse.md) - - [CServeV2RecipeInput](docs/CServeV2RecipeInput.md) - - [CServeV2RecipeOutput](docs/CServeV2RecipeOutput.md) + - [CServeV2Recipe](docs/CServeV2Recipe.md) - [CreateCServeDeploymentRequest](docs/CreateCServeDeploymentRequest.md) - [CreateCServeDeploymentResponse](docs/CreateCServeDeploymentResponse.md) - [CreateCServeV2DeploymentRequest](docs/CreateCServeV2DeploymentRequest.md) @@ -150,6 +152,8 @@ Class | Method | HTTP request | Description - [CreateRagDeploymentRequest](docs/CreateRagDeploymentRequest.md) - [CreateRagDeploymentResponse](docs/CreateRagDeploymentResponse.md) - [CreateSetupCheckoutRequest](docs/CreateSetupCheckoutRequest.md) + - [CreateUrlRequest](docs/CreateUrlRequest.md) + - [CreateUrlResponse](docs/CreateUrlResponse.md) - [CreditsResponse](docs/CreditsResponse.md) - [DailyBillResponse](docs/DailyBillResponse.md) - [DeploymentStatus](docs/DeploymentStatus.md) @@ -165,7 +169,7 @@ Class | Method | HTTP request | Description - [GetDeploymentResponse](docs/GetDeploymentResponse.md) - [GetDeploymentUsageResponse](docs/GetDeploymentUsageResponse.md) - [GetInferenceDeploymentResponse](docs/GetInferenceDeploymentResponse.md) - - [GetPaymentsResponse](docs/GetPaymentsResponse.md) + - [GetPaymentResponse](docs/GetPaymentResponse.md) - [GetRagDeploymentResponse](docs/GetRagDeploymentResponse.md) - [HTTPValidationError](docs/HTTPValidationError.md) - [HardwareInstanceResponse](docs/HardwareInstanceResponse.md) @@ -175,14 +179,15 @@ Class | Method | HTTP request | Description - [ListGetClusterResponse](docs/ListGetClusterResponse.md) - [ListGetDeploymentResponse](docs/ListGetDeploymentResponse.md) - [ListHardwareInstanceResponse](docs/ListHardwareInstanceResponse.md) + - [ListPaymentsResponse](docs/ListPaymentsResponse.md) - [ListPrebuiltImageResponse](docs/ListPrebuiltImageResponse.md) - [ListUserVaultItemsResponse](docs/ListUserVaultItemsResponse.md) - [Metric](docs/Metric.md) - [PrebuiltImageResponse](docs/PrebuiltImageResponse.md) - [ServiceStatus](docs/ServiceStatus.md) + - [UpdateAutopayRequest](docs/UpdateAutopayRequest.md) - [UserSupportEmailRequest](docs/UserSupportEmailRequest.md) - - [UserVaultItemInput](docs/UserVaultItemInput.md) - - [UserVaultItemOutput](docs/UserVaultItemOutput.md) + - [UserVaultItem](docs/UserVaultItem.md) - [UserVaultType](docs/UserVaultType.md) - [ValidationError](docs/ValidationError.md) - [ValidationErrorLocInner](docs/ValidationErrorLocInner.md) diff --git a/docs/CServeRecipePerf.md b/docs/CServeRecipePerf.md index 09a0ab7..4a54132 100644 --- a/docs/CServeRecipePerf.md +++ b/docs/CServeRecipePerf.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**recipe** | [**CServeV2RecipeOutput**](CServeV2RecipeOutput.md) | | +**recipe** | [**CServeV2Recipe**](CServeV2Recipe.md) | | **hardware_instance_id** | **int** | | **output_tp** | **List[List[object]]** | | **mean_ttft** | **List[List[object]]** | | diff --git a/docs/CServeRecipeResponse.md b/docs/CServeRecipeResponse.md index 4a42fda..cba1cef 100644 --- a/docs/CServeRecipeResponse.md +++ b/docs/CServeRecipeResponse.md @@ -6,7 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **model** | **str** | | -**cluster_id** | **int** | | **fastest** | [**CServeRecipePerf**](CServeRecipePerf.md) | | **cheapest** | [**CServeRecipePerf**](CServeRecipePerf.md) | | **best_value** | [**CServeRecipePerf**](CServeRecipePerf.md) | | diff --git a/docs/CServeV2Recipe.md b/docs/CServeV2Recipe.md index 4d8ba68..733c995 100644 --- a/docs/CServeV2Recipe.md +++ b/docs/CServeV2Recipe.md @@ -7,33 +7,7 @@ Inputs to start deployment Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **model** | **str** | | -**max_model_len** | **int** | | -**is_embedding_model** | **bool** | | [default to False] -**tokenizer** | **str** | | -**tensor_parallel_size** | **int** | | -**pipeline_parallel_size** | **int** | | -**gpu_mem_util** | **float** | | [default to 0.95] -**block_size** | **int** | | [default to 32] -**swap_space** | **int** | | [default to 0] -**quantization** | **str** | | -**dtype** | **str** | | [default to 'auto'] -**cache_dtype** | **str** | | [default to 'auto'] -**max_num_seqs** | **int** | | [default to 256] -**eager_execution** | **bool** | | [default to True] -**use_flashinfer** | **bool** | | [default to False] -**offloading_num** | **float** | | [default to 0] -**spec_draft_model** | **str** | | -**spec_tokens** | **int** | | -**spec_prompt_lookup_max** | **int** | | -**spec_prompt_lookup_min** | **int** | | -**use_prefix_caching** | **bool** | | [default to False] -**use_chunked_prefill** | **bool** | | [default to False] -**chunked_prefill_size** | **int** | | -**max_seq_len_to_capture** | **int** | | [default to 1024] -**distributed_executor_backend** | **str** | | [default to 'ray'] -**spec_max_batch_size** | **int** | | -**spec_max_seq_len** | **int** | | -**num_scheduler_steps** | **int** | | [default to 1] +**is_embedding_model** | **bool** | | [optional] [default to False] ## Example diff --git a/docs/CServeV2RecipeInput.md b/docs/CServeV2RecipeInput.md index 1d9a27f..ebd1d71 100644 --- a/docs/CServeV2RecipeInput.md +++ b/docs/CServeV2RecipeInput.md @@ -7,33 +7,7 @@ Inputs to start deployment Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **model** | **str** | | -**max_model_len** | **int** | | [optional] **is_embedding_model** | **bool** | | [optional] [default to False] -**tokenizer** | **str** | | -**tensor_parallel_size** | **int** | | -**pipeline_parallel_size** | **int** | | -**gpu_mem_util** | **float** | | [optional] [default to 0.95] -**block_size** | **int** | | [optional] [default to 16] -**swap_space** | **int** | | [optional] [default to 0] -**quantization** | **str** | | [optional] -**dtype** | **str** | | [optional] [default to 'auto'] -**cache_dtype** | **str** | | [optional] [default to 'auto'] -**max_num_seqs** | **int** | | [optional] [default to 256] -**eager_execution** | **bool** | | [optional] [default to True] -**use_flashinfer** | **bool** | | [optional] [default to False] -**offloading_num** | **float** | | [optional] [default to 0] -**spec_draft_model** | **str** | | [optional] -**spec_tokens** | **int** | | [optional] -**spec_prompt_lookup_max** | **int** | | [optional] -**spec_prompt_lookup_min** | **int** | | [optional] -**use_prefix_caching** | **bool** | | [optional] [default to False] -**use_chunked_prefill** | **bool** | | [optional] [default to False] -**chunked_prefill_size** | **int** | | [optional] -**max_seq_len_to_capture** | **int** | | [optional] [default to 8192] -**distributed_executor_backend** | **str** | | [optional] [default to 'mp'] -**spec_max_batch_size** | **int** | | [optional] -**spec_max_seq_len** | **int** | | [optional] -**num_scheduler_steps** | **int** | | [optional] [default to 1] ## Example diff --git a/docs/CServeV2RecipeOutput.md b/docs/CServeV2RecipeOutput.md index 437fbfc..f237e1a 100644 --- a/docs/CServeV2RecipeOutput.md +++ b/docs/CServeV2RecipeOutput.md @@ -7,33 +7,7 @@ Inputs to start deployment Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **model** | **str** | | -**max_model_len** | **int** | | **is_embedding_model** | **bool** | | [default to False] -**tokenizer** | **str** | | -**tensor_parallel_size** | **int** | | -**pipeline_parallel_size** | **int** | | -**gpu_mem_util** | **float** | | [default to 0.95] -**block_size** | **int** | | [default to 16] -**swap_space** | **int** | | [default to 0] -**quantization** | **str** | | -**dtype** | **str** | | [default to 'auto'] -**cache_dtype** | **str** | | [default to 'auto'] -**max_num_seqs** | **int** | | [default to 256] -**eager_execution** | **bool** | | [default to True] -**use_flashinfer** | **bool** | | [default to False] -**offloading_num** | **float** | | [default to 0] -**spec_draft_model** | **str** | | -**spec_tokens** | **int** | | -**spec_prompt_lookup_max** | **int** | | -**spec_prompt_lookup_min** | **int** | | -**use_prefix_caching** | **bool** | | [default to False] -**use_chunked_prefill** | **bool** | | [default to False] -**chunked_prefill_size** | **int** | | -**max_seq_len_to_capture** | **int** | | [default to 8192] -**distributed_executor_backend** | **str** | | [default to 'mp'] -**spec_max_batch_size** | **int** | | -**spec_max_seq_len** | **int** | | -**num_scheduler_steps** | **int** | | [default to 1] ## Example diff --git a/docs/ClientSecretResponse.md b/docs/ClientSecretResponse.md deleted file mode 100644 index 5950168..0000000 --- a/docs/ClientSecretResponse.md +++ /dev/null @@ -1,29 +0,0 @@ -# ClientSecretResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client_secret** | **str** | | - -## Example - -```python -from platform_api_python_client.models.client_secret_response import ClientSecretResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of ClientSecretResponse from a JSON string -client_secret_response_instance = ClientSecretResponse.from_json(json) -# print the JSON string representation of the object -print(ClientSecretResponse.to_json()) - -# convert the object into a dict -client_secret_response_dict = client_secret_response_instance.to_dict() -# create an instance of ClientSecretResponse from a dict -client_secret_response_from_dict = ClientSecretResponse.from_dict(client_secret_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CreateCServeV2DeploymentRequest.md b/docs/CreateCServeV2DeploymentRequest.md index f2b8766..ebc647b 100644 --- a/docs/CreateCServeV2DeploymentRequest.md +++ b/docs/CreateCServeV2DeploymentRequest.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **name** | **str** | | **cluster_id** | **int** | | **hardware_instance_id** | **int** | | -**recipe** | [**CServeV2RecipeInput**](CServeV2RecipeInput.md) | | +**recipe** | [**CServeV2Recipe**](CServeV2Recipe.md) | | **hf_token** | **str** | | [optional] **endpoint_certificate_authority** | **str** | | [optional] **min_scale** | **int** | | diff --git a/docs/CreateCheckoutResponse.md b/docs/CreateCheckoutResponse.md deleted file mode 100644 index 514af5e..0000000 --- a/docs/CreateCheckoutResponse.md +++ /dev/null @@ -1,29 +0,0 @@ -# CreateCheckoutResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**url** | **str** | | - -## Example - -```python -from platform_api_python_client.models.create_checkout_response import CreateCheckoutResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateCheckoutResponse from a JSON string -create_checkout_response_instance = CreateCheckoutResponse.from_json(json) -# print the JSON string representation of the object -print(CreateCheckoutResponse.to_json()) - -# convert the object into a dict -create_checkout_response_dict = create_checkout_response_instance.to_dict() -# create an instance of CreateCheckoutResponse from a dict -create_checkout_response_from_dict = CreateCheckoutResponse.from_dict(create_checkout_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CreateComputeDeploymentResponse.md b/docs/CreateComputeDeploymentResponse.md index e1ea3b5..0572938 100644 --- a/docs/CreateComputeDeploymentResponse.md +++ b/docs/CreateComputeDeploymentResponse.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **created_at** | **datetime** | | **endpoint_url** | **str** | | **port** | **int** | | -**jupyter_token** | **str** | | +**jupyter_token** | **str** | | [optional] ## Example diff --git a/docs/CreateInferenceDeploymentRequest.md b/docs/CreateInferenceDeploymentRequest.md index d3bec7e..14dc2af 100644 --- a/docs/CreateInferenceDeploymentRequest.md +++ b/docs/CreateInferenceDeploymentRequest.md @@ -15,8 +15,7 @@ Name | Type | Description | Notes **concurrency** | **int** | | [optional] **healthcheck** | **str** | | [optional] **env_vars** | **Dict[str, str]** | | [optional] -**command** | **List[str]** | | [optional] -**command_args** | **List[str]** | | [optional] +**command** | **str** | | [optional] **endpoint_certificate_authority** | **str** | | [optional] ## Example diff --git a/docs/CreateRagDeploymentRequest.md b/docs/CreateRagDeploymentRequest.md index b08202b..6fd4a20 100644 --- a/docs/CreateRagDeploymentRequest.md +++ b/docs/CreateRagDeploymentRequest.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **name** | **str** | | **cluster_id** | **int** | | **hardware_instance_id** | **int** | | -**recipe** | [**CServeV2RecipeInput**](CServeV2RecipeInput.md) | | +**recipe** | [**CServeV2Recipe**](CServeV2Recipe.md) | | **hf_token** | **str** | | [optional] **llm_model** | **str** | | **centml_api_key** | **str** | | diff --git a/docs/CreateUrlRequest.md b/docs/CreateUrlRequest.md new file mode 100644 index 0000000..d5b76d9 --- /dev/null +++ b/docs/CreateUrlRequest.md @@ -0,0 +1,30 @@ +# CreateUrlRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filename** | **str** | | +**extension** | **str** | | + +## Example + +```python +from platform_api_python_client.models.create_url_request import CreateUrlRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateUrlRequest from a JSON string +create_url_request_instance = CreateUrlRequest.from_json(json) +# print the JSON string representation of the object +print(CreateUrlRequest.to_json()) + +# convert the object into a dict +create_url_request_dict = create_url_request_instance.to_dict() +# create an instance of CreateUrlRequest from a dict +create_url_request_from_dict = CreateUrlRequest.from_dict(create_url_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateUrlResponse.md b/docs/CreateUrlResponse.md new file mode 100644 index 0000000..81f271f --- /dev/null +++ b/docs/CreateUrlResponse.md @@ -0,0 +1,29 @@ +# CreateUrlResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | | + +## Example + +```python +from platform_api_python_client.models.create_url_response import CreateUrlResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateUrlResponse from a JSON string +create_url_response_instance = CreateUrlResponse.from_json(json) +# print the JSON string representation of the object +print(CreateUrlResponse.to_json()) + +# convert the object into a dict +create_url_response_dict = create_url_response_instance.to_dict() +# create an instance of CreateUrlResponse from a dict +create_url_response_from_dict = CreateUrlResponse.from_dict(create_url_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DeploymentStatusResponse.md b/docs/DeploymentStatusResponse.md index e6f2239..5af617b 100644 --- a/docs/DeploymentStatusResponse.md +++ b/docs/DeploymentStatusResponse.md @@ -8,9 +8,9 @@ Name | Type | Description | Notes **id** | **int** | | **type** | [**DeploymentType**](DeploymentType.md) | | **status** | [**DeploymentStatus**](DeploymentStatus.md) | | -**service_status** | [**ServiceStatus**](ServiceStatus.md) | | -**error_message** | **str** | | -**endpoint_url** | **str** | | +**service_status** | [**ServiceStatus**](ServiceStatus.md) | | [optional] +**error_message** | **str** | | [optional] +**endpoint_url** | **str** | | [optional] ## Example diff --git a/docs/EXTERNALApi.md b/docs/EXTERNALApi.md index 60c4a81..6913f7a 100644 --- a/docs/EXTERNALApi.md +++ b/docs/EXTERNALApi.md @@ -15,6 +15,7 @@ Method | HTTP request | Description [**create_setup_payments_setup_checkout_post**](EXTERNALApi.md#create_setup_payments_setup_checkout_post) | **POST** /payments/setup_checkout | Create Setup [**delete_api_key_credentials_api_key_id_delete**](EXTERNALApi.md#delete_api_key_credentials_api_key_id_delete) | **DELETE** /credentials/api-key/{id} | Delete Api Key [**delete_user_vault_item_endpoint_user_vault_delete**](EXTERNALApi.md#delete_user_vault_item_endpoint_user_vault_delete) | **DELETE** /user_vault | Delete User Vault Item Endpoint +[**download_url_file_url_download_post**](EXTERNALApi.md#download_url_file_url_download_post) | **POST** /file_url/download | Download Url [**get_all_user_vault_items_endpoint_user_vault_get**](EXTERNALApi.md#get_all_user_vault_items_endpoint_user_vault_get) | **GET** /user_vault | Get All User Vault Items Endpoint [**get_api_keys_credentials_api_key_get**](EXTERNALApi.md#get_api_keys_credentials_api_key_get) | **GET** /credentials/api-key | Get Api Keys [**get_clusters_clusters_get**](EXTERNALApi.md#get_clusters_clusters_get) | **GET** /clusters | Get Clusters @@ -34,8 +35,10 @@ Method | HTTP request | Description [**get_usage_daily_bills_get**](EXTERNALApi.md#get_usage_daily_bills_get) | **GET** /daily_bills | Get Usage [**get_usage_deployments_usage_deployment_id_get**](EXTERNALApi.md#get_usage_deployments_usage_deployment_id_get) | **GET** /deployments/usage/{deployment_id} | Get Usage [**setup_stripe_customer_payments_setup_post**](EXTERNALApi.md#setup_stripe_customer_payments_setup_post) | **POST** /payments/setup | Setup Stripe Customer +[**update_autopay_preferences_autopay_put**](EXTERNALApi.md#update_autopay_preferences_autopay_put) | **PUT** /preferences/autopay | Update Autopay [**update_deployment_status_deployments_status_deployment_id_put**](EXTERNALApi.md#update_deployment_status_deployments_status_deployment_id_put) | **PUT** /deployments/status/{deployment_id} | Update Deployment Status [**update_user_vault_item_endpoint_user_vault_put**](EXTERNALApi.md#update_user_vault_item_endpoint_user_vault_put) | **PUT** /user_vault | Update User Vault Item Endpoint +[**upload_url_file_url_upload_post**](EXTERNALApi.md#upload_url_file_url_upload_post) | **POST** /file_url/upload | Upload Url # **add_user_request_support_user_requests_post** @@ -816,7 +819,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **delete_user_vault_item_endpoint_user_vault_delete** -> object delete_user_vault_item_endpoint_user_vault_delete(user_vault_item_input) +> object delete_user_vault_item_endpoint_user_vault_delete(user_vault_item) Delete User Vault Item Endpoint @@ -828,7 +831,7 @@ Delete an item of a specific type for the user. ```python import platform_api_python_client -from platform_api_python_client.models.user_vault_item_input import UserVaultItemInput +from platform_api_python_client.models.user_vault_item import UserVaultItem from platform_api_python_client.rest import ApiException from pprint import pprint @@ -852,11 +855,11 @@ configuration = platform_api_python_client.Configuration( with platform_api_python_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = platform_api_python_client.EXTERNALApi(api_client) - user_vault_item_input = platform_api_python_client.UserVaultItemInput() # UserVaultItemInput | + user_vault_item = platform_api_python_client.UserVaultItem() # UserVaultItem | try: # Delete User Vault Item Endpoint - api_response = api_instance.delete_user_vault_item_endpoint_user_vault_delete(user_vault_item_input) + api_response = api_instance.delete_user_vault_item_endpoint_user_vault_delete(user_vault_item) print("The response of EXTERNALApi->delete_user_vault_item_endpoint_user_vault_delete:\n") pprint(api_response) except Exception as e: @@ -870,7 +873,7 @@ with platform_api_python_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user_vault_item_input** | [**UserVaultItemInput**](UserVaultItemInput.md)| | + **user_vault_item** | [**UserVaultItem**](UserVaultItem.md)| | ### Return type @@ -894,6 +897,84 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **download_url_file_url_download_post** +> CreateUrlResponse download_url_file_url_download_post(create_url_request) + +Download Url + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.create_url_request import CreateUrlRequest +from platform_api_python_client.models.create_url_response import CreateUrlResponse +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + create_url_request = platform_api_python_client.CreateUrlRequest() # CreateUrlRequest | + + try: + # Download Url + api_response = api_instance.download_url_file_url_download_post(create_url_request) + print("The response of EXTERNALApi->download_url_file_url_download_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->download_url_file_url_download_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_url_request** | [**CreateUrlRequest**](CreateUrlRequest.md)| | + +### Return type + +[**CreateUrlResponse**](CreateUrlResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **get_all_user_vault_items_endpoint_user_vault_get** > ListUserVaultItemsResponse get_all_user_vault_items_endpoint_user_vault_get(type=type, search_query=search_query) @@ -1347,7 +1428,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_cserve_recipe_deployments_cserve_recipes_get** -> ListCServeRecipeResponse get_cserve_recipe_deployments_cserve_recipes_get(model=model, cluster_id=cluster_id) +> ListCServeRecipeResponse get_cserve_recipe_deployments_cserve_recipes_get(model=model, hf_token=hf_token) Get Cserve Recipe @@ -1382,11 +1463,11 @@ with platform_api_python_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = platform_api_python_client.EXTERNALApi(api_client) model = 'model_example' # str | (optional) - cluster_id = 56 # int | (optional) + hf_token = 'hf_token_example' # str | (optional) try: # Get Cserve Recipe - api_response = api_instance.get_cserve_recipe_deployments_cserve_recipes_get(model=model, cluster_id=cluster_id) + api_response = api_instance.get_cserve_recipe_deployments_cserve_recipes_get(model=model, hf_token=hf_token) print("The response of EXTERNALApi->get_cserve_recipe_deployments_cserve_recipes_get:\n") pprint(api_response) except Exception as e: @@ -1401,7 +1482,7 @@ with platform_api_python_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **model** | **str**| | [optional] - **cluster_id** | **int**| | [optional] + **hf_token** | **str**| | [optional] ### Return type @@ -1503,7 +1584,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_deployment_logs_deployments_logs_deployment_id_get** -> GetDeploymentLogResponse get_deployment_logs_deployments_logs_deployment_id_get(deployment_id, start_time, end_time, next_page_token=next_page_token) +> GetDeploymentLogResponse get_deployment_logs_deployments_logs_deployment_id_get(deployment_id, start_time, end_time, next_page_token=next_page_token, start_from_head=start_from_head, line_count=line_count) Get Deployment Logs @@ -1541,10 +1622,12 @@ with platform_api_python_client.ApiClient(configuration) as api_client: start_time = 56 # int | end_time = 56 # int | next_page_token = 'next_page_token_example' # str | (optional) + start_from_head = True # bool | (optional) (default to True) + line_count = 56 # int | (optional) try: # Get Deployment Logs - api_response = api_instance.get_deployment_logs_deployments_logs_deployment_id_get(deployment_id, start_time, end_time, next_page_token=next_page_token) + api_response = api_instance.get_deployment_logs_deployments_logs_deployment_id_get(deployment_id, start_time, end_time, next_page_token=next_page_token, start_from_head=start_from_head, line_count=line_count) print("The response of EXTERNALApi->get_deployment_logs_deployments_logs_deployment_id_get:\n") pprint(api_response) except Exception as e: @@ -1562,6 +1645,8 @@ Name | Type | Description | Notes **start_time** | **int**| | **end_time** | **int**| | **next_page_token** | **str**| | [optional] + **start_from_head** | **bool**| | [optional] [default to True] + **line_count** | **int**| | [optional] ### Return type @@ -1901,7 +1986,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_payments_payments_get** -> GetPaymentsResponse get_payments_payments_get(limit=limit, starting_after=starting_after) +> ListPaymentsResponse get_payments_payments_get() Get Payments @@ -1911,7 +1996,7 @@ Get Payments ```python import platform_api_python_client -from platform_api_python_client.models.get_payments_response import GetPaymentsResponse +from platform_api_python_client.models.list_payments_response import ListPaymentsResponse from platform_api_python_client.rest import ApiException from pprint import pprint @@ -1935,12 +2020,10 @@ configuration = platform_api_python_client.Configuration( with platform_api_python_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = platform_api_python_client.EXTERNALApi(api_client) - limit = 10 # int | (optional) (default to 10) - starting_after = 'starting_after_example' # str | (optional) try: # Get Payments - api_response = api_instance.get_payments_payments_get(limit=limit, starting_after=starting_after) + api_response = api_instance.get_payments_payments_get() print("The response of EXTERNALApi->get_payments_payments_get:\n") pprint(api_response) except Exception as e: @@ -1951,15 +2034,11 @@ with platform_api_python_client.ApiClient(configuration) as api_client: ### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **limit** | **int**| | [optional] [default to 10] - **starting_after** | **str**| | [optional] +This endpoint does not need any parameter. ### Return type -[**GetPaymentsResponse**](GetPaymentsResponse.md) +[**ListPaymentsResponse**](ListPaymentsResponse.md) ### Authorization @@ -1975,7 +2054,6 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Successful Response | - | -**422** | Validation Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2214,7 +2292,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_usage_deployments_usage_deployment_id_get** -> GetDeploymentUsageResponse get_usage_deployments_usage_deployment_id_get(deployment_id, metric, duration, end_time=end_time) +> GetDeploymentUsageResponse get_usage_deployments_usage_deployment_id_get(deployment_id, metric, start_time_in_seconds, end_time_in_seconds, step=step) Get Usage @@ -2251,12 +2329,13 @@ with platform_api_python_client.ApiClient(configuration) as api_client: api_instance = platform_api_python_client.EXTERNALApi(api_client) deployment_id = 56 # int | metric = platform_api_python_client.Metric() # Metric | - duration = 56 # int | - end_time = 56 # int | (optional) + start_time_in_seconds = 56 # int | + end_time_in_seconds = 56 # int | + step = 15 # int | (optional) (default to 15) try: # Get Usage - api_response = api_instance.get_usage_deployments_usage_deployment_id_get(deployment_id, metric, duration, end_time=end_time) + api_response = api_instance.get_usage_deployments_usage_deployment_id_get(deployment_id, metric, start_time_in_seconds, end_time_in_seconds, step=step) print("The response of EXTERNALApi->get_usage_deployments_usage_deployment_id_get:\n") pprint(api_response) except Exception as e: @@ -2272,8 +2351,9 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **deployment_id** | **int**| | **metric** | [**Metric**](.md)| | - **duration** | **int**| | - **end_time** | **int**| | [optional] + **start_time_in_seconds** | **int**| | + **end_time_in_seconds** | **int**| | + **step** | **int**| | [optional] [default to 15] ### Return type @@ -2368,6 +2448,83 @@ This endpoint does not need any parameter. [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **update_autopay_preferences_autopay_put** +> object update_autopay_preferences_autopay_put(update_autopay_request) + +Update Autopay + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.update_autopay_request import UpdateAutopayRequest +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + update_autopay_request = platform_api_python_client.UpdateAutopayRequest() # UpdateAutopayRequest | + + try: + # Update Autopay + api_response = api_instance.update_autopay_preferences_autopay_put(update_autopay_request) + print("The response of EXTERNALApi->update_autopay_preferences_autopay_put:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->update_autopay_preferences_autopay_put: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_autopay_request** | [**UpdateAutopayRequest**](UpdateAutopayRequest.md)| | + +### Return type + +**object** + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **update_deployment_status_deployments_status_deployment_id_put** > DeploymentStatusResponse update_deployment_status_deployments_status_deployment_id_put(deployment_id, deployment_status_request) @@ -2449,7 +2606,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_user_vault_item_endpoint_user_vault_put** -> object update_user_vault_item_endpoint_user_vault_put(user_vault_item_input) +> object update_user_vault_item_endpoint_user_vault_put(user_vault_item) Update User Vault Item Endpoint @@ -2461,7 +2618,7 @@ Update or add multiple items of a specific type for the user. ```python import platform_api_python_client -from platform_api_python_client.models.user_vault_item_input import UserVaultItemInput +from platform_api_python_client.models.user_vault_item import UserVaultItem from platform_api_python_client.rest import ApiException from pprint import pprint @@ -2485,11 +2642,11 @@ configuration = platform_api_python_client.Configuration( with platform_api_python_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = platform_api_python_client.EXTERNALApi(api_client) - user_vault_item_input = platform_api_python_client.UserVaultItemInput() # UserVaultItemInput | + user_vault_item = platform_api_python_client.UserVaultItem() # UserVaultItem | try: # Update User Vault Item Endpoint - api_response = api_instance.update_user_vault_item_endpoint_user_vault_put(user_vault_item_input) + api_response = api_instance.update_user_vault_item_endpoint_user_vault_put(user_vault_item) print("The response of EXTERNALApi->update_user_vault_item_endpoint_user_vault_put:\n") pprint(api_response) except Exception as e: @@ -2503,7 +2660,7 @@ with platform_api_python_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **user_vault_item_input** | [**UserVaultItemInput**](UserVaultItemInput.md)| | + **user_vault_item** | [**UserVaultItem**](UserVaultItem.md)| | ### Return type @@ -2527,3 +2684,81 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **upload_url_file_url_upload_post** +> CreateUrlResponse upload_url_file_url_upload_post(create_url_request) + +Upload Url + +### Example + +* Bearer Authentication (HTTPBearer): + +```python +import platform_api_python_client +from platform_api_python_client.models.create_url_request import CreateUrlRequest +from platform_api_python_client.models.create_url_response import CreateUrlResponse +from platform_api_python_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = platform_api_python_client.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: HTTPBearer +configuration = platform_api_python_client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with platform_api_python_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = platform_api_python_client.EXTERNALApi(api_client) + create_url_request = platform_api_python_client.CreateUrlRequest() # CreateUrlRequest | + + try: + # Upload Url + api_response = api_instance.upload_url_file_url_upload_post(create_url_request) + print("The response of EXTERNALApi->upload_url_file_url_upload_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EXTERNALApi->upload_url_file_url_upload_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_url_request** | [**CreateUrlRequest**](CreateUrlRequest.md)| | + +### Return type + +[**CreateUrlResponse**](CreateUrlResponse.md) + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/GetCServeDeploymentResponse.md b/docs/GetCServeDeploymentResponse.md index f6ca201..561a0b7 100644 --- a/docs/GetCServeDeploymentResponse.md +++ b/docs/GetCServeDeploymentResponse.md @@ -6,43 +6,43 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **model** | **str** | | -**is_embedding_model** | **bool** | | [default to False] +**is_embedding_model** | **bool** | | [optional] [default to False] **tensor_parallel_size** | **int** | | **pipeline_parallel_size** | **int** | | -**block_size** | **int** | | [default to 32] -**swap_space** | **int** | | [default to 0] -**gpu_mem_util** | **float** | | [default to 0.95] -**max_num_seqs** | **int** | | [default to 256] -**offloading_num** | **int** | | [default to 0] -**use_prefix_caching** | **bool** | | -**use_chunked_prefill** | **bool** | | -**chunked_prefill_size** | **int** | | -**eager_execution** | **bool** | | -**num_scheduler_steps** | **int** | | -**use_flashinfer** | **bool** | | [default to False] -**max_model_len** | **int** | | -**dtype** | **str** | | [default to 'auto'] -**tokenizer** | **str** | | -**spec_proposer** | **str** | | -**spec_draft_model** | **str** | | -**spec_tokens** | **int** | | -**spec_prompt_lookup_min** | **int** | | -**spec_prompt_lookup_max** | **int** | | -**seed** | **int** | | [default to 0] +**block_size** | **int** | | [optional] [default to 32] +**swap_space** | **int** | | [optional] [default to 0] +**gpu_mem_util** | **float** | | [optional] [default to 0.95] +**max_num_seqs** | **int** | | [optional] [default to 256] +**offloading_num** | **int** | | [optional] [default to 0] +**use_prefix_caching** | **bool** | | [optional] +**use_chunked_prefill** | **bool** | | [optional] +**chunked_prefill_size** | **int** | | [optional] +**eager_execution** | **bool** | | [optional] +**num_scheduler_steps** | **int** | | [optional] +**use_flashinfer** | **bool** | | [optional] [default to False] +**max_model_len** | **int** | | [optional] +**dtype** | **str** | | [optional] [default to 'auto'] +**tokenizer** | **str** | | [optional] +**spec_proposer** | **str** | | [optional] +**spec_draft_model** | **str** | | [optional] +**spec_tokens** | **int** | | [optional] +**spec_prompt_lookup_min** | **int** | | [optional] +**spec_prompt_lookup_max** | **int** | | [optional] +**seed** | **int** | | [optional] [default to 0] **cluster_id** | **int** | | **id** | **int** | | **name** | **str** | | **endpoint_url** | **str** | | -**image_url** | **str** | | +**image_url** | **str** | | [optional] **type** | [**DeploymentType**](DeploymentType.md) | | **status** | [**DeploymentStatus**](DeploymentStatus.md) | | **created_at** | **datetime** | | **hardware_instance_id** | **int** | | **min_scale** | **int** | | **max_scale** | **int** | | -**endpoint_certificate_authority** | **str** | | -**concurrency** | **int** | | -**env_vars** | **Dict[str, str]** | | +**endpoint_certificate_authority** | **str** | | [optional] +**concurrency** | **int** | | [optional] +**env_vars** | **Dict[str, str]** | | [optional] ## Example diff --git a/docs/GetCServeV2DeploymentResponse.md b/docs/GetCServeV2DeploymentResponse.md index 660be09..87e91d7 100644 --- a/docs/GetCServeV2DeploymentResponse.md +++ b/docs/GetCServeV2DeploymentResponse.md @@ -9,17 +9,17 @@ Name | Type | Description | Notes **id** | **int** | | **name** | **str** | | **endpoint_url** | **str** | | -**image_url** | **str** | | +**image_url** | **str** | | [optional] **type** | [**DeploymentType**](DeploymentType.md) | | **status** | [**DeploymentStatus**](DeploymentStatus.md) | | **created_at** | **datetime** | | **hardware_instance_id** | **int** | | -**recipe** | [**CServeV2RecipeOutput**](CServeV2RecipeOutput.md) | | +**recipe** | [**CServeV2Recipe**](CServeV2Recipe.md) | | **min_scale** | **int** | | **max_scale** | **int** | | -**endpoint_certificate_authority** | **str** | | -**concurrency** | **int** | | -**env_vars** | **Dict[str, str]** | | +**endpoint_certificate_authority** | **str** | | [optional] +**concurrency** | **int** | | [optional] +**env_vars** | **Dict[str, str]** | | [optional] ## Example diff --git a/docs/GetClusterResponse.md b/docs/GetClusterResponse.md index a18bbc3..58142d0 100644 --- a/docs/GetClusterResponse.md +++ b/docs/GetClusterResponse.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | | **display_name** | **str** | | -**region** | **str** | | +**region** | **str** | | [optional] ## Example diff --git a/docs/GetComputeDeploymentResponse.md b/docs/GetComputeDeploymentResponse.md index 0a1876b..ea2b741 100644 --- a/docs/GetComputeDeploymentResponse.md +++ b/docs/GetComputeDeploymentResponse.md @@ -9,15 +9,15 @@ Name | Type | Description | Notes **id** | **int** | | **name** | **str** | | **endpoint_url** | **str** | | -**image_url** | **str** | | +**image_url** | **str** | | [optional] **type** | [**DeploymentType**](DeploymentType.md) | | **status** | [**DeploymentStatus**](DeploymentStatus.md) | | **created_at** | **datetime** | | **hardware_instance_id** | **int** | | **exposed_port** | **int** | | -**ssh_public_key** | **str** | | -**ssh_password** | **str** | | -**env_vars** | **Dict[str, str]** | | +**ssh_public_key** | **str** | | [optional] +**ssh_password** | **str** | | [optional] +**env_vars** | **Dict[str, str]** | | [optional] ## Example diff --git a/docs/GetDeploymentLogResponse.md b/docs/GetDeploymentLogResponse.md index a75aa7d..ea0b847 100644 --- a/docs/GetDeploymentLogResponse.md +++ b/docs/GetDeploymentLogResponse.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **events** | **List[object]** | | -**next_page_token** | **str** | | +**next_page_token** | **str** | | [optional] ## Example diff --git a/docs/GetDeploymentResponse.md b/docs/GetDeploymentResponse.md index 84c0fdd..f37a49b 100644 --- a/docs/GetDeploymentResponse.md +++ b/docs/GetDeploymentResponse.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **id** | **int** | | **name** | **str** | | **endpoint_url** | **str** | | -**image_url** | **str** | | +**image_url** | **str** | | [optional] **type** | [**DeploymentType**](DeploymentType.md) | | **status** | [**DeploymentStatus**](DeploymentStatus.md) | | **created_at** | **datetime** | | diff --git a/docs/GetInferenceDeploymentResponse.md b/docs/GetInferenceDeploymentResponse.md index 023b9c0..ae2c724 100644 --- a/docs/GetInferenceDeploymentResponse.md +++ b/docs/GetInferenceDeploymentResponse.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **id** | **int** | | **name** | **str** | | **endpoint_url** | **str** | | -**image_url** | **str** | | +**image_url** | **str** | | [optional] **type** | [**DeploymentType**](DeploymentType.md) | | **status** | [**DeploymentStatus**](DeploymentStatus.md) | | **created_at** | **datetime** | | @@ -17,12 +17,12 @@ Name | Type | Description | Notes **container_port** | **int** | | **min_scale** | **int** | | **max_scale** | **int** | | -**concurrency** | **int** | | -**healthcheck** | **str** | | -**endpoint_certificate_authority** | **str** | | -**env_vars** | **Dict[str, str]** | | -**command** | **List[str]** | | -**command_args** | **List[str]** | | +**concurrency** | **int** | | [optional] +**healthcheck** | **str** | | [optional] +**endpoint_certificate_authority** | **str** | | [optional] +**env_vars** | **Dict[str, str]** | | [optional] +**command** | **List[str]** | | [optional] +**command_args** | **List[str]** | | [optional] ## Example diff --git a/docs/GetPaymentResponse.md b/docs/GetPaymentResponse.md new file mode 100644 index 0000000..2e87104 --- /dev/null +++ b/docs/GetPaymentResponse.md @@ -0,0 +1,32 @@ +# GetPaymentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**created** | **int** | | +**amount_total** | **int** | | +**credit_total** | **int** | | + +## Example + +```python +from platform_api_python_client.models.get_payment_response import GetPaymentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GetPaymentResponse from a JSON string +get_payment_response_instance = GetPaymentResponse.from_json(json) +# print the JSON string representation of the object +print(GetPaymentResponse.to_json()) + +# convert the object into a dict +get_payment_response_dict = get_payment_response_instance.to_dict() +# create an instance of GetPaymentResponse from a dict +get_payment_response_from_dict = GetPaymentResponse.from_dict(get_payment_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetPaymentsResponse.md b/docs/GetPaymentsResponse.md deleted file mode 100644 index 8266139..0000000 --- a/docs/GetPaymentsResponse.md +++ /dev/null @@ -1,30 +0,0 @@ -# GetPaymentsResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**has_more** | **bool** | | -**payments** | **List[object]** | | - -## Example - -```python -from platform_api_python_client.models.get_payments_response import GetPaymentsResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of GetPaymentsResponse from a JSON string -get_payments_response_instance = GetPaymentsResponse.from_json(json) -# print the JSON string representation of the object -print(GetPaymentsResponse.to_json()) - -# convert the object into a dict -get_payments_response_dict = get_payments_response_instance.to_dict() -# create an instance of GetPaymentsResponse from a dict -get_payments_response_from_dict = GetPaymentsResponse.from_dict(get_payments_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/GetRagDeploymentResponse.md b/docs/GetRagDeploymentResponse.md index 2a9f99b..d866ae8 100644 --- a/docs/GetRagDeploymentResponse.md +++ b/docs/GetRagDeploymentResponse.md @@ -9,19 +9,19 @@ Name | Type | Description | Notes **id** | **int** | | **name** | **str** | | **endpoint_url** | **str** | | -**image_url** | **str** | | +**image_url** | **str** | | [optional] **type** | [**DeploymentType**](DeploymentType.md) | | **status** | [**DeploymentStatus**](DeploymentStatus.md) | | **created_at** | **datetime** | | **hardware_instance_id** | **int** | | -**recipe** | [**CServeV2RecipeOutput**](CServeV2RecipeOutput.md) | | +**recipe** | [**CServeV2Recipe**](CServeV2Recipe.md) | | **llm_model** | **str** | | **centml_api_key** | **str** | | -**min_scale** | **int** | | [default to 1] -**max_scale** | **int** | | [default to 1] -**endpoint_certificate_authority** | **str** | | -**concurrency** | **int** | | -**env_vars** | **Dict[str, str]** | | +**min_scale** | **int** | | [optional] [default to 1] +**max_scale** | **int** | | [optional] [default to 1] +**endpoint_certificate_authority** | **str** | | [optional] +**concurrency** | **int** | | [optional] +**env_vars** | **Dict[str, str]** | | [optional] ## Example diff --git a/docs/HardwareInstanceResponse.md b/docs/HardwareInstanceResponse.md index 137c575..7b67fb3 100644 --- a/docs/HardwareInstanceResponse.md +++ b/docs/HardwareInstanceResponse.md @@ -13,8 +13,9 @@ Name | Type | Description | Notes **memory** | **int** | | **cost_per_hr** | **int** | | **cluster_id** | **int** | | -**provider** | **str** | | -**num_accelerators** | **int** | | +**provider** | **str** | | [optional] +**num_accelerators** | **int** | | [optional] +**accelerator_memory** | **int** | | [optional] ## Example diff --git a/docs/ListPaymentsResponse.md b/docs/ListPaymentsResponse.md new file mode 100644 index 0000000..c3c463d --- /dev/null +++ b/docs/ListPaymentsResponse.md @@ -0,0 +1,29 @@ +# ListPaymentsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**payments** | [**List[GetPaymentResponse]**](GetPaymentResponse.md) | | + +## Example + +```python +from platform_api_python_client.models.list_payments_response import ListPaymentsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ListPaymentsResponse from a JSON string +list_payments_response_instance = ListPaymentsResponse.from_json(json) +# print the JSON string representation of the object +print(ListPaymentsResponse.to_json()) + +# convert the object into a dict +list_payments_response_dict = list_payments_response_instance.to_dict() +# create an instance of ListPaymentsResponse from a dict +list_payments_response_from_dict = ListPaymentsResponse.from_dict(list_payments_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ListUserVaultItemsResponse.md b/docs/ListUserVaultItemsResponse.md index f817e0e..30aa12c 100644 --- a/docs/ListUserVaultItemsResponse.md +++ b/docs/ListUserVaultItemsResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**results** | [**List[UserVaultItemOutput]**](UserVaultItemOutput.md) | | +**results** | [**List[UserVaultItem]**](UserVaultItem.md) | | ## Example diff --git a/docs/PrebuiltImageResponse.md b/docs/PrebuiltImageResponse.md index f318dff..0f730d0 100644 --- a/docs/PrebuiltImageResponse.md +++ b/docs/PrebuiltImageResponse.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **tags** | **List[str]** | | **type** | [**DeploymentType**](DeploymentType.md) | | **port** | **int** | | -**healthcheck** | **str** | | +**healthcheck** | **str** | | [optional] ## Example diff --git a/docs/UpdateAutopayRequest.md b/docs/UpdateAutopayRequest.md new file mode 100644 index 0000000..1916f5c --- /dev/null +++ b/docs/UpdateAutopayRequest.md @@ -0,0 +1,30 @@ +# UpdateAutopayRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**threshold** | **int** | | [optional] +**amount** | **int** | | [optional] + +## Example + +```python +from platform_api_python_client.models.update_autopay_request import UpdateAutopayRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateAutopayRequest from a JSON string +update_autopay_request_instance = UpdateAutopayRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateAutopayRequest.to_json()) + +# convert the object into a dict +update_autopay_request_dict = update_autopay_request_instance.to_dict() +# create an instance of UpdateAutopayRequest from a dict +update_autopay_request_from_dict = UpdateAutopayRequest.from_dict(update_autopay_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserVaultItem.md b/docs/UserVaultItem.md new file mode 100644 index 0000000..dc7c1dc --- /dev/null +++ b/docs/UserVaultItem.md @@ -0,0 +1,31 @@ +# UserVaultItem + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | [**UserVaultType**](UserVaultType.md) | | +**key** | **str** | | +**value** | **str** | | [optional] + +## Example + +```python +from platform_api_python_client.models.user_vault_item import UserVaultItem + +# TODO update the JSON string below +json = "{}" +# create an instance of UserVaultItem from a JSON string +user_vault_item_instance = UserVaultItem.from_json(json) +# print the JSON string representation of the object +print(UserVaultItem.to_json()) + +# convert the object into a dict +user_vault_item_dict = user_vault_item_instance.to_dict() +# create an instance of UserVaultItem from a dict +user_vault_item_from_dict = UserVaultItem.from_dict(user_vault_item_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/platform_api_python_client/__init__.py b/platform_api_python_client/__init__.py index 62068b8..e597592 100644 --- a/platform_api_python_client/__init__.py +++ b/platform_api_python_client/__init__.py @@ -14,7 +14,7 @@ """ # noqa: E501 -__version__ = "3.1.16" +__version__ = "3.2.4" # import apis into sdk package from platform_api_python_client.api.external_api import EXTERNALApi @@ -36,8 +36,7 @@ from platform_api_python_client.models.c_serve_recipe import CServeRecipe from platform_api_python_client.models.c_serve_recipe_perf import CServeRecipePerf from platform_api_python_client.models.c_serve_recipe_response import CServeRecipeResponse -from platform_api_python_client.models.c_serve_v2_recipe_input import CServeV2RecipeInput -from platform_api_python_client.models.c_serve_v2_recipe_output import CServeV2RecipeOutput +from platform_api_python_client.models.c_serve_v2_recipe import CServeV2Recipe from platform_api_python_client.models.create_c_serve_deployment_request import CreateCServeDeploymentRequest from platform_api_python_client.models.create_c_serve_deployment_response import CreateCServeDeploymentResponse from platform_api_python_client.models.create_c_serve_v2_deployment_request import CreateCServeV2DeploymentRequest @@ -51,6 +50,8 @@ from platform_api_python_client.models.create_rag_deployment_request import CreateRagDeploymentRequest from platform_api_python_client.models.create_rag_deployment_response import CreateRagDeploymentResponse from platform_api_python_client.models.create_setup_checkout_request import CreateSetupCheckoutRequest +from platform_api_python_client.models.create_url_request import CreateUrlRequest +from platform_api_python_client.models.create_url_response import CreateUrlResponse from platform_api_python_client.models.credits_response import CreditsResponse from platform_api_python_client.models.daily_bill_response import DailyBillResponse from platform_api_python_client.models.deployment_status import DeploymentStatus @@ -66,7 +67,7 @@ from platform_api_python_client.models.get_deployment_response import GetDeploymentResponse from platform_api_python_client.models.get_deployment_usage_response import GetDeploymentUsageResponse from platform_api_python_client.models.get_inference_deployment_response import GetInferenceDeploymentResponse -from platform_api_python_client.models.get_payments_response import GetPaymentsResponse +from platform_api_python_client.models.get_payment_response import GetPaymentResponse from platform_api_python_client.models.get_rag_deployment_response import GetRagDeploymentResponse from platform_api_python_client.models.http_validation_error import HTTPValidationError from platform_api_python_client.models.hardware_instance_response import HardwareInstanceResponse @@ -76,14 +77,15 @@ from platform_api_python_client.models.list_get_cluster_response import ListGetClusterResponse from platform_api_python_client.models.list_get_deployment_response import ListGetDeploymentResponse from platform_api_python_client.models.list_hardware_instance_response import ListHardwareInstanceResponse +from platform_api_python_client.models.list_payments_response import ListPaymentsResponse from platform_api_python_client.models.list_prebuilt_image_response import ListPrebuiltImageResponse from platform_api_python_client.models.list_user_vault_items_response import ListUserVaultItemsResponse from platform_api_python_client.models.metric import Metric from platform_api_python_client.models.prebuilt_image_response import PrebuiltImageResponse from platform_api_python_client.models.service_status import ServiceStatus +from platform_api_python_client.models.update_autopay_request import UpdateAutopayRequest from platform_api_python_client.models.user_support_email_request import UserSupportEmailRequest -from platform_api_python_client.models.user_vault_item_input import UserVaultItemInput -from platform_api_python_client.models.user_vault_item_output import UserVaultItemOutput +from platform_api_python_client.models.user_vault_item import UserVaultItem from platform_api_python_client.models.user_vault_type import UserVaultType from platform_api_python_client.models.validation_error import ValidationError from platform_api_python_client.models.validation_error_loc_inner import ValidationErrorLocInner diff --git a/platform_api_python_client/api/external_api.py b/platform_api_python_client/api/external_api.py index 09fc424..2fcad63 100644 --- a/platform_api_python_client/api/external_api.py +++ b/platform_api_python_client/api/external_api.py @@ -17,7 +17,7 @@ from typing_extensions import Annotated from datetime import date -from pydantic import StrictInt, StrictStr +from pydantic import StrictBool, StrictInt, StrictStr from typing import Any, Optional from platform_api_python_client.models.api_key_request import APIKeyRequest from platform_api_python_client.models.api_key_response import APIKeyResponse @@ -34,6 +34,8 @@ from platform_api_python_client.models.create_rag_deployment_request import CreateRagDeploymentRequest from platform_api_python_client.models.create_rag_deployment_response import CreateRagDeploymentResponse from platform_api_python_client.models.create_setup_checkout_request import CreateSetupCheckoutRequest +from platform_api_python_client.models.create_url_request import CreateUrlRequest +from platform_api_python_client.models.create_url_response import CreateUrlResponse from platform_api_python_client.models.credits_response import CreditsResponse from platform_api_python_client.models.deployment_status_request import DeploymentStatusRequest from platform_api_python_client.models.deployment_status_response import DeploymentStatusResponse @@ -44,7 +46,6 @@ from platform_api_python_client.models.get_deployment_log_response import GetDeploymentLogResponse from platform_api_python_client.models.get_deployment_usage_response import GetDeploymentUsageResponse from platform_api_python_client.models.get_inference_deployment_response import GetInferenceDeploymentResponse -from platform_api_python_client.models.get_payments_response import GetPaymentsResponse from platform_api_python_client.models.get_rag_deployment_response import GetRagDeploymentResponse from platform_api_python_client.models.list_api_key_response import ListAPIKeyResponse from platform_api_python_client.models.list_c_serve_recipe_response import ListCServeRecipeResponse @@ -52,11 +53,13 @@ from platform_api_python_client.models.list_get_cluster_response import ListGetClusterResponse from platform_api_python_client.models.list_get_deployment_response import ListGetDeploymentResponse from platform_api_python_client.models.list_hardware_instance_response import ListHardwareInstanceResponse +from platform_api_python_client.models.list_payments_response import ListPaymentsResponse from platform_api_python_client.models.list_prebuilt_image_response import ListPrebuiltImageResponse from platform_api_python_client.models.list_user_vault_items_response import ListUserVaultItemsResponse from platform_api_python_client.models.metric import Metric +from platform_api_python_client.models.update_autopay_request import UpdateAutopayRequest from platform_api_python_client.models.user_support_email_request import UserSupportEmailRequest -from platform_api_python_client.models.user_vault_item_input import UserVaultItemInput +from platform_api_python_client.models.user_vault_item import UserVaultItem from platform_api_python_client.models.user_vault_type import UserVaultType from platform_api_python_client.api_client import ApiClient, RequestSerialized @@ -2807,7 +2810,7 @@ def _delete_api_key_credentials_api_key_id_delete_serialize( @validate_call def delete_user_vault_item_endpoint_user_vault_delete( self, - user_vault_item_input: UserVaultItemInput, + user_vault_item: UserVaultItem, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2825,8 +2828,8 @@ def delete_user_vault_item_endpoint_user_vault_delete( Delete an item of a specific type for the user. - :param user_vault_item_input: (required) - :type user_vault_item_input: UserVaultItemInput + :param user_vault_item: (required) + :type user_vault_item: UserVaultItem :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2850,7 +2853,7 @@ def delete_user_vault_item_endpoint_user_vault_delete( """ # noqa: E501 _param = self._delete_user_vault_item_endpoint_user_vault_delete_serialize( - user_vault_item_input=user_vault_item_input, + user_vault_item=user_vault_item, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2875,7 +2878,7 @@ def delete_user_vault_item_endpoint_user_vault_delete( @validate_call def delete_user_vault_item_endpoint_user_vault_delete_with_http_info( self, - user_vault_item_input: UserVaultItemInput, + user_vault_item: UserVaultItem, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2893,8 +2896,8 @@ def delete_user_vault_item_endpoint_user_vault_delete_with_http_info( Delete an item of a specific type for the user. - :param user_vault_item_input: (required) - :type user_vault_item_input: UserVaultItemInput + :param user_vault_item: (required) + :type user_vault_item: UserVaultItem :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2918,7 +2921,7 @@ def delete_user_vault_item_endpoint_user_vault_delete_with_http_info( """ # noqa: E501 _param = self._delete_user_vault_item_endpoint_user_vault_delete_serialize( - user_vault_item_input=user_vault_item_input, + user_vault_item=user_vault_item, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2943,7 +2946,7 @@ def delete_user_vault_item_endpoint_user_vault_delete_with_http_info( @validate_call def delete_user_vault_item_endpoint_user_vault_delete_without_preload_content( self, - user_vault_item_input: UserVaultItemInput, + user_vault_item: UserVaultItem, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2961,8 +2964,8 @@ def delete_user_vault_item_endpoint_user_vault_delete_without_preload_content( Delete an item of a specific type for the user. - :param user_vault_item_input: (required) - :type user_vault_item_input: UserVaultItemInput + :param user_vault_item: (required) + :type user_vault_item: UserVaultItem :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2986,7 +2989,7 @@ def delete_user_vault_item_endpoint_user_vault_delete_without_preload_content( """ # noqa: E501 _param = self._delete_user_vault_item_endpoint_user_vault_delete_serialize( - user_vault_item_input=user_vault_item_input, + user_vault_item=user_vault_item, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3006,7 +3009,7 @@ def delete_user_vault_item_endpoint_user_vault_delete_without_preload_content( def _delete_user_vault_item_endpoint_user_vault_delete_serialize( self, - user_vault_item_input, + user_vault_item, _request_auth, _content_type, _headers, @@ -3032,8 +3035,8 @@ def _delete_user_vault_item_endpoint_user_vault_delete_serialize( # process the header parameters # process the form parameters # process the body parameter - if user_vault_item_input is not None: - _body_params = user_vault_item_input + if user_vault_item is not None: + _body_params = user_vault_item # set the HTTP header `Accept` @@ -3081,6 +3084,280 @@ def _delete_user_vault_item_endpoint_user_vault_delete_serialize( + @validate_call + def download_url_file_url_download_post( + self, + create_url_request: CreateUrlRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CreateUrlResponse: + """Download Url + + + :param create_url_request: (required) + :type create_url_request: CreateUrlRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._download_url_file_url_download_post_serialize( + create_url_request=create_url_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateUrlResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def download_url_file_url_download_post_with_http_info( + self, + create_url_request: CreateUrlRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CreateUrlResponse]: + """Download Url + + + :param create_url_request: (required) + :type create_url_request: CreateUrlRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._download_url_file_url_download_post_serialize( + create_url_request=create_url_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateUrlResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def download_url_file_url_download_post_without_preload_content( + self, + create_url_request: CreateUrlRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Download Url + + + :param create_url_request: (required) + :type create_url_request: CreateUrlRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._download_url_file_url_download_post_serialize( + create_url_request=create_url_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateUrlResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _download_url_file_url_download_post_serialize( + self, + create_url_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_url_request is not None: + _body_params = create_url_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/file_url/download', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def get_all_user_vault_items_endpoint_user_vault_get( self, @@ -4619,7 +4896,7 @@ def _get_cserve_deployment_deployments_cserve_deployment_id_get_serialize( def get_cserve_recipe_deployments_cserve_recipes_get( self, model: Optional[StrictStr] = None, - cluster_id: Optional[StrictInt] = None, + hf_token: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4638,8 +4915,8 @@ def get_cserve_recipe_deployments_cserve_recipes_get( :param model: :type model: str - :param cluster_id: - :type cluster_id: int + :param hf_token: + :type hf_token: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4664,7 +4941,7 @@ def get_cserve_recipe_deployments_cserve_recipes_get( _param = self._get_cserve_recipe_deployments_cserve_recipes_get_serialize( model=model, - cluster_id=cluster_id, + hf_token=hf_token, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4690,7 +4967,7 @@ def get_cserve_recipe_deployments_cserve_recipes_get( def get_cserve_recipe_deployments_cserve_recipes_get_with_http_info( self, model: Optional[StrictStr] = None, - cluster_id: Optional[StrictInt] = None, + hf_token: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4709,8 +4986,8 @@ def get_cserve_recipe_deployments_cserve_recipes_get_with_http_info( :param model: :type model: str - :param cluster_id: - :type cluster_id: int + :param hf_token: + :type hf_token: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4735,7 +5012,7 @@ def get_cserve_recipe_deployments_cserve_recipes_get_with_http_info( _param = self._get_cserve_recipe_deployments_cserve_recipes_get_serialize( model=model, - cluster_id=cluster_id, + hf_token=hf_token, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4761,7 +5038,7 @@ def get_cserve_recipe_deployments_cserve_recipes_get_with_http_info( def get_cserve_recipe_deployments_cserve_recipes_get_without_preload_content( self, model: Optional[StrictStr] = None, - cluster_id: Optional[StrictInt] = None, + hf_token: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4780,8 +5057,8 @@ def get_cserve_recipe_deployments_cserve_recipes_get_without_preload_content( :param model: :type model: str - :param cluster_id: - :type cluster_id: int + :param hf_token: + :type hf_token: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4806,7 +5083,7 @@ def get_cserve_recipe_deployments_cserve_recipes_get_without_preload_content( _param = self._get_cserve_recipe_deployments_cserve_recipes_get_serialize( model=model, - cluster_id=cluster_id, + hf_token=hf_token, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4827,7 +5104,7 @@ def get_cserve_recipe_deployments_cserve_recipes_get_without_preload_content( def _get_cserve_recipe_deployments_cserve_recipes_get_serialize( self, model, - cluster_id, + hf_token, _request_auth, _content_type, _headers, @@ -4854,9 +5131,9 @@ def _get_cserve_recipe_deployments_cserve_recipes_get_serialize( _query_params.append(('model', model)) - if cluster_id is not None: + if hf_token is not None: - _query_params.append(('cluster_id', cluster_id)) + _query_params.append(('hf_token', hf_token)) # process the header parameters # process the form parameters @@ -5163,6 +5440,8 @@ def get_deployment_logs_deployments_logs_deployment_id_get( start_time: StrictInt, end_time: StrictInt, next_page_token: Optional[StrictStr] = None, + start_from_head: Optional[StrictBool] = None, + line_count: Optional[StrictInt] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5187,6 +5466,10 @@ def get_deployment_logs_deployments_logs_deployment_id_get( :type end_time: int :param next_page_token: :type next_page_token: str + :param start_from_head: + :type start_from_head: bool + :param line_count: + :type line_count: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5214,6 +5497,8 @@ def get_deployment_logs_deployments_logs_deployment_id_get( start_time=start_time, end_time=end_time, next_page_token=next_page_token, + start_from_head=start_from_head, + line_count=line_count, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5242,6 +5527,8 @@ def get_deployment_logs_deployments_logs_deployment_id_get_with_http_info( start_time: StrictInt, end_time: StrictInt, next_page_token: Optional[StrictStr] = None, + start_from_head: Optional[StrictBool] = None, + line_count: Optional[StrictInt] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5266,6 +5553,10 @@ def get_deployment_logs_deployments_logs_deployment_id_get_with_http_info( :type end_time: int :param next_page_token: :type next_page_token: str + :param start_from_head: + :type start_from_head: bool + :param line_count: + :type line_count: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5293,6 +5584,8 @@ def get_deployment_logs_deployments_logs_deployment_id_get_with_http_info( start_time=start_time, end_time=end_time, next_page_token=next_page_token, + start_from_head=start_from_head, + line_count=line_count, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5321,6 +5614,8 @@ def get_deployment_logs_deployments_logs_deployment_id_get_without_preload_conte start_time: StrictInt, end_time: StrictInt, next_page_token: Optional[StrictStr] = None, + start_from_head: Optional[StrictBool] = None, + line_count: Optional[StrictInt] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5345,6 +5640,10 @@ def get_deployment_logs_deployments_logs_deployment_id_get_without_preload_conte :type end_time: int :param next_page_token: :type next_page_token: str + :param start_from_head: + :type start_from_head: bool + :param line_count: + :type line_count: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5372,6 +5671,8 @@ def get_deployment_logs_deployments_logs_deployment_id_get_without_preload_conte start_time=start_time, end_time=end_time, next_page_token=next_page_token, + start_from_head=start_from_head, + line_count=line_count, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5395,6 +5696,8 @@ def _get_deployment_logs_deployments_logs_deployment_id_get_serialize( start_time, end_time, next_page_token, + start_from_head, + line_count, _request_auth, _content_type, _headers, @@ -5431,6 +5734,14 @@ def _get_deployment_logs_deployments_logs_deployment_id_get_serialize( _query_params.append(('end_time', end_time)) + if start_from_head is not None: + + _query_params.append(('start_from_head', start_from_head)) + + if line_count is not None: + + _query_params.append(('line_count', line_count)) + # process the header parameters # process the form parameters # process the body parameter @@ -6570,8 +6881,6 @@ def _get_inference_deployment_deployments_inference_deployment_id_get_serialize( @validate_call def get_payments_payments_get( self, - limit: Optional[StrictInt] = None, - starting_after: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6584,14 +6893,10 @@ def get_payments_payments_get( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetPaymentsResponse: + ) -> ListPaymentsResponse: """Get Payments - :param limit: - :type limit: int - :param starting_after: - :type starting_after: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6615,8 +6920,6 @@ def get_payments_payments_get( """ # noqa: E501 _param = self._get_payments_payments_get_serialize( - limit=limit, - starting_after=starting_after, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6624,8 +6927,7 @@ def get_payments_payments_get( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetPaymentsResponse", - '422': "HTTPValidationError", + '200': "ListPaymentsResponse", } response_data = self.api_client.call_api( *_param, @@ -6641,8 +6943,6 @@ def get_payments_payments_get( @validate_call def get_payments_payments_get_with_http_info( self, - limit: Optional[StrictInt] = None, - starting_after: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6655,14 +6955,10 @@ def get_payments_payments_get_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetPaymentsResponse]: + ) -> ApiResponse[ListPaymentsResponse]: """Get Payments - :param limit: - :type limit: int - :param starting_after: - :type starting_after: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6686,8 +6982,6 @@ def get_payments_payments_get_with_http_info( """ # noqa: E501 _param = self._get_payments_payments_get_serialize( - limit=limit, - starting_after=starting_after, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6695,8 +6989,7 @@ def get_payments_payments_get_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetPaymentsResponse", - '422': "HTTPValidationError", + '200': "ListPaymentsResponse", } response_data = self.api_client.call_api( *_param, @@ -6712,8 +7005,6 @@ def get_payments_payments_get_with_http_info( @validate_call def get_payments_payments_get_without_preload_content( self, - limit: Optional[StrictInt] = None, - starting_after: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6730,10 +7021,6 @@ def get_payments_payments_get_without_preload_content( """Get Payments - :param limit: - :type limit: int - :param starting_after: - :type starting_after: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6757,8 +7044,6 @@ def get_payments_payments_get_without_preload_content( """ # noqa: E501 _param = self._get_payments_payments_get_serialize( - limit=limit, - starting_after=starting_after, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6766,8 +7051,7 @@ def get_payments_payments_get_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetPaymentsResponse", - '422': "HTTPValidationError", + '200': "ListPaymentsResponse", } response_data = self.api_client.call_api( *_param, @@ -6778,8 +7062,6 @@ def get_payments_payments_get_without_preload_content( def _get_payments_payments_get_serialize( self, - limit, - starting_after, _request_auth, _content_type, _headers, @@ -6802,14 +7084,6 @@ def _get_payments_payments_get_serialize( # process the path parameters # process the query parameters - if limit is not None: - - _query_params.append(('limit', limit)) - - if starting_after is not None: - - _query_params.append(('starting_after', starting_after)) - # process the header parameters # process the form parameters # process the body parameter @@ -7674,8 +7948,9 @@ def get_usage_deployments_usage_deployment_id_get( self, deployment_id: StrictInt, metric: Metric, - duration: StrictInt, - end_time: Optional[StrictInt] = None, + start_time_in_seconds: StrictInt, + end_time_in_seconds: StrictInt, + step: Optional[StrictInt] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7696,10 +7971,12 @@ def get_usage_deployments_usage_deployment_id_get( :type deployment_id: int :param metric: (required) :type metric: Metric - :param duration: (required) - :type duration: int - :param end_time: - :type end_time: int + :param start_time_in_seconds: (required) + :type start_time_in_seconds: int + :param end_time_in_seconds: (required) + :type end_time_in_seconds: int + :param step: + :type step: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7725,8 +8002,9 @@ def get_usage_deployments_usage_deployment_id_get( _param = self._get_usage_deployments_usage_deployment_id_get_serialize( deployment_id=deployment_id, metric=metric, - duration=duration, - end_time=end_time, + start_time_in_seconds=start_time_in_seconds, + end_time_in_seconds=end_time_in_seconds, + step=step, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7753,8 +8031,9 @@ def get_usage_deployments_usage_deployment_id_get_with_http_info( self, deployment_id: StrictInt, metric: Metric, - duration: StrictInt, - end_time: Optional[StrictInt] = None, + start_time_in_seconds: StrictInt, + end_time_in_seconds: StrictInt, + step: Optional[StrictInt] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7775,10 +8054,12 @@ def get_usage_deployments_usage_deployment_id_get_with_http_info( :type deployment_id: int :param metric: (required) :type metric: Metric - :param duration: (required) - :type duration: int - :param end_time: - :type end_time: int + :param start_time_in_seconds: (required) + :type start_time_in_seconds: int + :param end_time_in_seconds: (required) + :type end_time_in_seconds: int + :param step: + :type step: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7804,8 +8085,9 @@ def get_usage_deployments_usage_deployment_id_get_with_http_info( _param = self._get_usage_deployments_usage_deployment_id_get_serialize( deployment_id=deployment_id, metric=metric, - duration=duration, - end_time=end_time, + start_time_in_seconds=start_time_in_seconds, + end_time_in_seconds=end_time_in_seconds, + step=step, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7832,8 +8114,9 @@ def get_usage_deployments_usage_deployment_id_get_without_preload_content( self, deployment_id: StrictInt, metric: Metric, - duration: StrictInt, - end_time: Optional[StrictInt] = None, + start_time_in_seconds: StrictInt, + end_time_in_seconds: StrictInt, + step: Optional[StrictInt] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7854,10 +8137,12 @@ def get_usage_deployments_usage_deployment_id_get_without_preload_content( :type deployment_id: int :param metric: (required) :type metric: Metric - :param duration: (required) - :type duration: int - :param end_time: - :type end_time: int + :param start_time_in_seconds: (required) + :type start_time_in_seconds: int + :param end_time_in_seconds: (required) + :type end_time_in_seconds: int + :param step: + :type step: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7883,8 +8168,9 @@ def get_usage_deployments_usage_deployment_id_get_without_preload_content( _param = self._get_usage_deployments_usage_deployment_id_get_serialize( deployment_id=deployment_id, metric=metric, - duration=duration, - end_time=end_time, + start_time_in_seconds=start_time_in_seconds, + end_time_in_seconds=end_time_in_seconds, + step=step, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7906,8 +8192,9 @@ def _get_usage_deployments_usage_deployment_id_get_serialize( self, deployment_id, metric, - duration, - end_time, + start_time_in_seconds, + end_time_in_seconds, + step, _request_auth, _content_type, _headers, @@ -7936,13 +8223,17 @@ def _get_usage_deployments_usage_deployment_id_get_serialize( _query_params.append(('metric', metric.value)) - if duration is not None: + if start_time_in_seconds is not None: - _query_params.append(('duration', duration)) + _query_params.append(('start_time_in_seconds', start_time_in_seconds)) - if end_time is not None: + if end_time_in_seconds is not None: - _query_params.append(('end_time', end_time)) + _query_params.append(('end_time_in_seconds', end_time_in_seconds)) + + if step is not None: + + _query_params.append(('step', step)) # process the header parameters # process the form parameters @@ -8225,10 +8516,9 @@ def _setup_stripe_customer_payments_setup_post_serialize( @validate_call - def update_deployment_status_deployments_status_deployment_id_put( + def update_autopay_preferences_autopay_put( self, - deployment_id: StrictInt, - deployment_status_request: DeploymentStatusRequest, + update_autopay_request: UpdateAutopayRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -8241,14 +8531,12 @@ def update_deployment_status_deployments_status_deployment_id_put( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DeploymentStatusResponse: - """Update Deployment Status + ) -> object: + """Update Autopay - :param deployment_id: (required) - :type deployment_id: int - :param deployment_status_request: (required) - :type deployment_status_request: DeploymentStatusRequest + :param update_autopay_request: (required) + :type update_autopay_request: UpdateAutopayRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -8271,9 +8559,8 @@ def update_deployment_status_deployments_status_deployment_id_put( :return: Returns the result object. """ # noqa: E501 - _param = self._update_deployment_status_deployments_status_deployment_id_put_serialize( - deployment_id=deployment_id, - deployment_status_request=deployment_status_request, + _param = self._update_autopay_preferences_autopay_put_serialize( + update_autopay_request=update_autopay_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -8281,7 +8568,7 @@ def update_deployment_status_deployments_status_deployment_id_put( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeploymentStatusResponse", + '200': "object", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -8296,10 +8583,9 @@ def update_deployment_status_deployments_status_deployment_id_put( @validate_call - def update_deployment_status_deployments_status_deployment_id_put_with_http_info( + def update_autopay_preferences_autopay_put_with_http_info( self, - deployment_id: StrictInt, - deployment_status_request: DeploymentStatusRequest, + update_autopay_request: UpdateAutopayRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -8312,14 +8598,12 @@ def update_deployment_status_deployments_status_deployment_id_put_with_http_info _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DeploymentStatusResponse]: - """Update Deployment Status + ) -> ApiResponse[object]: + """Update Autopay - :param deployment_id: (required) - :type deployment_id: int - :param deployment_status_request: (required) - :type deployment_status_request: DeploymentStatusRequest + :param update_autopay_request: (required) + :type update_autopay_request: UpdateAutopayRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -8342,9 +8626,8 @@ def update_deployment_status_deployments_status_deployment_id_put_with_http_info :return: Returns the result object. """ # noqa: E501 - _param = self._update_deployment_status_deployments_status_deployment_id_put_serialize( - deployment_id=deployment_id, - deployment_status_request=deployment_status_request, + _param = self._update_autopay_preferences_autopay_put_serialize( + update_autopay_request=update_autopay_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -8352,7 +8635,7 @@ def update_deployment_status_deployments_status_deployment_id_put_with_http_info ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeploymentStatusResponse", + '200': "object", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -8367,10 +8650,9 @@ def update_deployment_status_deployments_status_deployment_id_put_with_http_info @validate_call - def update_deployment_status_deployments_status_deployment_id_put_without_preload_content( + def update_autopay_preferences_autopay_put_without_preload_content( self, - deployment_id: StrictInt, - deployment_status_request: DeploymentStatusRequest, + update_autopay_request: UpdateAutopayRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -8384,13 +8666,11 @@ def update_deployment_status_deployments_status_deployment_id_put_without_preloa _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Update Deployment Status + """Update Autopay - :param deployment_id: (required) - :type deployment_id: int - :param deployment_status_request: (required) - :type deployment_status_request: DeploymentStatusRequest + :param update_autopay_request: (required) + :type update_autopay_request: UpdateAutopayRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -8413,9 +8693,8 @@ def update_deployment_status_deployments_status_deployment_id_put_without_preloa :return: Returns the result object. """ # noqa: E501 - _param = self._update_deployment_status_deployments_status_deployment_id_put_serialize( - deployment_id=deployment_id, - deployment_status_request=deployment_status_request, + _param = self._update_autopay_preferences_autopay_put_serialize( + update_autopay_request=update_autopay_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -8423,7 +8702,7 @@ def update_deployment_status_deployments_status_deployment_id_put_without_preloa ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeploymentStatusResponse", + '200': "object", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -8433,10 +8712,9 @@ def update_deployment_status_deployments_status_deployment_id_put_without_preloa return response_data.response - def _update_deployment_status_deployments_status_deployment_id_put_serialize( + def _update_autopay_preferences_autopay_put_serialize( self, - deployment_id, - deployment_status_request, + update_autopay_request, _request_auth, _content_type, _headers, @@ -8458,14 +8736,12 @@ def _update_deployment_status_deployments_status_deployment_id_put_serialize( _body_params: Optional[bytes] = None # process the path parameters - if deployment_id is not None: - _path_params['deployment_id'] = deployment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if deployment_status_request is not None: - _body_params = deployment_status_request + if update_autopay_request is not None: + _body_params = update_autopay_request # set the HTTP header `Accept` @@ -8497,7 +8773,7 @@ def _update_deployment_status_deployments_status_deployment_id_put_serialize( return self.api_client.param_serialize( method='PUT', - resource_path='/deployments/status/{deployment_id}', + resource_path='/preferences/autopay', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -8514,9 +8790,10 @@ def _update_deployment_status_deployments_status_deployment_id_put_serialize( @validate_call - def update_user_vault_item_endpoint_user_vault_put( + def update_deployment_status_deployments_status_deployment_id_put( self, - user_vault_item_input: UserVaultItemInput, + deployment_id: StrictInt, + deployment_status_request: DeploymentStatusRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -8529,13 +8806,14 @@ def update_user_vault_item_endpoint_user_vault_put( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """Update User Vault Item Endpoint + ) -> DeploymentStatusResponse: + """Update Deployment Status - Update or add multiple items of a specific type for the user. - :param user_vault_item_input: (required) - :type user_vault_item_input: UserVaultItemInput + :param deployment_id: (required) + :type deployment_id: int + :param deployment_status_request: (required) + :type deployment_status_request: DeploymentStatusRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -8558,8 +8836,9 @@ def update_user_vault_item_endpoint_user_vault_put( :return: Returns the result object. """ # noqa: E501 - _param = self._update_user_vault_item_endpoint_user_vault_put_serialize( - user_vault_item_input=user_vault_item_input, + _param = self._update_deployment_status_deployments_status_deployment_id_put_serialize( + deployment_id=deployment_id, + deployment_status_request=deployment_status_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -8567,7 +8846,7 @@ def update_user_vault_item_endpoint_user_vault_put( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "object", + '200': "DeploymentStatusResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -8582,9 +8861,10 @@ def update_user_vault_item_endpoint_user_vault_put( @validate_call - def update_user_vault_item_endpoint_user_vault_put_with_http_info( + def update_deployment_status_deployments_status_deployment_id_put_with_http_info( self, - user_vault_item_input: UserVaultItemInput, + deployment_id: StrictInt, + deployment_status_request: DeploymentStatusRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -8597,13 +8877,14 @@ def update_user_vault_item_endpoint_user_vault_put_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """Update User Vault Item Endpoint + ) -> ApiResponse[DeploymentStatusResponse]: + """Update Deployment Status - Update or add multiple items of a specific type for the user. - :param user_vault_item_input: (required) - :type user_vault_item_input: UserVaultItemInput + :param deployment_id: (required) + :type deployment_id: int + :param deployment_status_request: (required) + :type deployment_status_request: DeploymentStatusRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -8626,8 +8907,9 @@ def update_user_vault_item_endpoint_user_vault_put_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._update_user_vault_item_endpoint_user_vault_put_serialize( - user_vault_item_input=user_vault_item_input, + _param = self._update_deployment_status_deployments_status_deployment_id_put_serialize( + deployment_id=deployment_id, + deployment_status_request=deployment_status_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -8635,7 +8917,7 @@ def update_user_vault_item_endpoint_user_vault_put_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "object", + '200': "DeploymentStatusResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -8650,9 +8932,10 @@ def update_user_vault_item_endpoint_user_vault_put_with_http_info( @validate_call - def update_user_vault_item_endpoint_user_vault_put_without_preload_content( + def update_deployment_status_deployments_status_deployment_id_put_without_preload_content( self, - user_vault_item_input: UserVaultItemInput, + deployment_id: StrictInt, + deployment_status_request: DeploymentStatusRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -8666,12 +8949,13 @@ def update_user_vault_item_endpoint_user_vault_put_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Update User Vault Item Endpoint + """Update Deployment Status - Update or add multiple items of a specific type for the user. - :param user_vault_item_input: (required) - :type user_vault_item_input: UserVaultItemInput + :param deployment_id: (required) + :type deployment_id: int + :param deployment_status_request: (required) + :type deployment_status_request: DeploymentStatusRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -8694,8 +8978,9 @@ def update_user_vault_item_endpoint_user_vault_put_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._update_user_vault_item_endpoint_user_vault_put_serialize( - user_vault_item_input=user_vault_item_input, + _param = self._update_deployment_status_deployments_status_deployment_id_put_serialize( + deployment_id=deployment_id, + deployment_status_request=deployment_status_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -8703,7 +8988,7 @@ def update_user_vault_item_endpoint_user_vault_put_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "object", + '200': "DeploymentStatusResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -8713,9 +8998,10 @@ def update_user_vault_item_endpoint_user_vault_put_without_preload_content( return response_data.response - def _update_user_vault_item_endpoint_user_vault_put_serialize( + def _update_deployment_status_deployments_status_deployment_id_put_serialize( self, - user_vault_item_input, + deployment_id, + deployment_status_request, _request_auth, _content_type, _headers, @@ -8737,12 +9023,14 @@ def _update_user_vault_item_endpoint_user_vault_put_serialize( _body_params: Optional[bytes] = None # process the path parameters + if deployment_id is not None: + _path_params['deployment_id'] = deployment_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if user_vault_item_input is not None: - _body_params = user_vault_item_input + if deployment_status_request is not None: + _body_params = deployment_status_request # set the HTTP header `Accept` @@ -8774,7 +9062,558 @@ def _update_user_vault_item_endpoint_user_vault_put_serialize( return self.api_client.param_serialize( method='PUT', - resource_path='/user_vault', + resource_path='/deployments/status/{deployment_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def update_user_vault_item_endpoint_user_vault_put( + self, + user_vault_item: UserVaultItem, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """Update User Vault Item Endpoint + + Update or add multiple items of a specific type for the user. + + :param user_vault_item: (required) + :type user_vault_item: UserVaultItem + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_user_vault_item_endpoint_user_vault_put_serialize( + user_vault_item=user_vault_item, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def update_user_vault_item_endpoint_user_vault_put_with_http_info( + self, + user_vault_item: UserVaultItem, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Update User Vault Item Endpoint + + Update or add multiple items of a specific type for the user. + + :param user_vault_item: (required) + :type user_vault_item: UserVaultItem + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_user_vault_item_endpoint_user_vault_put_serialize( + user_vault_item=user_vault_item, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def update_user_vault_item_endpoint_user_vault_put_without_preload_content( + self, + user_vault_item: UserVaultItem, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update User Vault Item Endpoint + + Update or add multiple items of a specific type for the user. + + :param user_vault_item: (required) + :type user_vault_item: UserVaultItem + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_user_vault_item_endpoint_user_vault_put_serialize( + user_vault_item=user_vault_item, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_user_vault_item_endpoint_user_vault_put_serialize( + self, + user_vault_item, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if user_vault_item is not None: + _body_params = user_vault_item + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/user_vault', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def upload_url_file_url_upload_post( + self, + create_url_request: CreateUrlRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CreateUrlResponse: + """Upload Url + + + :param create_url_request: (required) + :type create_url_request: CreateUrlRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._upload_url_file_url_upload_post_serialize( + create_url_request=create_url_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateUrlResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def upload_url_file_url_upload_post_with_http_info( + self, + create_url_request: CreateUrlRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CreateUrlResponse]: + """Upload Url + + + :param create_url_request: (required) + :type create_url_request: CreateUrlRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._upload_url_file_url_upload_post_serialize( + create_url_request=create_url_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateUrlResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def upload_url_file_url_upload_post_without_preload_content( + self, + create_url_request: CreateUrlRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Upload Url + + + :param create_url_request: (required) + :type create_url_request: CreateUrlRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._upload_url_file_url_upload_post_serialize( + create_url_request=create_url_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateUrlResponse", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _upload_url_file_url_upload_post_serialize( + self, + create_url_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_url_request is not None: + _body_params = create_url_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'HTTPBearer' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/file_url/upload', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/platform_api_python_client/api_client.py b/platform_api_python_client/api_client.py index 5d77539..5c5710a 100644 --- a/platform_api_python_client/api_client.py +++ b/platform_api_python_client/api_client.py @@ -90,7 +90,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/3.1.16/python' + self.user_agent = 'OpenAPI-Generator/3.2.4/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/platform_api_python_client/configuration.py b/platform_api_python_client/configuration.py index acce60d..22013cf 100644 --- a/platform_api_python_client/configuration.py +++ b/platform_api_python_client/configuration.py @@ -392,7 +392,7 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 0.1.0\n"\ - "SDK Package Version: 3.1.16".\ + "SDK Package Version: 3.2.4".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/platform_api_python_client/models/__init__.py b/platform_api_python_client/models/__init__.py index 5e70566..a041598 100644 --- a/platform_api_python_client/models/__init__.py +++ b/platform_api_python_client/models/__init__.py @@ -19,8 +19,7 @@ from platform_api_python_client.models.c_serve_recipe import CServeRecipe from platform_api_python_client.models.c_serve_recipe_perf import CServeRecipePerf from platform_api_python_client.models.c_serve_recipe_response import CServeRecipeResponse -from platform_api_python_client.models.c_serve_v2_recipe_input import CServeV2RecipeInput -from platform_api_python_client.models.c_serve_v2_recipe_output import CServeV2RecipeOutput +from platform_api_python_client.models.c_serve_v2_recipe import CServeV2Recipe from platform_api_python_client.models.create_c_serve_deployment_request import CreateCServeDeploymentRequest from platform_api_python_client.models.create_c_serve_deployment_response import CreateCServeDeploymentResponse from platform_api_python_client.models.create_c_serve_v2_deployment_request import CreateCServeV2DeploymentRequest @@ -34,6 +33,8 @@ from platform_api_python_client.models.create_rag_deployment_request import CreateRagDeploymentRequest from platform_api_python_client.models.create_rag_deployment_response import CreateRagDeploymentResponse from platform_api_python_client.models.create_setup_checkout_request import CreateSetupCheckoutRequest +from platform_api_python_client.models.create_url_request import CreateUrlRequest +from platform_api_python_client.models.create_url_response import CreateUrlResponse from platform_api_python_client.models.credits_response import CreditsResponse from platform_api_python_client.models.daily_bill_response import DailyBillResponse from platform_api_python_client.models.deployment_status import DeploymentStatus @@ -49,7 +50,7 @@ from platform_api_python_client.models.get_deployment_response import GetDeploymentResponse from platform_api_python_client.models.get_deployment_usage_response import GetDeploymentUsageResponse from platform_api_python_client.models.get_inference_deployment_response import GetInferenceDeploymentResponse -from platform_api_python_client.models.get_payments_response import GetPaymentsResponse +from platform_api_python_client.models.get_payment_response import GetPaymentResponse from platform_api_python_client.models.get_rag_deployment_response import GetRagDeploymentResponse from platform_api_python_client.models.http_validation_error import HTTPValidationError from platform_api_python_client.models.hardware_instance_response import HardwareInstanceResponse @@ -59,14 +60,15 @@ from platform_api_python_client.models.list_get_cluster_response import ListGetClusterResponse from platform_api_python_client.models.list_get_deployment_response import ListGetDeploymentResponse from platform_api_python_client.models.list_hardware_instance_response import ListHardwareInstanceResponse +from platform_api_python_client.models.list_payments_response import ListPaymentsResponse from platform_api_python_client.models.list_prebuilt_image_response import ListPrebuiltImageResponse from platform_api_python_client.models.list_user_vault_items_response import ListUserVaultItemsResponse from platform_api_python_client.models.metric import Metric from platform_api_python_client.models.prebuilt_image_response import PrebuiltImageResponse from platform_api_python_client.models.service_status import ServiceStatus +from platform_api_python_client.models.update_autopay_request import UpdateAutopayRequest from platform_api_python_client.models.user_support_email_request import UserSupportEmailRequest -from platform_api_python_client.models.user_vault_item_input import UserVaultItemInput -from platform_api_python_client.models.user_vault_item_output import UserVaultItemOutput +from platform_api_python_client.models.user_vault_item import UserVaultItem from platform_api_python_client.models.user_vault_type import UserVaultType from platform_api_python_client.models.validation_error import ValidationError from platform_api_python_client.models.validation_error_loc_inner import ValidationErrorLocInner diff --git a/platform_api_python_client/models/c_serve_recipe_perf.py b/platform_api_python_client/models/c_serve_recipe_perf.py index af21d46..eadc390 100644 --- a/platform_api_python_client/models/c_serve_recipe_perf.py +++ b/platform_api_python_client/models/c_serve_recipe_perf.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt from typing import Any, ClassVar, Dict, List from typing_extensions import Annotated -from platform_api_python_client.models.c_serve_v2_recipe_output import CServeV2RecipeOutput +from platform_api_python_client.models.c_serve_v2_recipe import CServeV2Recipe from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,7 @@ class CServeRecipePerf(BaseModel): """ CServeRecipePerf """ # noqa: E501 - recipe: CServeV2RecipeOutput + recipe: CServeV2Recipe hardware_instance_id: StrictInt output_tp: List[Annotated[List[Any], Field(min_length=2, max_length=2)]] mean_ttft: List[Annotated[List[Any], Field(min_length=2, max_length=2)]] @@ -88,7 +88,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "recipe": CServeV2RecipeOutput.from_dict(obj["recipe"]) if obj.get("recipe") is not None else None, + "recipe": CServeV2Recipe.from_dict(obj["recipe"]) if obj.get("recipe") is not None else None, "hardware_instance_id": obj.get("hardware_instance_id"), "output_tp": obj.get("output_tp"), "mean_ttft": obj.get("mean_ttft") diff --git a/platform_api_python_client/models/c_serve_recipe_response.py b/platform_api_python_client/models/c_serve_recipe_response.py index 64882ce..ee60628 100644 --- a/platform_api_python_client/models/c_serve_recipe_response.py +++ b/platform_api_python_client/models/c_serve_recipe_response.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List from platform_api_python_client.models.c_serve_recipe_perf import CServeRecipePerf from typing import Optional, Set @@ -28,11 +28,10 @@ class CServeRecipeResponse(BaseModel): CServeRecipeResponse """ # noqa: E501 model: StrictStr - cluster_id: StrictInt fastest: CServeRecipePerf cheapest: CServeRecipePerf best_value: CServeRecipePerf - __properties: ClassVar[List[str]] = ["model", "cluster_id", "fastest", "cheapest", "best_value"] + __properties: ClassVar[List[str]] = ["model", "fastest", "cheapest", "best_value"] model_config = ConfigDict( populate_by_name=True, @@ -95,7 +94,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "model": obj.get("model"), - "cluster_id": obj.get("cluster_id"), "fastest": CServeRecipePerf.from_dict(obj["fastest"]) if obj.get("fastest") is not None else None, "cheapest": CServeRecipePerf.from_dict(obj["cheapest"]) if obj.get("cheapest") is not None else None, "best_value": CServeRecipePerf.from_dict(obj["best_value"]) if obj.get("best_value") is not None else None diff --git a/platform_api_python_client/models/c_serve_v2_recipe.py b/platform_api_python_client/models/c_serve_v2_recipe.py index cc1cc87..405a0f7 100644 --- a/platform_api_python_client/models/c_serve_v2_recipe.py +++ b/platform_api_python_client/models/c_serve_v2_recipe.py @@ -17,8 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictBool, StrictFloat, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,34 +27,9 @@ class CServeV2Recipe(BaseModel): Inputs to start deployment """ # noqa: E501 model: StrictStr - max_model_len: Optional[StrictInt] - is_embedding_model: StrictBool - tokenizer: StrictStr - tensor_parallel_size: StrictInt - pipeline_parallel_size: StrictInt - gpu_mem_util: Union[StrictFloat, StrictInt] - block_size: StrictInt - swap_space: StrictInt - quantization: Optional[StrictStr] - dtype: StrictStr - cache_dtype: StrictStr - max_num_seqs: StrictInt - eager_execution: StrictBool - use_flashinfer: StrictBool - offloading_num: Union[StrictFloat, StrictInt] - spec_draft_model: Optional[StrictStr] - spec_tokens: Optional[StrictInt] - spec_prompt_lookup_max: Optional[StrictInt] - spec_prompt_lookup_min: Optional[StrictInt] - use_prefix_caching: StrictBool - use_chunked_prefill: StrictBool - chunked_prefill_size: Optional[StrictInt] - max_seq_len_to_capture: StrictInt - distributed_executor_backend: StrictStr - spec_max_batch_size: Optional[StrictInt] - spec_max_seq_len: Optional[StrictInt] - num_scheduler_steps: StrictInt - __properties: ClassVar[List[str]] = ["model", "max_model_len", "is_embedding_model", "tokenizer", "tensor_parallel_size", "pipeline_parallel_size", "gpu_mem_util", "block_size", "swap_space", "quantization", "dtype", "cache_dtype", "max_num_seqs", "eager_execution", "use_flashinfer", "offloading_num", "spec_draft_model", "spec_tokens", "spec_prompt_lookup_max", "spec_prompt_lookup_min", "use_prefix_caching", "use_chunked_prefill", "chunked_prefill_size", "max_seq_len_to_capture", "distributed_executor_backend", "spec_max_batch_size", "spec_max_seq_len", "num_scheduler_steps"] + is_embedding_model: Optional[StrictBool] = False + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["model", "is_embedding_model"] model_config = ConfigDict( populate_by_name=True, @@ -86,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -95,50 +72,10 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if max_model_len (nullable) is None - # and model_fields_set contains the field - if self.max_model_len is None and "max_model_len" in self.model_fields_set: - _dict['max_model_len'] = None - - # set to None if quantization (nullable) is None - # and model_fields_set contains the field - if self.quantization is None and "quantization" in self.model_fields_set: - _dict['quantization'] = None - - # set to None if spec_draft_model (nullable) is None - # and model_fields_set contains the field - if self.spec_draft_model is None and "spec_draft_model" in self.model_fields_set: - _dict['spec_draft_model'] = None - - # set to None if spec_tokens (nullable) is None - # and model_fields_set contains the field - if self.spec_tokens is None and "spec_tokens" in self.model_fields_set: - _dict['spec_tokens'] = None - - # set to None if spec_prompt_lookup_max (nullable) is None - # and model_fields_set contains the field - if self.spec_prompt_lookup_max is None and "spec_prompt_lookup_max" in self.model_fields_set: - _dict['spec_prompt_lookup_max'] = None - - # set to None if spec_prompt_lookup_min (nullable) is None - # and model_fields_set contains the field - if self.spec_prompt_lookup_min is None and "spec_prompt_lookup_min" in self.model_fields_set: - _dict['spec_prompt_lookup_min'] = None - - # set to None if chunked_prefill_size (nullable) is None - # and model_fields_set contains the field - if self.chunked_prefill_size is None and "chunked_prefill_size" in self.model_fields_set: - _dict['chunked_prefill_size'] = None - - # set to None if spec_max_batch_size (nullable) is None - # and model_fields_set contains the field - if self.spec_max_batch_size is None and "spec_max_batch_size" in self.model_fields_set: - _dict['spec_max_batch_size'] = None - - # set to None if spec_max_seq_len (nullable) is None - # and model_fields_set contains the field - if self.spec_max_seq_len is None and "spec_max_seq_len" in self.model_fields_set: - _dict['spec_max_seq_len'] = None + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value return _dict @@ -153,34 +90,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "model": obj.get("model"), - "max_model_len": obj.get("max_model_len"), - "is_embedding_model": obj.get("is_embedding_model") if obj.get("is_embedding_model") is not None else False, - "tokenizer": obj.get("tokenizer"), - "tensor_parallel_size": obj.get("tensor_parallel_size"), - "pipeline_parallel_size": obj.get("pipeline_parallel_size"), - "gpu_mem_util": obj.get("gpu_mem_util") if obj.get("gpu_mem_util") is not None else 0.95, - "block_size": obj.get("block_size") if obj.get("block_size") is not None else 32, - "swap_space": obj.get("swap_space") if obj.get("swap_space") is not None else 0, - "quantization": obj.get("quantization"), - "dtype": obj.get("dtype") if obj.get("dtype") is not None else 'auto', - "cache_dtype": obj.get("cache_dtype") if obj.get("cache_dtype") is not None else 'auto', - "max_num_seqs": obj.get("max_num_seqs") if obj.get("max_num_seqs") is not None else 256, - "eager_execution": obj.get("eager_execution") if obj.get("eager_execution") is not None else True, - "use_flashinfer": obj.get("use_flashinfer") if obj.get("use_flashinfer") is not None else False, - "offloading_num": obj.get("offloading_num") if obj.get("offloading_num") is not None else 0, - "spec_draft_model": obj.get("spec_draft_model"), - "spec_tokens": obj.get("spec_tokens"), - "spec_prompt_lookup_max": obj.get("spec_prompt_lookup_max"), - "spec_prompt_lookup_min": obj.get("spec_prompt_lookup_min"), - "use_prefix_caching": obj.get("use_prefix_caching") if obj.get("use_prefix_caching") is not None else False, - "use_chunked_prefill": obj.get("use_chunked_prefill") if obj.get("use_chunked_prefill") is not None else False, - "chunked_prefill_size": obj.get("chunked_prefill_size"), - "max_seq_len_to_capture": obj.get("max_seq_len_to_capture") if obj.get("max_seq_len_to_capture") is not None else 1024, - "distributed_executor_backend": obj.get("distributed_executor_backend") if obj.get("distributed_executor_backend") is not None else 'ray', - "spec_max_batch_size": obj.get("spec_max_batch_size"), - "spec_max_seq_len": obj.get("spec_max_seq_len"), - "num_scheduler_steps": obj.get("num_scheduler_steps") if obj.get("num_scheduler_steps") is not None else 1 + "is_embedding_model": obj.get("is_embedding_model") if obj.get("is_embedding_model") is not None else False }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/platform_api_python_client/models/c_serve_v2_recipe_input.py b/platform_api_python_client/models/c_serve_v2_recipe_input.py index 0c3a2b5..4684de8 100644 --- a/platform_api_python_client/models/c_serve_v2_recipe_input.py +++ b/platform_api_python_client/models/c_serve_v2_recipe_input.py @@ -17,8 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictBool, StrictFloat, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,34 +27,9 @@ class CServeV2RecipeInput(BaseModel): Inputs to start deployment """ # noqa: E501 model: StrictStr - max_model_len: Optional[StrictInt] = None is_embedding_model: Optional[StrictBool] = False - tokenizer: StrictStr - tensor_parallel_size: StrictInt - pipeline_parallel_size: StrictInt - gpu_mem_util: Optional[Union[StrictFloat, StrictInt]] = 0.95 - block_size: Optional[StrictInt] = 16 - swap_space: Optional[StrictInt] = 0 - quantization: Optional[StrictStr] = None - dtype: Optional[StrictStr] = 'auto' - cache_dtype: Optional[StrictStr] = 'auto' - max_num_seqs: Optional[StrictInt] = 256 - eager_execution: Optional[StrictBool] = True - use_flashinfer: Optional[StrictBool] = False - offloading_num: Optional[Union[StrictFloat, StrictInt]] = 0 - spec_draft_model: Optional[StrictStr] = None - spec_tokens: Optional[StrictInt] = None - spec_prompt_lookup_max: Optional[StrictInt] = None - spec_prompt_lookup_min: Optional[StrictInt] = None - use_prefix_caching: Optional[StrictBool] = False - use_chunked_prefill: Optional[StrictBool] = False - chunked_prefill_size: Optional[StrictInt] = None - max_seq_len_to_capture: Optional[StrictInt] = 8192 - distributed_executor_backend: Optional[StrictStr] = 'mp' - spec_max_batch_size: Optional[StrictInt] = None - spec_max_seq_len: Optional[StrictInt] = None - num_scheduler_steps: Optional[StrictInt] = 1 - __properties: ClassVar[List[str]] = ["model", "max_model_len", "is_embedding_model", "tokenizer", "tensor_parallel_size", "pipeline_parallel_size", "gpu_mem_util", "block_size", "swap_space", "quantization", "dtype", "cache_dtype", "max_num_seqs", "eager_execution", "use_flashinfer", "offloading_num", "spec_draft_model", "spec_tokens", "spec_prompt_lookup_max", "spec_prompt_lookup_min", "use_prefix_caching", "use_chunked_prefill", "chunked_prefill_size", "max_seq_len_to_capture", "distributed_executor_backend", "spec_max_batch_size", "spec_max_seq_len", "num_scheduler_steps"] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["model", "is_embedding_model"] model_config = ConfigDict( populate_by_name=True, @@ -86,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -95,50 +72,10 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if max_model_len (nullable) is None - # and model_fields_set contains the field - if self.max_model_len is None and "max_model_len" in self.model_fields_set: - _dict['max_model_len'] = None - - # set to None if quantization (nullable) is None - # and model_fields_set contains the field - if self.quantization is None and "quantization" in self.model_fields_set: - _dict['quantization'] = None - - # set to None if spec_draft_model (nullable) is None - # and model_fields_set contains the field - if self.spec_draft_model is None and "spec_draft_model" in self.model_fields_set: - _dict['spec_draft_model'] = None - - # set to None if spec_tokens (nullable) is None - # and model_fields_set contains the field - if self.spec_tokens is None and "spec_tokens" in self.model_fields_set: - _dict['spec_tokens'] = None - - # set to None if spec_prompt_lookup_max (nullable) is None - # and model_fields_set contains the field - if self.spec_prompt_lookup_max is None and "spec_prompt_lookup_max" in self.model_fields_set: - _dict['spec_prompt_lookup_max'] = None - - # set to None if spec_prompt_lookup_min (nullable) is None - # and model_fields_set contains the field - if self.spec_prompt_lookup_min is None and "spec_prompt_lookup_min" in self.model_fields_set: - _dict['spec_prompt_lookup_min'] = None - - # set to None if chunked_prefill_size (nullable) is None - # and model_fields_set contains the field - if self.chunked_prefill_size is None and "chunked_prefill_size" in self.model_fields_set: - _dict['chunked_prefill_size'] = None - - # set to None if spec_max_batch_size (nullable) is None - # and model_fields_set contains the field - if self.spec_max_batch_size is None and "spec_max_batch_size" in self.model_fields_set: - _dict['spec_max_batch_size'] = None - - # set to None if spec_max_seq_len (nullable) is None - # and model_fields_set contains the field - if self.spec_max_seq_len is None and "spec_max_seq_len" in self.model_fields_set: - _dict['spec_max_seq_len'] = None + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value return _dict @@ -153,34 +90,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "model": obj.get("model"), - "max_model_len": obj.get("max_model_len"), - "is_embedding_model": obj.get("is_embedding_model") if obj.get("is_embedding_model") is not None else False, - "tokenizer": obj.get("tokenizer"), - "tensor_parallel_size": obj.get("tensor_parallel_size"), - "pipeline_parallel_size": obj.get("pipeline_parallel_size"), - "gpu_mem_util": obj.get("gpu_mem_util") if obj.get("gpu_mem_util") is not None else 0.95, - "block_size": obj.get("block_size") if obj.get("block_size") is not None else 16, - "swap_space": obj.get("swap_space") if obj.get("swap_space") is not None else 0, - "quantization": obj.get("quantization"), - "dtype": obj.get("dtype") if obj.get("dtype") is not None else 'auto', - "cache_dtype": obj.get("cache_dtype") if obj.get("cache_dtype") is not None else 'auto', - "max_num_seqs": obj.get("max_num_seqs") if obj.get("max_num_seqs") is not None else 256, - "eager_execution": obj.get("eager_execution") if obj.get("eager_execution") is not None else True, - "use_flashinfer": obj.get("use_flashinfer") if obj.get("use_flashinfer") is not None else False, - "offloading_num": obj.get("offloading_num") if obj.get("offloading_num") is not None else 0, - "spec_draft_model": obj.get("spec_draft_model"), - "spec_tokens": obj.get("spec_tokens"), - "spec_prompt_lookup_max": obj.get("spec_prompt_lookup_max"), - "spec_prompt_lookup_min": obj.get("spec_prompt_lookup_min"), - "use_prefix_caching": obj.get("use_prefix_caching") if obj.get("use_prefix_caching") is not None else False, - "use_chunked_prefill": obj.get("use_chunked_prefill") if obj.get("use_chunked_prefill") is not None else False, - "chunked_prefill_size": obj.get("chunked_prefill_size"), - "max_seq_len_to_capture": obj.get("max_seq_len_to_capture") if obj.get("max_seq_len_to_capture") is not None else 8192, - "distributed_executor_backend": obj.get("distributed_executor_backend") if obj.get("distributed_executor_backend") is not None else 'mp', - "spec_max_batch_size": obj.get("spec_max_batch_size"), - "spec_max_seq_len": obj.get("spec_max_seq_len"), - "num_scheduler_steps": obj.get("num_scheduler_steps") if obj.get("num_scheduler_steps") is not None else 1 + "is_embedding_model": obj.get("is_embedding_model") if obj.get("is_embedding_model") is not None else False }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/platform_api_python_client/models/c_serve_v2_recipe_output.py b/platform_api_python_client/models/c_serve_v2_recipe_output.py index 1b001f1..27c35ad 100644 --- a/platform_api_python_client/models/c_serve_v2_recipe_output.py +++ b/platform_api_python_client/models/c_serve_v2_recipe_output.py @@ -17,8 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictBool, StrictFloat, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self @@ -27,34 +27,9 @@ class CServeV2RecipeOutput(BaseModel): Inputs to start deployment """ # noqa: E501 model: StrictStr - max_model_len: Optional[StrictInt] is_embedding_model: StrictBool - tokenizer: StrictStr - tensor_parallel_size: StrictInt - pipeline_parallel_size: StrictInt - gpu_mem_util: Union[StrictFloat, StrictInt] - block_size: StrictInt - swap_space: StrictInt - quantization: Optional[StrictStr] - dtype: StrictStr - cache_dtype: StrictStr - max_num_seqs: StrictInt - eager_execution: StrictBool - use_flashinfer: StrictBool - offloading_num: Union[StrictFloat, StrictInt] - spec_draft_model: Optional[StrictStr] - spec_tokens: Optional[StrictInt] - spec_prompt_lookup_max: Optional[StrictInt] - spec_prompt_lookup_min: Optional[StrictInt] - use_prefix_caching: StrictBool - use_chunked_prefill: StrictBool - chunked_prefill_size: Optional[StrictInt] - max_seq_len_to_capture: StrictInt - distributed_executor_backend: StrictStr - spec_max_batch_size: Optional[StrictInt] - spec_max_seq_len: Optional[StrictInt] - num_scheduler_steps: StrictInt - __properties: ClassVar[List[str]] = ["model", "max_model_len", "is_embedding_model", "tokenizer", "tensor_parallel_size", "pipeline_parallel_size", "gpu_mem_util", "block_size", "swap_space", "quantization", "dtype", "cache_dtype", "max_num_seqs", "eager_execution", "use_flashinfer", "offloading_num", "spec_draft_model", "spec_tokens", "spec_prompt_lookup_max", "spec_prompt_lookup_min", "use_prefix_caching", "use_chunked_prefill", "chunked_prefill_size", "max_seq_len_to_capture", "distributed_executor_backend", "spec_max_batch_size", "spec_max_seq_len", "num_scheduler_steps"] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["model", "is_embedding_model"] model_config = ConfigDict( populate_by_name=True, @@ -86,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -95,50 +72,10 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if max_model_len (nullable) is None - # and model_fields_set contains the field - if self.max_model_len is None and "max_model_len" in self.model_fields_set: - _dict['max_model_len'] = None - - # set to None if quantization (nullable) is None - # and model_fields_set contains the field - if self.quantization is None and "quantization" in self.model_fields_set: - _dict['quantization'] = None - - # set to None if spec_draft_model (nullable) is None - # and model_fields_set contains the field - if self.spec_draft_model is None and "spec_draft_model" in self.model_fields_set: - _dict['spec_draft_model'] = None - - # set to None if spec_tokens (nullable) is None - # and model_fields_set contains the field - if self.spec_tokens is None and "spec_tokens" in self.model_fields_set: - _dict['spec_tokens'] = None - - # set to None if spec_prompt_lookup_max (nullable) is None - # and model_fields_set contains the field - if self.spec_prompt_lookup_max is None and "spec_prompt_lookup_max" in self.model_fields_set: - _dict['spec_prompt_lookup_max'] = None - - # set to None if spec_prompt_lookup_min (nullable) is None - # and model_fields_set contains the field - if self.spec_prompt_lookup_min is None and "spec_prompt_lookup_min" in self.model_fields_set: - _dict['spec_prompt_lookup_min'] = None - - # set to None if chunked_prefill_size (nullable) is None - # and model_fields_set contains the field - if self.chunked_prefill_size is None and "chunked_prefill_size" in self.model_fields_set: - _dict['chunked_prefill_size'] = None - - # set to None if spec_max_batch_size (nullable) is None - # and model_fields_set contains the field - if self.spec_max_batch_size is None and "spec_max_batch_size" in self.model_fields_set: - _dict['spec_max_batch_size'] = None - - # set to None if spec_max_seq_len (nullable) is None - # and model_fields_set contains the field - if self.spec_max_seq_len is None and "spec_max_seq_len" in self.model_fields_set: - _dict['spec_max_seq_len'] = None + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value return _dict @@ -153,34 +90,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "model": obj.get("model"), - "max_model_len": obj.get("max_model_len"), - "is_embedding_model": obj.get("is_embedding_model") if obj.get("is_embedding_model") is not None else False, - "tokenizer": obj.get("tokenizer"), - "tensor_parallel_size": obj.get("tensor_parallel_size"), - "pipeline_parallel_size": obj.get("pipeline_parallel_size"), - "gpu_mem_util": obj.get("gpu_mem_util") if obj.get("gpu_mem_util") is not None else 0.95, - "block_size": obj.get("block_size") if obj.get("block_size") is not None else 16, - "swap_space": obj.get("swap_space") if obj.get("swap_space") is not None else 0, - "quantization": obj.get("quantization"), - "dtype": obj.get("dtype") if obj.get("dtype") is not None else 'auto', - "cache_dtype": obj.get("cache_dtype") if obj.get("cache_dtype") is not None else 'auto', - "max_num_seqs": obj.get("max_num_seqs") if obj.get("max_num_seqs") is not None else 256, - "eager_execution": obj.get("eager_execution") if obj.get("eager_execution") is not None else True, - "use_flashinfer": obj.get("use_flashinfer") if obj.get("use_flashinfer") is not None else False, - "offloading_num": obj.get("offloading_num") if obj.get("offloading_num") is not None else 0, - "spec_draft_model": obj.get("spec_draft_model"), - "spec_tokens": obj.get("spec_tokens"), - "spec_prompt_lookup_max": obj.get("spec_prompt_lookup_max"), - "spec_prompt_lookup_min": obj.get("spec_prompt_lookup_min"), - "use_prefix_caching": obj.get("use_prefix_caching") if obj.get("use_prefix_caching") is not None else False, - "use_chunked_prefill": obj.get("use_chunked_prefill") if obj.get("use_chunked_prefill") is not None else False, - "chunked_prefill_size": obj.get("chunked_prefill_size"), - "max_seq_len_to_capture": obj.get("max_seq_len_to_capture") if obj.get("max_seq_len_to_capture") is not None else 8192, - "distributed_executor_backend": obj.get("distributed_executor_backend") if obj.get("distributed_executor_backend") is not None else 'mp', - "spec_max_batch_size": obj.get("spec_max_batch_size"), - "spec_max_seq_len": obj.get("spec_max_seq_len"), - "num_scheduler_steps": obj.get("num_scheduler_steps") if obj.get("num_scheduler_steps") is not None else 1 + "is_embedding_model": obj.get("is_embedding_model") if obj.get("is_embedding_model") is not None else False }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/platform_api_python_client/models/create_c_serve_deployment_request.py b/platform_api_python_client/models/create_c_serve_deployment_request.py index 597e41c..02d643f 100644 --- a/platform_api_python_client/models/create_c_serve_deployment_request.py +++ b/platform_api_python_client/models/create_c_serve_deployment_request.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from platform_api_python_client.models.c_serve_recipe import CServeRecipe @@ -28,7 +28,7 @@ class CreateCServeDeploymentRequest(BaseModel): """ CreateCServeDeploymentRequest """ # noqa: E501 - name: Annotated[str, Field(strict=True, max_length=12)] + name: Annotated[str, Field(min_length=1, strict=True, max_length=20)] cluster_id: StrictInt hardware_instance_id: StrictInt recipe: CServeRecipe @@ -40,6 +40,13 @@ class CreateCServeDeploymentRequest(BaseModel): env_vars: Optional[Dict[str, StrictStr]] = None __properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "recipe", "hf_token", "endpoint_certificate_authority", "min_scale", "max_scale", "concurrency", "env_vars"] + @field_validator('name') + def name_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[a-z][a-z0-9-]*$", value): + raise ValueError(r"must validate the regular expression /^[a-z][a-z0-9-]*$/") + return value + model_config = ConfigDict( populate_by_name=True, validate_assignment=True, diff --git a/platform_api_python_client/models/create_c_serve_v2_deployment_request.py b/platform_api_python_client/models/create_c_serve_v2_deployment_request.py index 11a914a..56cedae 100644 --- a/platform_api_python_client/models/create_c_serve_v2_deployment_request.py +++ b/platform_api_python_client/models/create_c_serve_v2_deployment_request.py @@ -17,10 +17,10 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from platform_api_python_client.models.c_serve_v2_recipe_input import CServeV2RecipeInput +from platform_api_python_client.models.c_serve_v2_recipe import CServeV2Recipe from typing import Optional, Set from typing_extensions import Self @@ -28,10 +28,10 @@ class CreateCServeV2DeploymentRequest(BaseModel): """ CreateCServeV2DeploymentRequest """ # noqa: E501 - name: Annotated[str, Field(strict=True, max_length=12)] + name: Annotated[str, Field(min_length=1, strict=True, max_length=20)] cluster_id: StrictInt hardware_instance_id: StrictInt - recipe: CServeV2RecipeInput + recipe: CServeV2Recipe hf_token: Optional[StrictStr] = None endpoint_certificate_authority: Optional[StrictStr] = None min_scale: StrictInt @@ -40,6 +40,13 @@ class CreateCServeV2DeploymentRequest(BaseModel): env_vars: Optional[Dict[str, StrictStr]] = None __properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "recipe", "hf_token", "endpoint_certificate_authority", "min_scale", "max_scale", "concurrency", "env_vars"] + @field_validator('name') + def name_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[a-z][a-z0-9-]*$", value): + raise ValueError(r"must validate the regular expression /^[a-z][a-z0-9-]*$/") + return value + model_config = ConfigDict( populate_by_name=True, validate_assignment=True, @@ -112,7 +119,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "name": obj.get("name"), "cluster_id": obj.get("cluster_id"), "hardware_instance_id": obj.get("hardware_instance_id"), - "recipe": CServeV2RecipeInput.from_dict(obj["recipe"]) if obj.get("recipe") is not None else None, + "recipe": CServeV2Recipe.from_dict(obj["recipe"]) if obj.get("recipe") is not None else None, "hf_token": obj.get("hf_token"), "endpoint_certificate_authority": obj.get("endpoint_certificate_authority"), "min_scale": obj.get("min_scale"), diff --git a/platform_api_python_client/models/create_compute_deployment_request.py b/platform_api_python_client/models/create_compute_deployment_request.py index 01153fa..2ec9b42 100644 --- a/platform_api_python_client/models/create_compute_deployment_request.py +++ b/platform_api_python_client/models/create_compute_deployment_request.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from typing import Optional, Set @@ -27,7 +27,7 @@ class CreateComputeDeploymentRequest(BaseModel): """ CreateComputeDeploymentRequest """ # noqa: E501 - name: Annotated[str, Field(strict=True, max_length=12)] + name: Annotated[str, Field(min_length=1, strict=True, max_length=20)] cluster_id: StrictInt hardware_instance_id: StrictInt image_url: StrictStr @@ -35,6 +35,13 @@ class CreateComputeDeploymentRequest(BaseModel): ssh_public_key: StrictStr __properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "image_url", "enable_jupyter", "ssh_public_key"] + @field_validator('name') + def name_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[a-z][a-z0-9-]*$", value): + raise ValueError(r"must validate the regular expression /^[a-z][a-z0-9-]*$/") + return value + model_config = ConfigDict( populate_by_name=True, validate_assignment=True, diff --git a/platform_api_python_client/models/create_compute_deployment_response.py b/platform_api_python_client/models/create_compute_deployment_response.py index 9609798..7a8c00d 100644 --- a/platform_api_python_client/models/create_compute_deployment_response.py +++ b/platform_api_python_client/models/create_compute_deployment_response.py @@ -31,7 +31,7 @@ class CreateComputeDeploymentResponse(BaseModel): created_at: datetime endpoint_url: StrictStr port: StrictInt - jupyter_token: Optional[StrictStr] + jupyter_token: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["id", "created_at", "endpoint_url", "port", "jupyter_token"] model_config = ConfigDict( diff --git a/platform_api_python_client/models/create_inference_deployment_request.py b/platform_api_python_client/models/create_inference_deployment_request.py index d2ac903..acd5edb 100644 --- a/platform_api_python_client/models/create_inference_deployment_request.py +++ b/platform_api_python_client/models/create_inference_deployment_request.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from typing import Optional, Set @@ -27,7 +27,7 @@ class CreateInferenceDeploymentRequest(BaseModel): """ CreateInferenceDeploymentRequest """ # noqa: E501 - name: Annotated[str, Field(strict=True, max_length=12)] + name: Annotated[str, Field(min_length=1, strict=True, max_length=20)] cluster_id: StrictInt hardware_instance_id: StrictInt image_url: StrictStr @@ -37,10 +37,16 @@ class CreateInferenceDeploymentRequest(BaseModel): concurrency: Optional[StrictInt] = None healthcheck: Optional[StrictStr] = None env_vars: Optional[Dict[str, StrictStr]] = None - command: Optional[List[StrictStr]] = None - command_args: Optional[List[StrictStr]] = None + command: Optional[StrictStr] = None endpoint_certificate_authority: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "image_url", "port", "min_scale", "max_scale", "concurrency", "healthcheck", "env_vars", "command", "command_args", "endpoint_certificate_authority"] + __properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "image_url", "port", "min_scale", "max_scale", "concurrency", "healthcheck", "env_vars", "command", "endpoint_certificate_authority"] + + @field_validator('name') + def name_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[a-z][a-z0-9-]*$", value): + raise ValueError(r"must validate the regular expression /^[a-z][a-z0-9-]*$/") + return value model_config = ConfigDict( populate_by_name=True, @@ -101,11 +107,6 @@ def to_dict(self) -> Dict[str, Any]: if self.command is None and "command" in self.model_fields_set: _dict['command'] = None - # set to None if command_args (nullable) is None - # and model_fields_set contains the field - if self.command_args is None and "command_args" in self.model_fields_set: - _dict['command_args'] = None - # set to None if endpoint_certificate_authority (nullable) is None # and model_fields_set contains the field if self.endpoint_certificate_authority is None and "endpoint_certificate_authority" in self.model_fields_set: @@ -134,7 +135,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "healthcheck": obj.get("healthcheck"), "env_vars": obj.get("env_vars"), "command": obj.get("command"), - "command_args": obj.get("command_args"), "endpoint_certificate_authority": obj.get("endpoint_certificate_authority") }) return _obj diff --git a/platform_api_python_client/models/create_rag_deployment_request.py b/platform_api_python_client/models/create_rag_deployment_request.py index 112c4e2..c541be1 100644 --- a/platform_api_python_client/models/create_rag_deployment_request.py +++ b/platform_api_python_client/models/create_rag_deployment_request.py @@ -17,10 +17,10 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from platform_api_python_client.models.c_serve_v2_recipe_input import CServeV2RecipeInput +from platform_api_python_client.models.c_serve_v2_recipe import CServeV2Recipe from typing import Optional, Set from typing_extensions import Self @@ -28,10 +28,10 @@ class CreateRagDeploymentRequest(BaseModel): """ CreateRagDeploymentRequest """ # noqa: E501 - name: Annotated[str, Field(strict=True, max_length=12)] + name: Annotated[str, Field(min_length=1, strict=True, max_length=20)] cluster_id: StrictInt hardware_instance_id: StrictInt - recipe: CServeV2RecipeInput + recipe: CServeV2Recipe hf_token: Optional[StrictStr] = None llm_model: StrictStr centml_api_key: StrictStr @@ -42,6 +42,13 @@ class CreateRagDeploymentRequest(BaseModel): env_vars: Optional[Dict[str, StrictStr]] = None __properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "recipe", "hf_token", "llm_model", "centml_api_key", "min_scale", "max_scale", "endpoint_certificate_authority", "concurrency", "env_vars"] + @field_validator('name') + def name_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[a-z][a-z0-9-]*$", value): + raise ValueError(r"must validate the regular expression /^[a-z][a-z0-9-]*$/") + return value + model_config = ConfigDict( populate_by_name=True, validate_assignment=True, @@ -114,7 +121,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "name": obj.get("name"), "cluster_id": obj.get("cluster_id"), "hardware_instance_id": obj.get("hardware_instance_id"), - "recipe": CServeV2RecipeInput.from_dict(obj["recipe"]) if obj.get("recipe") is not None else None, + "recipe": CServeV2Recipe.from_dict(obj["recipe"]) if obj.get("recipe") is not None else None, "hf_token": obj.get("hf_token"), "llm_model": obj.get("llm_model"), "centml_api_key": obj.get("centml_api_key"), diff --git a/platform_api_python_client/models/client_secret_response.py b/platform_api_python_client/models/create_url_request.py similarity index 84% rename from platform_api_python_client/models/client_secret_response.py rename to platform_api_python_client/models/create_url_request.py index 14874cf..76e344b 100644 --- a/platform_api_python_client/models/client_secret_response.py +++ b/platform_api_python_client/models/create_url_request.py @@ -22,12 +22,13 @@ from typing import Optional, Set from typing_extensions import Self -class ClientSecretResponse(BaseModel): +class CreateUrlRequest(BaseModel): """ - ClientSecretResponse + CreateUrlRequest """ # noqa: E501 - client_secret: StrictStr - __properties: ClassVar[List[str]] = ["client_secret"] + filename: StrictStr + extension: StrictStr + __properties: ClassVar[List[str]] = ["filename", "extension"] model_config = ConfigDict( populate_by_name=True, @@ -47,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ClientSecretResponse from a JSON string""" + """Create an instance of CreateUrlRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -72,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ClientSecretResponse from a dict""" + """Create an instance of CreateUrlRequest from a dict""" if obj is None: return None @@ -80,7 +81,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "client_secret": obj.get("client_secret") + "filename": obj.get("filename"), + "extension": obj.get("extension") }) return _obj diff --git a/platform_api_python_client/models/create_checkout_response.py b/platform_api_python_client/models/create_url_response.py similarity index 91% rename from platform_api_python_client/models/create_checkout_response.py rename to platform_api_python_client/models/create_url_response.py index 49e270a..ba4602c 100644 --- a/platform_api_python_client/models/create_checkout_response.py +++ b/platform_api_python_client/models/create_url_response.py @@ -22,9 +22,9 @@ from typing import Optional, Set from typing_extensions import Self -class CreateCheckoutResponse(BaseModel): +class CreateUrlResponse(BaseModel): """ - CreateCheckoutResponse + CreateUrlResponse """ # noqa: E501 url: StrictStr __properties: ClassVar[List[str]] = ["url"] @@ -47,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of CreateCheckoutResponse from a JSON string""" + """Create an instance of CreateUrlResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CreateCheckoutResponse from a dict""" + """Create an instance of CreateUrlResponse from a dict""" if obj is None: return None diff --git a/platform_api_python_client/models/deployment_status_response.py b/platform_api_python_client/models/deployment_status_response.py index 5f8740f..11d0e89 100644 --- a/platform_api_python_client/models/deployment_status_response.py +++ b/platform_api_python_client/models/deployment_status_response.py @@ -32,9 +32,9 @@ class DeploymentStatusResponse(BaseModel): id: StrictInt type: DeploymentType status: DeploymentStatus - service_status: Optional[ServiceStatus] - error_message: Optional[StrictStr] - endpoint_url: Optional[StrictStr] + service_status: Optional[ServiceStatus] = None + error_message: Optional[StrictStr] = None + endpoint_url: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["id", "type", "status", "service_status", "error_message", "endpoint_url"] model_config = ConfigDict( diff --git a/platform_api_python_client/models/get_c_serve_deployment_response.py b/platform_api_python_client/models/get_c_serve_deployment_response.py index 37549de..1d4b19b 100644 --- a/platform_api_python_client/models/get_c_serve_deployment_response.py +++ b/platform_api_python_client/models/get_c_serve_deployment_response.py @@ -31,48 +31,51 @@ class GetCServeDeploymentResponse(BaseModel): GetCServeDeploymentResponse """ # noqa: E501 model: StrictStr - is_embedding_model: StrictBool + is_embedding_model: Optional[StrictBool] = False tensor_parallel_size: StrictInt pipeline_parallel_size: StrictInt - block_size: StrictInt - swap_space: Annotated[int, Field(strict=True, ge=0)] - gpu_mem_util: Union[Annotated[float, Field(le=1.0, strict=True, ge=0.0)], Annotated[int, Field(le=1, strict=True, ge=0)]] - max_num_seqs: StrictInt - offloading_num: StrictInt - use_prefix_caching: Optional[StrictBool] - use_chunked_prefill: Optional[StrictBool] - chunked_prefill_size: Optional[StrictInt] - eager_execution: Optional[StrictBool] - num_scheduler_steps: Optional[StrictInt] - use_flashinfer: StrictBool - max_model_len: Optional[Annotated[int, Field(strict=True, ge=128)]] - dtype: StrictStr - tokenizer: Optional[StrictStr] - spec_proposer: Optional[StrictStr] - spec_draft_model: Optional[StrictStr] - spec_tokens: Optional[StrictInt] - spec_prompt_lookup_min: Optional[Annotated[int, Field(strict=True, ge=1)]] - spec_prompt_lookup_max: Optional[Annotated[int, Field(strict=True, ge=1)]] - seed: StrictInt + block_size: Optional[StrictInt] = 32 + swap_space: Optional[Annotated[int, Field(strict=True, ge=0)]] = 0 + gpu_mem_util: Optional[Union[Annotated[float, Field(le=1.0, strict=True, ge=0.0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = 0.95 + max_num_seqs: Optional[StrictInt] = 256 + offloading_num: Optional[StrictInt] = 0 + use_prefix_caching: Optional[StrictBool] = None + use_chunked_prefill: Optional[StrictBool] = None + chunked_prefill_size: Optional[StrictInt] = None + eager_execution: Optional[StrictBool] = None + num_scheduler_steps: Optional[StrictInt] = None + use_flashinfer: Optional[StrictBool] = False + max_model_len: Optional[Annotated[int, Field(strict=True, ge=128)]] = None + dtype: Optional[StrictStr] = 'auto' + tokenizer: Optional[StrictStr] = None + spec_proposer: Optional[StrictStr] = None + spec_draft_model: Optional[StrictStr] = None + spec_tokens: Optional[StrictInt] = None + spec_prompt_lookup_min: Optional[Annotated[int, Field(strict=True, ge=1)]] = None + spec_prompt_lookup_max: Optional[Annotated[int, Field(strict=True, ge=1)]] = None + seed: Optional[StrictInt] = 0 cluster_id: StrictInt id: StrictInt name: StrictStr endpoint_url: StrictStr - image_url: Optional[StrictStr] + image_url: Optional[StrictStr] = None type: DeploymentType status: DeploymentStatus created_at: datetime hardware_instance_id: StrictInt min_scale: StrictInt max_scale: StrictInt - endpoint_certificate_authority: Optional[StrictStr] - concurrency: Optional[StrictInt] - env_vars: Dict[str, StrictStr] + endpoint_certificate_authority: Optional[StrictStr] = None + concurrency: Optional[StrictInt] = None + env_vars: Optional[Dict[str, StrictStr]] = None __properties: ClassVar[List[str]] = ["model", "is_embedding_model", "tensor_parallel_size", "pipeline_parallel_size", "block_size", "swap_space", "gpu_mem_util", "max_num_seqs", "offloading_num", "use_prefix_caching", "use_chunked_prefill", "chunked_prefill_size", "eager_execution", "num_scheduler_steps", "use_flashinfer", "max_model_len", "dtype", "tokenizer", "spec_proposer", "spec_draft_model", "spec_tokens", "spec_prompt_lookup_min", "spec_prompt_lookup_max", "seed", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "min_scale", "max_scale", "endpoint_certificate_authority", "concurrency", "env_vars"] @field_validator('block_size') def block_size_validate_enum(cls, value): """Validates the enum""" + if value is None: + return value + if value not in set([16, 32]): raise ValueError("must be one of enum values (16, 32)") return value @@ -80,6 +83,9 @@ def block_size_validate_enum(cls, value): @field_validator('dtype') def dtype_validate_enum(cls, value): """Validates the enum""" + if value is None: + return value + if value not in set(['auto', 'float16', 'float32', 'bfloat16']): raise ValueError("must be one of enum values ('auto', 'float16', 'float32', 'bfloat16')") return value diff --git a/platform_api_python_client/models/get_c_serve_v2_deployment_response.py b/platform_api_python_client/models/get_c_serve_v2_deployment_response.py index 7219d2b..d064cef 100644 --- a/platform_api_python_client/models/get_c_serve_v2_deployment_response.py +++ b/platform_api_python_client/models/get_c_serve_v2_deployment_response.py @@ -20,7 +20,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from platform_api_python_client.models.c_serve_v2_recipe_output import CServeV2RecipeOutput +from platform_api_python_client.models.c_serve_v2_recipe import CServeV2Recipe from platform_api_python_client.models.deployment_status import DeploymentStatus from platform_api_python_client.models.deployment_type import DeploymentType from typing import Optional, Set @@ -34,17 +34,17 @@ class GetCServeV2DeploymentResponse(BaseModel): id: StrictInt name: StrictStr endpoint_url: StrictStr - image_url: Optional[StrictStr] + image_url: Optional[StrictStr] = None type: DeploymentType status: DeploymentStatus created_at: datetime hardware_instance_id: StrictInt - recipe: CServeV2RecipeOutput + recipe: CServeV2Recipe min_scale: StrictInt max_scale: StrictInt - endpoint_certificate_authority: Optional[StrictStr] - concurrency: Optional[StrictInt] - env_vars: Dict[str, StrictStr] + endpoint_certificate_authority: Optional[StrictStr] = None + concurrency: Optional[StrictInt] = None + env_vars: Optional[Dict[str, StrictStr]] = None __properties: ClassVar[List[str]] = ["cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "recipe", "min_scale", "max_scale", "endpoint_certificate_authority", "concurrency", "env_vars"] model_config = ConfigDict( @@ -125,7 +125,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "status": obj.get("status"), "created_at": obj.get("created_at"), "hardware_instance_id": obj.get("hardware_instance_id"), - "recipe": CServeV2RecipeOutput.from_dict(obj["recipe"]) if obj.get("recipe") is not None else None, + "recipe": CServeV2Recipe.from_dict(obj["recipe"]) if obj.get("recipe") is not None else None, "min_scale": obj.get("min_scale"), "max_scale": obj.get("max_scale"), "endpoint_certificate_authority": obj.get("endpoint_certificate_authority"), diff --git a/platform_api_python_client/models/get_cluster_response.py b/platform_api_python_client/models/get_cluster_response.py index cea676e..b4c28f3 100644 --- a/platform_api_python_client/models/get_cluster_response.py +++ b/platform_api_python_client/models/get_cluster_response.py @@ -28,7 +28,7 @@ class GetClusterResponse(BaseModel): """ # noqa: E501 id: StrictInt display_name: StrictStr - region: Optional[StrictStr] + region: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["id", "display_name", "region"] model_config = ConfigDict( diff --git a/platform_api_python_client/models/get_compute_deployment_response.py b/platform_api_python_client/models/get_compute_deployment_response.py index 2d02c2b..7dfbc28 100644 --- a/platform_api_python_client/models/get_compute_deployment_response.py +++ b/platform_api_python_client/models/get_compute_deployment_response.py @@ -33,15 +33,15 @@ class GetComputeDeploymentResponse(BaseModel): id: StrictInt name: StrictStr endpoint_url: StrictStr - image_url: Optional[StrictStr] + image_url: Optional[StrictStr] = None type: DeploymentType status: DeploymentStatus created_at: datetime hardware_instance_id: StrictInt exposed_port: StrictInt - ssh_public_key: Optional[StrictStr] - ssh_password: Optional[StrictStr] - env_vars: Optional[Dict[str, StrictStr]] + ssh_public_key: Optional[StrictStr] = None + ssh_password: Optional[StrictStr] = None + env_vars: Optional[Dict[str, StrictStr]] = None __properties: ClassVar[List[str]] = ["cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "exposed_port", "ssh_public_key", "ssh_password", "env_vars"] model_config = ConfigDict( diff --git a/platform_api_python_client/models/get_deployment_log_response.py b/platform_api_python_client/models/get_deployment_log_response.py index e940439..aadbb46 100644 --- a/platform_api_python_client/models/get_deployment_log_response.py +++ b/platform_api_python_client/models/get_deployment_log_response.py @@ -27,7 +27,7 @@ class GetDeploymentLogResponse(BaseModel): GetDeploymentLogResponse """ # noqa: E501 events: List[Dict[str, Any]] - next_page_token: Optional[StrictStr] + next_page_token: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["events", "next_page_token"] model_config = ConfigDict( diff --git a/platform_api_python_client/models/get_deployment_response.py b/platform_api_python_client/models/get_deployment_response.py index 0532284..b13cddc 100644 --- a/platform_api_python_client/models/get_deployment_response.py +++ b/platform_api_python_client/models/get_deployment_response.py @@ -33,7 +33,7 @@ class GetDeploymentResponse(BaseModel): id: StrictInt name: StrictStr endpoint_url: StrictStr - image_url: Optional[StrictStr] + image_url: Optional[StrictStr] = None type: DeploymentType status: DeploymentStatus created_at: datetime diff --git a/platform_api_python_client/models/get_inference_deployment_response.py b/platform_api_python_client/models/get_inference_deployment_response.py index 220b11d..df2a9a0 100644 --- a/platform_api_python_client/models/get_inference_deployment_response.py +++ b/platform_api_python_client/models/get_inference_deployment_response.py @@ -33,7 +33,7 @@ class GetInferenceDeploymentResponse(BaseModel): id: StrictInt name: StrictStr endpoint_url: StrictStr - image_url: Optional[StrictStr] + image_url: Optional[StrictStr] = None type: DeploymentType status: DeploymentStatus created_at: datetime @@ -41,12 +41,12 @@ class GetInferenceDeploymentResponse(BaseModel): container_port: StrictInt min_scale: StrictInt max_scale: StrictInt - concurrency: Optional[StrictInt] - healthcheck: Optional[StrictStr] - endpoint_certificate_authority: Optional[StrictStr] - env_vars: Optional[Dict[str, StrictStr]] - command: Optional[List[StrictStr]] - command_args: Optional[List[StrictStr]] + concurrency: Optional[StrictInt] = None + healthcheck: Optional[StrictStr] = None + endpoint_certificate_authority: Optional[StrictStr] = None + env_vars: Optional[Dict[str, StrictStr]] = None + command: Optional[List[StrictStr]] = None + command_args: Optional[List[StrictStr]] = None __properties: ClassVar[List[str]] = ["cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "container_port", "min_scale", "max_scale", "concurrency", "healthcheck", "endpoint_certificate_authority", "env_vars", "command", "command_args"] model_config = ConfigDict( diff --git a/platform_api_python_client/models/get_payments_response.py b/platform_api_python_client/models/get_payment_response.py similarity index 77% rename from platform_api_python_client/models/get_payments_response.py rename to platform_api_python_client/models/get_payment_response.py index 906a802..2a0de92 100644 --- a/platform_api_python_client/models/get_payments_response.py +++ b/platform_api_python_client/models/get_payment_response.py @@ -17,18 +17,20 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictBool +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self -class GetPaymentsResponse(BaseModel): +class GetPaymentResponse(BaseModel): """ - GetPaymentsResponse + GetPaymentResponse """ # noqa: E501 - has_more: StrictBool - payments: List[Dict[str, Any]] - __properties: ClassVar[List[str]] = ["has_more", "payments"] + id: StrictStr + created: StrictInt + amount_total: StrictInt + credit_total: StrictInt + __properties: ClassVar[List[str]] = ["id", "created", "amount_total", "credit_total"] model_config = ConfigDict( populate_by_name=True, @@ -48,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of GetPaymentsResponse from a JSON string""" + """Create an instance of GetPaymentResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -73,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of GetPaymentsResponse from a dict""" + """Create an instance of GetPaymentResponse from a dict""" if obj is None: return None @@ -81,8 +83,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "has_more": obj.get("has_more"), - "payments": obj.get("payments") + "id": obj.get("id"), + "created": obj.get("created"), + "amount_total": obj.get("amount_total"), + "credit_total": obj.get("credit_total") }) return _obj diff --git a/platform_api_python_client/models/get_rag_deployment_response.py b/platform_api_python_client/models/get_rag_deployment_response.py index 63573de..2e98029 100644 --- a/platform_api_python_client/models/get_rag_deployment_response.py +++ b/platform_api_python_client/models/get_rag_deployment_response.py @@ -20,7 +20,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from platform_api_python_client.models.c_serve_v2_recipe_output import CServeV2RecipeOutput +from platform_api_python_client.models.c_serve_v2_recipe import CServeV2Recipe from platform_api_python_client.models.deployment_status import DeploymentStatus from platform_api_python_client.models.deployment_type import DeploymentType from typing import Optional, Set @@ -34,19 +34,19 @@ class GetRagDeploymentResponse(BaseModel): id: StrictInt name: StrictStr endpoint_url: StrictStr - image_url: Optional[StrictStr] + image_url: Optional[StrictStr] = None type: DeploymentType status: DeploymentStatus created_at: datetime hardware_instance_id: StrictInt - recipe: CServeV2RecipeOutput + recipe: CServeV2Recipe llm_model: StrictStr centml_api_key: StrictStr - min_scale: StrictInt - max_scale: StrictInt - endpoint_certificate_authority: Optional[StrictStr] - concurrency: Optional[StrictInt] - env_vars: Dict[str, StrictStr] + min_scale: Optional[StrictInt] = 1 + max_scale: Optional[StrictInt] = 1 + endpoint_certificate_authority: Optional[StrictStr] = None + concurrency: Optional[StrictInt] = None + env_vars: Optional[Dict[str, StrictStr]] = None __properties: ClassVar[List[str]] = ["cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "recipe", "llm_model", "centml_api_key", "min_scale", "max_scale", "endpoint_certificate_authority", "concurrency", "env_vars"] model_config = ConfigDict( @@ -127,7 +127,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "status": obj.get("status"), "created_at": obj.get("created_at"), "hardware_instance_id": obj.get("hardware_instance_id"), - "recipe": CServeV2RecipeOutput.from_dict(obj["recipe"]) if obj.get("recipe") is not None else None, + "recipe": CServeV2Recipe.from_dict(obj["recipe"]) if obj.get("recipe") is not None else None, "llm_model": obj.get("llm_model"), "centml_api_key": obj.get("centml_api_key"), "min_scale": obj.get("min_scale") if obj.get("min_scale") is not None else 1, diff --git a/platform_api_python_client/models/hardware_instance_response.py b/platform_api_python_client/models/hardware_instance_response.py index 5a05658..4483d39 100644 --- a/platform_api_python_client/models/hardware_instance_response.py +++ b/platform_api_python_client/models/hardware_instance_response.py @@ -34,9 +34,10 @@ class HardwareInstanceResponse(BaseModel): memory: StrictInt cost_per_hr: StrictInt cluster_id: StrictInt - provider: Optional[StrictStr] - num_accelerators: Optional[StrictInt] - __properties: ClassVar[List[str]] = ["id", "name", "gpu_type", "num_gpu", "cpu", "memory", "cost_per_hr", "cluster_id", "provider", "num_accelerators"] + provider: Optional[StrictStr] = None + num_accelerators: Optional[StrictInt] = None + accelerator_memory: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["id", "name", "gpu_type", "num_gpu", "cpu", "memory", "cost_per_hr", "cluster_id", "provider", "num_accelerators", "accelerator_memory"] model_config = ConfigDict( populate_by_name=True, @@ -87,6 +88,11 @@ def to_dict(self) -> Dict[str, Any]: if self.num_accelerators is None and "num_accelerators" in self.model_fields_set: _dict['num_accelerators'] = None + # set to None if accelerator_memory (nullable) is None + # and model_fields_set contains the field + if self.accelerator_memory is None and "accelerator_memory" in self.model_fields_set: + _dict['accelerator_memory'] = None + return _dict @classmethod @@ -108,7 +114,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "cost_per_hr": obj.get("cost_per_hr"), "cluster_id": obj.get("cluster_id"), "provider": obj.get("provider"), - "num_accelerators": obj.get("num_accelerators") + "num_accelerators": obj.get("num_accelerators"), + "accelerator_memory": obj.get("accelerator_memory") }) return _obj diff --git a/platform_api_python_client/models/list_payments_response.py b/platform_api_python_client/models/list_payments_response.py new file mode 100644 index 0000000..e2eda14 --- /dev/null +++ b/platform_api_python_client/models/list_payments_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from platform_api_python_client.models.get_payment_response import GetPaymentResponse +from typing import Optional, Set +from typing_extensions import Self + +class ListPaymentsResponse(BaseModel): + """ + ListPaymentsResponse + """ # noqa: E501 + payments: List[GetPaymentResponse] + __properties: ClassVar[List[str]] = ["payments"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ListPaymentsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in payments (list) + _items = [] + if self.payments: + for _item_payments in self.payments: + if _item_payments: + _items.append(_item_payments.to_dict()) + _dict['payments'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListPaymentsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "payments": [GetPaymentResponse.from_dict(_item) for _item in obj["payments"]] if obj.get("payments") is not None else None + }) + return _obj + + diff --git a/platform_api_python_client/models/list_user_vault_items_response.py b/platform_api_python_client/models/list_user_vault_items_response.py index ca4dbcc..57060f9 100644 --- a/platform_api_python_client/models/list_user_vault_items_response.py +++ b/platform_api_python_client/models/list_user_vault_items_response.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List -from platform_api_python_client.models.user_vault_item_output import UserVaultItemOutput +from platform_api_python_client.models.user_vault_item import UserVaultItem from typing import Optional, Set from typing_extensions import Self @@ -27,7 +27,7 @@ class ListUserVaultItemsResponse(BaseModel): """ ListUserVaultItemsResponse """ # noqa: E501 - results: List[UserVaultItemOutput] + results: List[UserVaultItem] __properties: ClassVar[List[str]] = ["results"] model_config = ConfigDict( @@ -88,7 +88,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "results": [UserVaultItemOutput.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None + "results": [UserVaultItem.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None }) return _obj diff --git a/platform_api_python_client/models/prebuilt_image_response.py b/platform_api_python_client/models/prebuilt_image_response.py index bebc261..513b5d7 100644 --- a/platform_api_python_client/models/prebuilt_image_response.py +++ b/platform_api_python_client/models/prebuilt_image_response.py @@ -32,7 +32,7 @@ class PrebuiltImageResponse(BaseModel): tags: List[StrictStr] type: DeploymentType port: StrictInt - healthcheck: Optional[StrictStr] + healthcheck: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["image_name", "label", "tags", "type", "port", "healthcheck"] model_config = ConfigDict( diff --git a/platform_api_python_client/models/update_autopay_request.py b/platform_api_python_client/models/update_autopay_request.py new file mode 100644 index 0000000..0f65495 --- /dev/null +++ b/platform_api_python_client/models/update_autopay_request.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UpdateAutopayRequest(BaseModel): + """ + UpdateAutopayRequest + """ # noqa: E501 + threshold: Optional[StrictInt] = None + amount: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["threshold", "amount"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateAutopayRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if threshold (nullable) is None + # and model_fields_set contains the field + if self.threshold is None and "threshold" in self.model_fields_set: + _dict['threshold'] = None + + # set to None if amount (nullable) is None + # and model_fields_set contains the field + if self.amount is None and "amount" in self.model_fields_set: + _dict['amount'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateAutopayRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "threshold": obj.get("threshold"), + "amount": obj.get("amount") + }) + return _obj + + diff --git a/platform_api_python_client/models/user_vault_item.py b/platform_api_python_client/models/user_vault_item.py new file mode 100644 index 0000000..bd3ff1b --- /dev/null +++ b/platform_api_python_client/models/user_vault_item.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from platform_api_python_client.models.user_vault_type import UserVaultType +from typing import Optional, Set +from typing_extensions import Self + +class UserVaultItem(BaseModel): + """ + UserVaultItem + """ # noqa: E501 + type: UserVaultType + key: StrictStr + value: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["type", "key", "value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserVaultItem from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if value (nullable) is None + # and model_fields_set contains the field + if self.value is None and "value" in self.model_fields_set: + _dict['value'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserVaultItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "key": obj.get("key"), + "value": obj.get("value") + }) + return _obj + + diff --git a/pyproject.toml b/pyproject.toml index ca0a23e..424dc07 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "platform_api_python_client" -version = "3.1.16" +version = "3.2.4" description = "Platform External API" authors = ["OpenAPI Generator Community "] license = "NoLicense" diff --git a/setup.py b/setup.py index cb8b0cf..17a8e35 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "platform-api-python-client" -VERSION = "3.1.16" +VERSION = "3.2.4" PYTHON_REQUIRES = ">= 3.8" REQUIRES = [ "urllib3 >= 1.25.3, < 3.0.0", diff --git a/test/test_c_serve_recipe_perf.py b/test/test_c_serve_recipe_perf.py index 474fda7..6eed193 100644 --- a/test/test_c_serve_recipe_perf.py +++ b/test/test_c_serve_recipe_perf.py @@ -35,35 +35,7 @@ def make_instance(self, include_optional) -> CServeRecipePerf: model = CServeRecipePerf() if include_optional: return CServeRecipePerf( - recipe = platform_api_python_client.models.c_serve_v2_recipe.CServeV2Recipe( - model = '', - max_model_len = 56, - is_embedding_model = True, - tokenizer = '', - tensor_parallel_size = 56, - pipeline_parallel_size = 56, - gpu_mem_util = 1.337, - block_size = 56, - swap_space = 56, - quantization = '', - dtype = 'auto', - cache_dtype = 'auto', - max_num_seqs = 56, - eager_execution = True, - use_flashinfer = True, - offloading_num = 1.337, - spec_draft_model = '', - spec_tokens = 56, - spec_prompt_lookup_max = 56, - spec_prompt_lookup_min = 56, - use_prefix_caching = True, - use_chunked_prefill = True, - chunked_prefill_size = 56, - max_seq_len_to_capture = 56, - distributed_executor_backend = 'ray', - spec_max_batch_size = 56, - spec_max_seq_len = 56, - num_scheduler_steps = 56, ), + recipe = { }, hardware_instance_id = 56, output_tp = [ [ @@ -78,35 +50,7 @@ def make_instance(self, include_optional) -> CServeRecipePerf: ) else: return CServeRecipePerf( - recipe = platform_api_python_client.models.c_serve_v2_recipe.CServeV2Recipe( - model = '', - max_model_len = 56, - is_embedding_model = True, - tokenizer = '', - tensor_parallel_size = 56, - pipeline_parallel_size = 56, - gpu_mem_util = 1.337, - block_size = 56, - swap_space = 56, - quantization = '', - dtype = 'auto', - cache_dtype = 'auto', - max_num_seqs = 56, - eager_execution = True, - use_flashinfer = True, - offloading_num = 1.337, - spec_draft_model = '', - spec_tokens = 56, - spec_prompt_lookup_max = 56, - spec_prompt_lookup_min = 56, - use_prefix_caching = True, - use_chunked_prefill = True, - chunked_prefill_size = 56, - max_seq_len_to_capture = 56, - distributed_executor_backend = 'ray', - spec_max_batch_size = 56, - spec_max_seq_len = 56, - num_scheduler_steps = 56, ), + recipe = { }, hardware_instance_id = 56, output_tp = [ [ diff --git a/test/test_c_serve_recipe_response.py b/test/test_c_serve_recipe_response.py index b59d4c0..9459e7a 100644 --- a/test/test_c_serve_recipe_response.py +++ b/test/test_c_serve_recipe_response.py @@ -36,37 +36,8 @@ def make_instance(self, include_optional) -> CServeRecipeResponse: if include_optional: return CServeRecipeResponse( model = '', - cluster_id = 56, fastest = platform_api_python_client.models.c_serve_recipe_perf.CServeRecipePerf( - recipe = platform_api_python_client.models.c_serve_v2_recipe.CServeV2Recipe( - model = '', - max_model_len = 56, - is_embedding_model = True, - tokenizer = '', - tensor_parallel_size = 56, - pipeline_parallel_size = 56, - gpu_mem_util = 1.337, - block_size = 56, - swap_space = 56, - quantization = '', - dtype = 'auto', - cache_dtype = 'auto', - max_num_seqs = 56, - eager_execution = True, - use_flashinfer = True, - offloading_num = 1.337, - spec_draft_model = '', - spec_tokens = 56, - spec_prompt_lookup_max = 56, - spec_prompt_lookup_min = 56, - use_prefix_caching = True, - use_chunked_prefill = True, - chunked_prefill_size = 56, - max_seq_len_to_capture = 56, - distributed_executor_backend = 'ray', - spec_max_batch_size = 56, - spec_max_seq_len = 56, - num_scheduler_steps = 56, ), + recipe = { }, hardware_instance_id = 56, output_tp = [ [ @@ -79,35 +50,7 @@ def make_instance(self, include_optional) -> CServeRecipeResponse: ] ], ), cheapest = platform_api_python_client.models.c_serve_recipe_perf.CServeRecipePerf( - recipe = platform_api_python_client.models.c_serve_v2_recipe.CServeV2Recipe( - model = '', - max_model_len = 56, - is_embedding_model = True, - tokenizer = '', - tensor_parallel_size = 56, - pipeline_parallel_size = 56, - gpu_mem_util = 1.337, - block_size = 56, - swap_space = 56, - quantization = '', - dtype = 'auto', - cache_dtype = 'auto', - max_num_seqs = 56, - eager_execution = True, - use_flashinfer = True, - offloading_num = 1.337, - spec_draft_model = '', - spec_tokens = 56, - spec_prompt_lookup_max = 56, - spec_prompt_lookup_min = 56, - use_prefix_caching = True, - use_chunked_prefill = True, - chunked_prefill_size = 56, - max_seq_len_to_capture = 56, - distributed_executor_backend = 'ray', - spec_max_batch_size = 56, - spec_max_seq_len = 56, - num_scheduler_steps = 56, ), + recipe = { }, hardware_instance_id = 56, output_tp = [ [ @@ -120,35 +63,7 @@ def make_instance(self, include_optional) -> CServeRecipeResponse: ] ], ), best_value = platform_api_python_client.models.c_serve_recipe_perf.CServeRecipePerf( - recipe = platform_api_python_client.models.c_serve_v2_recipe.CServeV2Recipe( - model = '', - max_model_len = 56, - is_embedding_model = True, - tokenizer = '', - tensor_parallel_size = 56, - pipeline_parallel_size = 56, - gpu_mem_util = 1.337, - block_size = 56, - swap_space = 56, - quantization = '', - dtype = 'auto', - cache_dtype = 'auto', - max_num_seqs = 56, - eager_execution = True, - use_flashinfer = True, - offloading_num = 1.337, - spec_draft_model = '', - spec_tokens = 56, - spec_prompt_lookup_max = 56, - spec_prompt_lookup_min = 56, - use_prefix_caching = True, - use_chunked_prefill = True, - chunked_prefill_size = 56, - max_seq_len_to_capture = 56, - distributed_executor_backend = 'ray', - spec_max_batch_size = 56, - spec_max_seq_len = 56, - num_scheduler_steps = 56, ), + recipe = { }, hardware_instance_id = 56, output_tp = [ [ @@ -164,37 +79,8 @@ def make_instance(self, include_optional) -> CServeRecipeResponse: else: return CServeRecipeResponse( model = '', - cluster_id = 56, fastest = platform_api_python_client.models.c_serve_recipe_perf.CServeRecipePerf( - recipe = platform_api_python_client.models.c_serve_v2_recipe.CServeV2Recipe( - model = '', - max_model_len = 56, - is_embedding_model = True, - tokenizer = '', - tensor_parallel_size = 56, - pipeline_parallel_size = 56, - gpu_mem_util = 1.337, - block_size = 56, - swap_space = 56, - quantization = '', - dtype = 'auto', - cache_dtype = 'auto', - max_num_seqs = 56, - eager_execution = True, - use_flashinfer = True, - offloading_num = 1.337, - spec_draft_model = '', - spec_tokens = 56, - spec_prompt_lookup_max = 56, - spec_prompt_lookup_min = 56, - use_prefix_caching = True, - use_chunked_prefill = True, - chunked_prefill_size = 56, - max_seq_len_to_capture = 56, - distributed_executor_backend = 'ray', - spec_max_batch_size = 56, - spec_max_seq_len = 56, - num_scheduler_steps = 56, ), + recipe = { }, hardware_instance_id = 56, output_tp = [ [ @@ -207,35 +93,7 @@ def make_instance(self, include_optional) -> CServeRecipeResponse: ] ], ), cheapest = platform_api_python_client.models.c_serve_recipe_perf.CServeRecipePerf( - recipe = platform_api_python_client.models.c_serve_v2_recipe.CServeV2Recipe( - model = '', - max_model_len = 56, - is_embedding_model = True, - tokenizer = '', - tensor_parallel_size = 56, - pipeline_parallel_size = 56, - gpu_mem_util = 1.337, - block_size = 56, - swap_space = 56, - quantization = '', - dtype = 'auto', - cache_dtype = 'auto', - max_num_seqs = 56, - eager_execution = True, - use_flashinfer = True, - offloading_num = 1.337, - spec_draft_model = '', - spec_tokens = 56, - spec_prompt_lookup_max = 56, - spec_prompt_lookup_min = 56, - use_prefix_caching = True, - use_chunked_prefill = True, - chunked_prefill_size = 56, - max_seq_len_to_capture = 56, - distributed_executor_backend = 'ray', - spec_max_batch_size = 56, - spec_max_seq_len = 56, - num_scheduler_steps = 56, ), + recipe = { }, hardware_instance_id = 56, output_tp = [ [ @@ -248,35 +106,7 @@ def make_instance(self, include_optional) -> CServeRecipeResponse: ] ], ), best_value = platform_api_python_client.models.c_serve_recipe_perf.CServeRecipePerf( - recipe = platform_api_python_client.models.c_serve_v2_recipe.CServeV2Recipe( - model = '', - max_model_len = 56, - is_embedding_model = True, - tokenizer = '', - tensor_parallel_size = 56, - pipeline_parallel_size = 56, - gpu_mem_util = 1.337, - block_size = 56, - swap_space = 56, - quantization = '', - dtype = 'auto', - cache_dtype = 'auto', - max_num_seqs = 56, - eager_execution = True, - use_flashinfer = True, - offloading_num = 1.337, - spec_draft_model = '', - spec_tokens = 56, - spec_prompt_lookup_max = 56, - spec_prompt_lookup_min = 56, - use_prefix_caching = True, - use_chunked_prefill = True, - chunked_prefill_size = 56, - max_seq_len_to_capture = 56, - distributed_executor_backend = 'ray', - spec_max_batch_size = 56, - spec_max_seq_len = 56, - num_scheduler_steps = 56, ), + recipe = { }, hardware_instance_id = 56, output_tp = [ [ diff --git a/test/test_c_serve_v2_recipe.py b/test/test_c_serve_v2_recipe.py index 462e1d4..ecb9d06 100644 --- a/test/test_c_serve_v2_recipe.py +++ b/test/test_c_serve_v2_recipe.py @@ -36,64 +36,11 @@ def make_instance(self, include_optional) -> CServeV2Recipe: if include_optional: return CServeV2Recipe( model = '', - max_model_len = 56, - is_embedding_model = True, - tokenizer = '', - tensor_parallel_size = 56, - pipeline_parallel_size = 56, - gpu_mem_util = 1.337, - block_size = 56, - swap_space = 56, - quantization = '', - dtype = 'auto', - cache_dtype = 'auto', - max_num_seqs = 56, - eager_execution = True, - use_flashinfer = True, - offloading_num = 1.337, - spec_draft_model = '', - spec_tokens = 56, - spec_prompt_lookup_max = 56, - spec_prompt_lookup_min = 56, - use_prefix_caching = True, - use_chunked_prefill = True, - chunked_prefill_size = 56, - max_seq_len_to_capture = 56, - distributed_executor_backend = 'ray', - spec_max_batch_size = 56, - spec_max_seq_len = 56, - num_scheduler_steps = 56 + is_embedding_model = True ) else: return CServeV2Recipe( model = '', - max_model_len = 56, - is_embedding_model = True, - tokenizer = '', - tensor_parallel_size = 56, - pipeline_parallel_size = 56, - gpu_mem_util = 1.337, - block_size = 56, - swap_space = 56, - quantization = '', - dtype = 'auto', - cache_dtype = 'auto', - max_num_seqs = 56, - eager_execution = True, - use_flashinfer = True, - offloading_num = 1.337, - spec_draft_model = '', - spec_tokens = 56, - spec_prompt_lookup_max = 56, - spec_prompt_lookup_min = 56, - use_prefix_caching = True, - use_chunked_prefill = True, - chunked_prefill_size = 56, - max_seq_len_to_capture = 56, - distributed_executor_backend = 'ray', - spec_max_batch_size = 56, - spec_max_seq_len = 56, - num_scheduler_steps = 56, ) """ diff --git a/test/test_c_serve_v2_recipe_input.py b/test/test_c_serve_v2_recipe_input.py index 72bedeb..9fe49a5 100644 --- a/test/test_c_serve_v2_recipe_input.py +++ b/test/test_c_serve_v2_recipe_input.py @@ -36,40 +36,11 @@ def make_instance(self, include_optional) -> CServeV2RecipeInput: if include_optional: return CServeV2RecipeInput( model = '', - max_model_len = 56, - is_embedding_model = True, - tokenizer = '', - tensor_parallel_size = 56, - pipeline_parallel_size = 56, - gpu_mem_util = 1.337, - block_size = 56, - swap_space = 56, - quantization = '', - dtype = 'auto', - cache_dtype = 'auto', - max_num_seqs = 56, - eager_execution = True, - use_flashinfer = True, - offloading_num = 1.337, - spec_draft_model = '', - spec_tokens = 56, - spec_prompt_lookup_max = 56, - spec_prompt_lookup_min = 56, - use_prefix_caching = True, - use_chunked_prefill = True, - chunked_prefill_size = 56, - max_seq_len_to_capture = 56, - distributed_executor_backend = 'ray', - spec_max_batch_size = 56, - spec_max_seq_len = 56, - num_scheduler_steps = 56 + is_embedding_model = True ) else: return CServeV2RecipeInput( model = '', - tokenizer = '', - tensor_parallel_size = 56, - pipeline_parallel_size = 56, ) """ diff --git a/test/test_c_serve_v2_recipe_output.py b/test/test_c_serve_v2_recipe_output.py index 6505865..1f8691e 100644 --- a/test/test_c_serve_v2_recipe_output.py +++ b/test/test_c_serve_v2_recipe_output.py @@ -36,64 +36,12 @@ def make_instance(self, include_optional) -> CServeV2RecipeOutput: if include_optional: return CServeV2RecipeOutput( model = '', - max_model_len = 56, - is_embedding_model = True, - tokenizer = '', - tensor_parallel_size = 56, - pipeline_parallel_size = 56, - gpu_mem_util = 1.337, - block_size = 56, - swap_space = 56, - quantization = '', - dtype = 'auto', - cache_dtype = 'auto', - max_num_seqs = 56, - eager_execution = True, - use_flashinfer = True, - offloading_num = 1.337, - spec_draft_model = '', - spec_tokens = 56, - spec_prompt_lookup_max = 56, - spec_prompt_lookup_min = 56, - use_prefix_caching = True, - use_chunked_prefill = True, - chunked_prefill_size = 56, - max_seq_len_to_capture = 56, - distributed_executor_backend = 'ray', - spec_max_batch_size = 56, - spec_max_seq_len = 56, - num_scheduler_steps = 56 + is_embedding_model = True ) else: return CServeV2RecipeOutput( model = '', - max_model_len = 56, is_embedding_model = True, - tokenizer = '', - tensor_parallel_size = 56, - pipeline_parallel_size = 56, - gpu_mem_util = 1.337, - block_size = 56, - swap_space = 56, - quantization = '', - dtype = 'auto', - cache_dtype = 'auto', - max_num_seqs = 56, - eager_execution = True, - use_flashinfer = True, - offloading_num = 1.337, - spec_draft_model = '', - spec_tokens = 56, - spec_prompt_lookup_max = 56, - spec_prompt_lookup_min = 56, - use_prefix_caching = True, - use_chunked_prefill = True, - chunked_prefill_size = 56, - max_seq_len_to_capture = 56, - distributed_executor_backend = 'ray', - spec_max_batch_size = 56, - spec_max_seq_len = 56, - num_scheduler_steps = 56, ) """ diff --git a/test/test_create_c_serve_deployment_request.py b/test/test_create_c_serve_deployment_request.py index b336efd..66521a3 100644 --- a/test/test_create_c_serve_deployment_request.py +++ b/test/test_create_c_serve_deployment_request.py @@ -35,7 +35,7 @@ def make_instance(self, include_optional) -> CreateCServeDeploymentRequest: model = CreateCServeDeploymentRequest() if include_optional: return CreateCServeDeploymentRequest( - name = '', + name = 'ar1c2v7s6djuy1zmetozkhdomha1b0', cluster_id = 56, hardware_instance_id = 56, recipe = platform_api_python_client.models.c_serve_recipe.CServeRecipe( @@ -74,7 +74,7 @@ def make_instance(self, include_optional) -> CreateCServeDeploymentRequest: ) else: return CreateCServeDeploymentRequest( - name = '', + name = 'ar1c2v7s6djuy1zmetozkhdomha1b0', cluster_id = 56, hardware_instance_id = 56, recipe = platform_api_python_client.models.c_serve_recipe.CServeRecipe( diff --git a/test/test_create_c_serve_v2_deployment_request.py b/test/test_create_c_serve_v2_deployment_request.py index af466b0..351a3c9 100644 --- a/test/test_create_c_serve_v2_deployment_request.py +++ b/test/test_create_c_serve_v2_deployment_request.py @@ -35,38 +35,10 @@ def make_instance(self, include_optional) -> CreateCServeV2DeploymentRequest: model = CreateCServeV2DeploymentRequest() if include_optional: return CreateCServeV2DeploymentRequest( - name = '', + name = 'ar1c2v7s6djuy1zmetozkhdomha1b0', cluster_id = 56, hardware_instance_id = 56, - recipe = platform_api_python_client.models.c_serve_v2_recipe.CServeV2Recipe( - model = '', - max_model_len = 56, - is_embedding_model = True, - tokenizer = '', - tensor_parallel_size = 56, - pipeline_parallel_size = 56, - gpu_mem_util = 1.337, - block_size = 56, - swap_space = 56, - quantization = '', - dtype = 'auto', - cache_dtype = 'auto', - max_num_seqs = 56, - eager_execution = True, - use_flashinfer = True, - offloading_num = 1.337, - spec_draft_model = '', - spec_tokens = 56, - spec_prompt_lookup_max = 56, - spec_prompt_lookup_min = 56, - use_prefix_caching = True, - use_chunked_prefill = True, - chunked_prefill_size = 56, - max_seq_len_to_capture = 56, - distributed_executor_backend = 'ray', - spec_max_batch_size = 56, - spec_max_seq_len = 56, - num_scheduler_steps = 56, ), + recipe = { }, hf_token = '', endpoint_certificate_authority = '', min_scale = 56, @@ -78,38 +50,10 @@ def make_instance(self, include_optional) -> CreateCServeV2DeploymentRequest: ) else: return CreateCServeV2DeploymentRequest( - name = '', + name = 'ar1c2v7s6djuy1zmetozkhdomha1b0', cluster_id = 56, hardware_instance_id = 56, - recipe = platform_api_python_client.models.c_serve_v2_recipe.CServeV2Recipe( - model = '', - max_model_len = 56, - is_embedding_model = True, - tokenizer = '', - tensor_parallel_size = 56, - pipeline_parallel_size = 56, - gpu_mem_util = 1.337, - block_size = 56, - swap_space = 56, - quantization = '', - dtype = 'auto', - cache_dtype = 'auto', - max_num_seqs = 56, - eager_execution = True, - use_flashinfer = True, - offloading_num = 1.337, - spec_draft_model = '', - spec_tokens = 56, - spec_prompt_lookup_max = 56, - spec_prompt_lookup_min = 56, - use_prefix_caching = True, - use_chunked_prefill = True, - chunked_prefill_size = 56, - max_seq_len_to_capture = 56, - distributed_executor_backend = 'ray', - spec_max_batch_size = 56, - spec_max_seq_len = 56, - num_scheduler_steps = 56, ), + recipe = { }, min_scale = 56, max_scale = 56, ) diff --git a/test/test_create_compute_deployment_request.py b/test/test_create_compute_deployment_request.py index 9c0a0ed..1f14788 100644 --- a/test/test_create_compute_deployment_request.py +++ b/test/test_create_compute_deployment_request.py @@ -35,19 +35,20 @@ def make_instance(self, include_optional) -> CreateComputeDeploymentRequest: model = CreateComputeDeploymentRequest() if include_optional: return CreateComputeDeploymentRequest( - name = '', + name = 'ar1c2v7s6djuy1zmetozkhdomha1b0', cluster_id = 56, hardware_instance_id = 56, image_url = '', - ssh_public_key = '', - ssh_password = '' + enable_jupyter = True, + ssh_public_key = '' ) else: return CreateComputeDeploymentRequest( - name = '', + name = 'ar1c2v7s6djuy1zmetozkhdomha1b0', cluster_id = 56, hardware_instance_id = 56, image_url = '', + ssh_public_key = '', ) """ diff --git a/test/test_create_compute_deployment_response.py b/test/test_create_compute_deployment_response.py index 093f2d2..dacab7a 100644 --- a/test/test_create_compute_deployment_response.py +++ b/test/test_create_compute_deployment_response.py @@ -38,7 +38,8 @@ def make_instance(self, include_optional) -> CreateComputeDeploymentResponse: id = 56, created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), endpoint_url = '', - port = 56 + port = 56, + jupyter_token = '' ) else: return CreateComputeDeploymentResponse( diff --git a/test/test_create_inference_deployment_request.py b/test/test_create_inference_deployment_request.py index 32b1695..a43f792 100644 --- a/test/test_create_inference_deployment_request.py +++ b/test/test_create_inference_deployment_request.py @@ -35,7 +35,7 @@ def make_instance(self, include_optional) -> CreateInferenceDeploymentRequest: model = CreateInferenceDeploymentRequest() if include_optional: return CreateInferenceDeploymentRequest( - name = '', + name = 'ar1c2v7s6djuy1zmetozkhdomha1b0', cluster_id = 56, hardware_instance_id = 56, image_url = '', @@ -47,17 +47,12 @@ def make_instance(self, include_optional) -> CreateInferenceDeploymentRequest: env_vars = { 'key' : '' }, - command = [ - '' - ], - command_args = [ - '' - ], + command = '', endpoint_certificate_authority = '' ) else: return CreateInferenceDeploymentRequest( - name = '', + name = 'ar1c2v7s6djuy1zmetozkhdomha1b0', cluster_id = 56, hardware_instance_id = 56, image_url = '', diff --git a/test/test_create_rag_deployment_request.py b/test/test_create_rag_deployment_request.py index 1d4c957..62850b0 100644 --- a/test/test_create_rag_deployment_request.py +++ b/test/test_create_rag_deployment_request.py @@ -35,35 +35,12 @@ def make_instance(self, include_optional) -> CreateRagDeploymentRequest: model = CreateRagDeploymentRequest() if include_optional: return CreateRagDeploymentRequest( - name = '', + name = 'ar1c2v7s6djuy1zmetozkhdomha1b0', cluster_id = 56, hardware_instance_id = 56, - recipe = platform_api_python_client.models.c_serve_recipe.CServeRecipe( - model = '', - is_embedding_model = True, - tensor_parallel_size = 56, - pipeline_parallel_size = 56, - block_size = 16, - swap_space = 0.0, - gpu_mem_util = 0.0, - max_num_seqs = 56, - offloading_num = 56, - use_prefix_caching = True, - use_chunked_prefill = True, - chunked_prefill_size = 56, - eager_execution = True, - num_scheduler_steps = 56, - use_flashinfer = True, - max_model_len = 128.0, - dtype = 'auto', - tokenizer = '', - spec_proposer = 'draft', - spec_draft_model = '', - spec_tokens = 56, - spec_prompt_lookup_min = 1.0, - spec_prompt_lookup_max = 1.0, - seed = 56, ), + recipe = { }, hf_token = '', + llm_model = '', centml_api_key = '', min_scale = 56, max_scale = 56, @@ -75,34 +52,11 @@ def make_instance(self, include_optional) -> CreateRagDeploymentRequest: ) else: return CreateRagDeploymentRequest( - name = '', + name = 'ar1c2v7s6djuy1zmetozkhdomha1b0', cluster_id = 56, hardware_instance_id = 56, - recipe = platform_api_python_client.models.c_serve_recipe.CServeRecipe( - model = '', - is_embedding_model = True, - tensor_parallel_size = 56, - pipeline_parallel_size = 56, - block_size = 16, - swap_space = 0.0, - gpu_mem_util = 0.0, - max_num_seqs = 56, - offloading_num = 56, - use_prefix_caching = True, - use_chunked_prefill = True, - chunked_prefill_size = 56, - eager_execution = True, - num_scheduler_steps = 56, - use_flashinfer = True, - max_model_len = 128.0, - dtype = 'auto', - tokenizer = '', - spec_proposer = 'draft', - spec_draft_model = '', - spec_tokens = 56, - spec_prompt_lookup_min = 1.0, - spec_prompt_lookup_max = 1.0, - seed = 56, ), + recipe = { }, + llm_model = '', centml_api_key = '', ) """ diff --git a/test/test_get_payments_response.py b/test/test_create_url_request.py similarity index 53% rename from test/test_get_payments_response.py rename to test/test_create_url_request.py index 5856f6a..86907ac 100644 --- a/test/test_get_payments_response.py +++ b/test/test_create_url_request.py @@ -14,10 +14,10 @@ import unittest -from platform_api_python_client.models.get_payments_response import GetPaymentsResponse +from platform_api_python_client.models.create_url_request import CreateUrlRequest -class TestGetPaymentsResponse(unittest.TestCase): - """GetPaymentsResponse unit test stubs""" +class TestCreateUrlRequest(unittest.TestCase): + """CreateUrlRequest unit test stubs""" def setUp(self): pass @@ -25,32 +25,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> GetPaymentsResponse: - """Test GetPaymentsResponse + def make_instance(self, include_optional) -> CreateUrlRequest: + """Test CreateUrlRequest include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `GetPaymentsResponse` + # uncomment below to create an instance of `CreateUrlRequest` """ - model = GetPaymentsResponse() + model = CreateUrlRequest() if include_optional: - return GetPaymentsResponse( - has_more = True, - payments = [ - None - ] + return CreateUrlRequest( + filename = '', + extension = '' ) else: - return GetPaymentsResponse( - has_more = True, - payments = [ - None - ], + return CreateUrlRequest( + filename = '', + extension = '', ) """ - def testGetPaymentsResponse(self): - """Test GetPaymentsResponse""" + def testCreateUrlRequest(self): + """Test CreateUrlRequest""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_client_secret_response.py b/test/test_create_url_response.py similarity index 57% rename from test/test_client_secret_response.py rename to test/test_create_url_response.py index 6c5a545..425d1bc 100644 --- a/test/test_client_secret_response.py +++ b/test/test_create_url_response.py @@ -14,10 +14,10 @@ import unittest -from platform_api_python_client.models.client_secret_response import ClientSecretResponse +from platform_api_python_client.models.create_url_response import CreateUrlResponse -class TestClientSecretResponse(unittest.TestCase): - """ClientSecretResponse unit test stubs""" +class TestCreateUrlResponse(unittest.TestCase): + """CreateUrlResponse unit test stubs""" def setUp(self): pass @@ -25,26 +25,26 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> ClientSecretResponse: - """Test ClientSecretResponse + def make_instance(self, include_optional) -> CreateUrlResponse: + """Test CreateUrlResponse include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `ClientSecretResponse` + # uncomment below to create an instance of `CreateUrlResponse` """ - model = ClientSecretResponse() + model = CreateUrlResponse() if include_optional: - return ClientSecretResponse( - client_secret = '' + return CreateUrlResponse( + url = '0' ) else: - return ClientSecretResponse( - client_secret = '', + return CreateUrlResponse( + url = '0', ) """ - def testClientSecretResponse(self): - """Test ClientSecretResponse""" + def testCreateUrlResponse(self): + """Test CreateUrlResponse""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_deployment_status_response.py b/test/test_deployment_status_response.py index 916c65f..4197798 100644 --- a/test/test_deployment_status_response.py +++ b/test/test_deployment_status_response.py @@ -47,9 +47,6 @@ def make_instance(self, include_optional) -> DeploymentStatusResponse: id = 56, type = 'inference', status = 'active', - service_status = 'Healthy', - error_message = '', - endpoint_url = '', ) """ diff --git a/test/test_external_api.py b/test/test_external_api.py index d0d2e29..81f1700 100644 --- a/test/test_external_api.py +++ b/test/test_external_api.py @@ -61,6 +61,13 @@ def test_create_cserve_deployment_deployments_cserve_post(self) -> None: """ pass + def test_create_cserve_v2_deployment_deployments_cserve_v2_post(self) -> None: + """Test case for create_cserve_v2_deployment_deployments_cserve_v2_post + + Create Cserve V2 Deployment + """ + pass + def test_create_inference_deployment_deployments_inference_post(self) -> None: """Test case for create_inference_deployment_deployments_inference_post @@ -75,6 +82,13 @@ def test_create_rag_deployment_deployments_rag_post(self) -> None: """ pass + def test_create_setup_payments_setup_checkout_post(self) -> None: + """Test case for create_setup_payments_setup_checkout_post + + Create Setup + """ + pass + def test_delete_api_key_credentials_api_key_id_delete(self) -> None: """Test case for delete_api_key_credentials_api_key_id_delete @@ -82,6 +96,27 @@ def test_delete_api_key_credentials_api_key_id_delete(self) -> None: """ pass + def test_delete_user_vault_item_endpoint_user_vault_delete(self) -> None: + """Test case for delete_user_vault_item_endpoint_user_vault_delete + + Delete User Vault Item Endpoint + """ + pass + + def test_download_url_file_url_download_post(self) -> None: + """Test case for download_url_file_url_download_post + + Download Url + """ + pass + + def test_get_all_user_vault_items_endpoint_user_vault_get(self) -> None: + """Test case for get_all_user_vault_items_endpoint_user_vault_get + + Get All User Vault Items Endpoint + """ + pass + def test_get_api_keys_credentials_api_key_get(self) -> None: """Test case for get_api_keys_credentials_api_key_get @@ -124,6 +159,13 @@ def test_get_cserve_recipe_deployments_cserve_recipes_get(self) -> None: """ pass + def test_get_cserve_v2_deployment_deployments_cserve_v2_deployment_id_get(self) -> None: + """Test case for get_cserve_v2_deployment_deployments_cserve_v2_deployment_id_get + + Get Cserve V2 Deployment + """ + pass + def test_get_deployment_logs_deployments_logs_deployment_id_get(self) -> None: """Test case for get_deployment_logs_deployments_logs_deployment_id_get @@ -208,6 +250,20 @@ def test_update_deployment_status_deployments_status_deployment_id_put(self) -> """ pass + def test_update_user_vault_item_endpoint_user_vault_put(self) -> None: + """Test case for update_user_vault_item_endpoint_user_vault_put + + Update User Vault Item Endpoint + """ + pass + + def test_upload_url_file_url_upload_post(self) -> None: + """Test case for upload_url_file_url_upload_post + + Upload Url + """ + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_get_c_serve_deployment_response.py b/test/test_get_c_serve_deployment_response.py index 03f66ab..cfb0aa3 100644 --- a/test/test_get_c_serve_deployment_response.py +++ b/test/test_get_c_serve_deployment_response.py @@ -79,45 +79,18 @@ def make_instance(self, include_optional) -> GetCServeDeploymentResponse: else: return GetCServeDeploymentResponse( model = '', - is_embedding_model = True, tensor_parallel_size = 56, pipeline_parallel_size = 56, - block_size = 16, - swap_space = 0.0, - gpu_mem_util = 0.0, - max_num_seqs = 56, - offloading_num = 56, - use_prefix_caching = True, - use_chunked_prefill = True, - chunked_prefill_size = 56, - eager_execution = True, - num_scheduler_steps = 56, - use_flashinfer = True, - max_model_len = 128.0, - dtype = 'auto', - tokenizer = '', - spec_proposer = 'draft', - spec_draft_model = '', - spec_tokens = 56, - spec_prompt_lookup_min = 1.0, - spec_prompt_lookup_max = 1.0, - seed = 56, cluster_id = 56, id = 56, name = '', endpoint_url = '', - image_url = '', type = 'inference', status = 'active', created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), hardware_instance_id = 56, min_scale = 56, max_scale = 56, - endpoint_certificate_authority = '', - concurrency = 56, - env_vars = { - 'key' : '' - }, ) """ diff --git a/test/test_get_c_serve_v2_deployment_response.py b/test/test_get_c_serve_v2_deployment_response.py index dbb5e8f..cecc158 100644 --- a/test/test_get_c_serve_v2_deployment_response.py +++ b/test/test_get_c_serve_v2_deployment_response.py @@ -35,34 +35,6 @@ def make_instance(self, include_optional) -> GetCServeV2DeploymentResponse: model = GetCServeV2DeploymentResponse() if include_optional: return GetCServeV2DeploymentResponse( - model = '', - max_model_len = 56, - is_embedding_model = True, - tokenizer = '', - tensor_parallel_size = 56, - pipeline_parallel_size = 56, - gpu_mem_util = 1.337, - block_size = 56, - swap_space = 56, - quantization = '', - dtype = 'auto', - cache_dtype = 'auto', - max_num_seqs = 56, - eager_execution = True, - use_flashinfer = True, - offloading_num = 1.337, - spec_draft_model = '', - spec_tokens = 56, - spec_prompt_lookup_max = 56, - spec_prompt_lookup_min = 56, - use_prefix_caching = True, - use_chunked_prefill = True, - chunked_prefill_size = 56, - max_seq_len_to_capture = 56, - distributed_executor_backend = 'ray', - spec_max_batch_size = 56, - spec_max_seq_len = 56, - num_scheduler_steps = 56, cluster_id = 56, id = 56, name = '', @@ -72,6 +44,7 @@ def make_instance(self, include_optional) -> GetCServeV2DeploymentResponse: status = 'active', created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), hardware_instance_id = 56, + recipe = { }, min_scale = 56, max_scale = 56, endpoint_certificate_authority = '', @@ -82,50 +55,17 @@ def make_instance(self, include_optional) -> GetCServeV2DeploymentResponse: ) else: return GetCServeV2DeploymentResponse( - model = '', - max_model_len = 56, - is_embedding_model = True, - tokenizer = '', - tensor_parallel_size = 56, - pipeline_parallel_size = 56, - gpu_mem_util = 1.337, - block_size = 56, - swap_space = 56, - quantization = '', - dtype = 'auto', - cache_dtype = 'auto', - max_num_seqs = 56, - eager_execution = True, - use_flashinfer = True, - offloading_num = 1.337, - spec_draft_model = '', - spec_tokens = 56, - spec_prompt_lookup_max = 56, - spec_prompt_lookup_min = 56, - use_prefix_caching = True, - use_chunked_prefill = True, - chunked_prefill_size = 56, - max_seq_len_to_capture = 56, - distributed_executor_backend = 'ray', - spec_max_batch_size = 56, - spec_max_seq_len = 56, - num_scheduler_steps = 56, cluster_id = 56, id = 56, name = '', endpoint_url = '', - image_url = '', type = 'inference', status = 'active', created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), hardware_instance_id = 56, + recipe = { }, min_scale = 56, max_scale = 56, - endpoint_certificate_authority = '', - concurrency = 56, - env_vars = { - 'key' : '' - }, ) """ diff --git a/test/test_get_cluster_response.py b/test/test_get_cluster_response.py index 2e1b653..4dc3423 100644 --- a/test/test_get_cluster_response.py +++ b/test/test_get_cluster_response.py @@ -36,7 +36,8 @@ def make_instance(self, include_optional) -> GetClusterResponse: if include_optional: return GetClusterResponse( id = 56, - display_name = '' + display_name = '', + region = '' ) else: return GetClusterResponse( diff --git a/test/test_get_compute_deployment_response.py b/test/test_get_compute_deployment_response.py index 1151d2b..1d50ef3 100644 --- a/test/test_get_compute_deployment_response.py +++ b/test/test_get_compute_deployment_response.py @@ -57,17 +57,11 @@ def make_instance(self, include_optional) -> GetComputeDeploymentResponse: id = 56, name = '', endpoint_url = '', - image_url = '', type = 'inference', status = 'active', created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), hardware_instance_id = 56, exposed_port = 56, - ssh_public_key = '', - ssh_password = '', - env_vars = { - 'key' : '' - }, ) """ diff --git a/test/test_get_deployment_log_response.py b/test/test_get_deployment_log_response.py index 4fe4110..afbb0e4 100644 --- a/test/test_get_deployment_log_response.py +++ b/test/test_get_deployment_log_response.py @@ -45,7 +45,6 @@ def make_instance(self, include_optional) -> GetDeploymentLogResponse: events = [ None ], - next_page_token = '', ) """ diff --git a/test/test_get_deployment_response.py b/test/test_get_deployment_response.py index ca311ce..8ca4641 100644 --- a/test/test_get_deployment_response.py +++ b/test/test_get_deployment_response.py @@ -51,7 +51,6 @@ def make_instance(self, include_optional) -> GetDeploymentResponse: id = 56, name = '', endpoint_url = '', - image_url = '', type = 'inference', status = 'active', created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), diff --git a/test/test_get_inference_deployment_response.py b/test/test_get_inference_deployment_response.py index 79d9a28..2a3bace 100644 --- a/test/test_get_inference_deployment_response.py +++ b/test/test_get_inference_deployment_response.py @@ -66,7 +66,6 @@ def make_instance(self, include_optional) -> GetInferenceDeploymentResponse: id = 56, name = '', endpoint_url = '', - image_url = '', type = 'inference', status = 'active', created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), @@ -74,18 +73,6 @@ def make_instance(self, include_optional) -> GetInferenceDeploymentResponse: container_port = 56, min_scale = 56, max_scale = 56, - concurrency = 56, - healthcheck = '', - endpoint_certificate_authority = '', - env_vars = { - 'key' : '' - }, - command = [ - '' - ], - command_args = [ - '' - ], ) """ diff --git a/test/test_get_payment_response.py b/test/test_get_payment_response.py new file mode 100644 index 0000000..42e3106 --- /dev/null +++ b/test/test_get_payment_response.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.get_payment_response import GetPaymentResponse + +class TestGetPaymentResponse(unittest.TestCase): + """GetPaymentResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetPaymentResponse: + """Test GetPaymentResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetPaymentResponse` + """ + model = GetPaymentResponse() + if include_optional: + return GetPaymentResponse( + id = '', + created = 56, + amount_total = 56, + credit_total = 56 + ) + else: + return GetPaymentResponse( + id = '', + created = 56, + amount_total = 56, + credit_total = 56, + ) + """ + + def testGetPaymentResponse(self): + """Test GetPaymentResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_get_rag_deployment_response.py b/test/test_get_rag_deployment_response.py index b812e91..26ede80 100644 --- a/test/test_get_rag_deployment_response.py +++ b/test/test_get_rag_deployment_response.py @@ -35,30 +35,6 @@ def make_instance(self, include_optional) -> GetRagDeploymentResponse: model = GetRagDeploymentResponse() if include_optional: return GetRagDeploymentResponse( - model = '', - is_embedding_model = True, - tensor_parallel_size = 56, - pipeline_parallel_size = 56, - block_size = 16, - swap_space = 0.0, - gpu_mem_util = 0.0, - max_num_seqs = 56, - offloading_num = 56, - use_prefix_caching = True, - use_chunked_prefill = True, - chunked_prefill_size = 56, - eager_execution = True, - num_scheduler_steps = 56, - use_flashinfer = True, - max_model_len = 128.0, - dtype = 'auto', - tokenizer = '', - spec_proposer = 'draft', - spec_draft_model = '', - spec_tokens = 56, - spec_prompt_lookup_min = 1.0, - spec_prompt_lookup_max = 1.0, - seed = 56, cluster_id = 56, id = 56, name = '', @@ -68,6 +44,8 @@ def make_instance(self, include_optional) -> GetRagDeploymentResponse: status = 'active', created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), hardware_instance_id = 56, + recipe = { }, + llm_model = '', centml_api_key = '', min_scale = 56, max_scale = 56, @@ -79,47 +57,17 @@ def make_instance(self, include_optional) -> GetRagDeploymentResponse: ) else: return GetRagDeploymentResponse( - model = '', - is_embedding_model = True, - tensor_parallel_size = 56, - pipeline_parallel_size = 56, - block_size = 16, - swap_space = 0.0, - gpu_mem_util = 0.0, - max_num_seqs = 56, - offloading_num = 56, - use_prefix_caching = True, - use_chunked_prefill = True, - chunked_prefill_size = 56, - eager_execution = True, - num_scheduler_steps = 56, - use_flashinfer = True, - max_model_len = 128.0, - dtype = 'auto', - tokenizer = '', - spec_proposer = 'draft', - spec_draft_model = '', - spec_tokens = 56, - spec_prompt_lookup_min = 1.0, - spec_prompt_lookup_max = 1.0, - seed = 56, cluster_id = 56, id = 56, name = '', endpoint_url = '', - image_url = '', type = 'inference', status = 'active', created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), hardware_instance_id = 56, + recipe = { }, + llm_model = '', centml_api_key = '', - min_scale = 56, - max_scale = 56, - endpoint_certificate_authority = '', - concurrency = 56, - env_vars = { - 'key' : '' - }, ) """ diff --git a/test/test_hardware_instance_response.py b/test/test_hardware_instance_response.py index 918b488..fe9e803 100644 --- a/test/test_hardware_instance_response.py +++ b/test/test_hardware_instance_response.py @@ -41,7 +41,11 @@ def make_instance(self, include_optional) -> HardwareInstanceResponse: num_gpu = 56, cpu = 56, memory = 56, - cost_per_hr = 56 + cost_per_hr = 56, + cluster_id = 56, + provider = '', + num_accelerators = 56, + accelerator_memory = 56 ) else: return HardwareInstanceResponse( @@ -52,6 +56,7 @@ def make_instance(self, include_optional) -> HardwareInstanceResponse: cpu = 56, memory = 56, cost_per_hr = 56, + cluster_id = 56, ) """ diff --git a/test/test_list_c_serve_recipe_response.py b/test/test_list_c_serve_recipe_response.py index 5408b10..96fe2c9 100644 --- a/test/test_list_c_serve_recipe_response.py +++ b/test/test_list_c_serve_recipe_response.py @@ -38,37 +38,8 @@ def make_instance(self, include_optional) -> ListCServeRecipeResponse: results = [ platform_api_python_client.models.c_serve_recipe_response.CServeRecipeResponse( model = '', - cluster_id = 56, fastest = platform_api_python_client.models.c_serve_recipe_perf.CServeRecipePerf( - recipe = platform_api_python_client.models.c_serve_v2_recipe.CServeV2Recipe( - model = '', - max_model_len = 56, - is_embedding_model = True, - tokenizer = '', - tensor_parallel_size = 56, - pipeline_parallel_size = 56, - gpu_mem_util = 1.337, - block_size = 56, - swap_space = 56, - quantization = '', - dtype = 'auto', - cache_dtype = 'auto', - max_num_seqs = 56, - eager_execution = True, - use_flashinfer = True, - offloading_num = 1.337, - spec_draft_model = '', - spec_tokens = 56, - spec_prompt_lookup_max = 56, - spec_prompt_lookup_min = 56, - use_prefix_caching = True, - use_chunked_prefill = True, - chunked_prefill_size = 56, - max_seq_len_to_capture = 56, - distributed_executor_backend = 'ray', - spec_max_batch_size = 56, - spec_max_seq_len = 56, - num_scheduler_steps = 56, ), + recipe = { }, hardware_instance_id = 56, output_tp = [ [ @@ -81,35 +52,7 @@ def make_instance(self, include_optional) -> ListCServeRecipeResponse: ] ], ), cheapest = platform_api_python_client.models.c_serve_recipe_perf.CServeRecipePerf( - recipe = platform_api_python_client.models.c_serve_v2_recipe.CServeV2Recipe( - model = '', - max_model_len = 56, - is_embedding_model = True, - tokenizer = '', - tensor_parallel_size = 56, - pipeline_parallel_size = 56, - gpu_mem_util = 1.337, - block_size = 56, - swap_space = 56, - quantization = '', - dtype = 'auto', - cache_dtype = 'auto', - max_num_seqs = 56, - eager_execution = True, - use_flashinfer = True, - offloading_num = 1.337, - spec_draft_model = '', - spec_tokens = 56, - spec_prompt_lookup_max = 56, - spec_prompt_lookup_min = 56, - use_prefix_caching = True, - use_chunked_prefill = True, - chunked_prefill_size = 56, - max_seq_len_to_capture = 56, - distributed_executor_backend = 'ray', - spec_max_batch_size = 56, - spec_max_seq_len = 56, - num_scheduler_steps = 56, ), + recipe = { }, hardware_instance_id = 56, output_tp = [ [ @@ -129,37 +72,8 @@ def make_instance(self, include_optional) -> ListCServeRecipeResponse: results = [ platform_api_python_client.models.c_serve_recipe_response.CServeRecipeResponse( model = '', - cluster_id = 56, fastest = platform_api_python_client.models.c_serve_recipe_perf.CServeRecipePerf( - recipe = platform_api_python_client.models.c_serve_v2_recipe.CServeV2Recipe( - model = '', - max_model_len = 56, - is_embedding_model = True, - tokenizer = '', - tensor_parallel_size = 56, - pipeline_parallel_size = 56, - gpu_mem_util = 1.337, - block_size = 56, - swap_space = 56, - quantization = '', - dtype = 'auto', - cache_dtype = 'auto', - max_num_seqs = 56, - eager_execution = True, - use_flashinfer = True, - offloading_num = 1.337, - spec_draft_model = '', - spec_tokens = 56, - spec_prompt_lookup_max = 56, - spec_prompt_lookup_min = 56, - use_prefix_caching = True, - use_chunked_prefill = True, - chunked_prefill_size = 56, - max_seq_len_to_capture = 56, - distributed_executor_backend = 'ray', - spec_max_batch_size = 56, - spec_max_seq_len = 56, - num_scheduler_steps = 56, ), + recipe = { }, hardware_instance_id = 56, output_tp = [ [ @@ -172,35 +86,7 @@ def make_instance(self, include_optional) -> ListCServeRecipeResponse: ] ], ), cheapest = platform_api_python_client.models.c_serve_recipe_perf.CServeRecipePerf( - recipe = platform_api_python_client.models.c_serve_v2_recipe.CServeV2Recipe( - model = '', - max_model_len = 56, - is_embedding_model = True, - tokenizer = '', - tensor_parallel_size = 56, - pipeline_parallel_size = 56, - gpu_mem_util = 1.337, - block_size = 56, - swap_space = 56, - quantization = '', - dtype = 'auto', - cache_dtype = 'auto', - max_num_seqs = 56, - eager_execution = True, - use_flashinfer = True, - offloading_num = 1.337, - spec_draft_model = '', - spec_tokens = 56, - spec_prompt_lookup_max = 56, - spec_prompt_lookup_min = 56, - use_prefix_caching = True, - use_chunked_prefill = True, - chunked_prefill_size = 56, - max_seq_len_to_capture = 56, - distributed_executor_backend = 'ray', - spec_max_batch_size = 56, - spec_max_seq_len = 56, - num_scheduler_steps = 56, ), + recipe = { }, hardware_instance_id = 56, output_tp = [ [ diff --git a/test/test_list_get_cluster_response.py b/test/test_list_get_cluster_response.py index dff2eca..cd1f3a7 100644 --- a/test/test_list_get_cluster_response.py +++ b/test/test_list_get_cluster_response.py @@ -38,7 +38,8 @@ def make_instance(self, include_optional) -> ListGetClusterResponse: results = [ platform_api_python_client.models.get_cluster_response.GetClusterResponse( id = 56, - display_name = '', ) + display_name = '', + region = '', ) ] ) else: @@ -46,7 +47,8 @@ def make_instance(self, include_optional) -> ListGetClusterResponse: results = [ platform_api_python_client.models.get_cluster_response.GetClusterResponse( id = 56, - display_name = '', ) + display_name = '', + region = '', ) ], ) """ diff --git a/test/test_list_hardware_instance_response.py b/test/test_list_hardware_instance_response.py index 93b37dd..b6d4676 100644 --- a/test/test_list_hardware_instance_response.py +++ b/test/test_list_hardware_instance_response.py @@ -43,7 +43,11 @@ def make_instance(self, include_optional) -> ListHardwareInstanceResponse: num_gpu = 56, cpu = 56, memory = 56, - cost_per_hr = 56, ) + cost_per_hr = 56, + cluster_id = 56, + provider = '', + num_accelerators = 56, + accelerator_memory = 56, ) ] ) else: @@ -56,7 +60,11 @@ def make_instance(self, include_optional) -> ListHardwareInstanceResponse: num_gpu = 56, cpu = 56, memory = 56, - cost_per_hr = 56, ) + cost_per_hr = 56, + cluster_id = 56, + provider = '', + num_accelerators = 56, + accelerator_memory = 56, ) ], ) """ diff --git a/test/test_list_payments_response.py b/test/test_list_payments_response.py new file mode 100644 index 0000000..4314907 --- /dev/null +++ b/test/test_list_payments_response.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.list_payments_response import ListPaymentsResponse + +class TestListPaymentsResponse(unittest.TestCase): + """ListPaymentsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListPaymentsResponse: + """Test ListPaymentsResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ListPaymentsResponse` + """ + model = ListPaymentsResponse() + if include_optional: + return ListPaymentsResponse( + payments = [ + platform_api_python_client.models.get_payment_response.GetPaymentResponse( + id = '', + created = 56, + amount_total = 56, + credit_total = 56, ) + ] + ) + else: + return ListPaymentsResponse( + payments = [ + platform_api_python_client.models.get_payment_response.GetPaymentResponse( + id = '', + created = 56, + amount_total = 56, + credit_total = 56, ) + ], + ) + """ + + def testListPaymentsResponse(self): + """Test ListPaymentsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_prebuilt_image_response.py b/test/test_prebuilt_image_response.py index 3e0d969..bb82ae4 100644 --- a/test/test_prebuilt_image_response.py +++ b/test/test_prebuilt_image_response.py @@ -53,7 +53,6 @@ def make_instance(self, include_optional) -> PrebuiltImageResponse: ], type = 'inference', port = 56, - healthcheck = '', ) """ diff --git a/test/test_create_checkout_response.py b/test/test_update_autopay_request.py similarity index 57% rename from test/test_create_checkout_response.py rename to test/test_update_autopay_request.py index cfe77b8..60c936c 100644 --- a/test/test_create_checkout_response.py +++ b/test/test_update_autopay_request.py @@ -14,10 +14,10 @@ import unittest -from platform_api_python_client.models.create_checkout_response import CreateCheckoutResponse +from platform_api_python_client.models.update_autopay_request import UpdateAutopayRequest -class TestCreateCheckoutResponse(unittest.TestCase): - """CreateCheckoutResponse unit test stubs""" +class TestUpdateAutopayRequest(unittest.TestCase): + """UpdateAutopayRequest unit test stubs""" def setUp(self): pass @@ -25,26 +25,25 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> CreateCheckoutResponse: - """Test CreateCheckoutResponse + def make_instance(self, include_optional) -> UpdateAutopayRequest: + """Test UpdateAutopayRequest include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `CreateCheckoutResponse` + # uncomment below to create an instance of `UpdateAutopayRequest` """ - model = CreateCheckoutResponse() + model = UpdateAutopayRequest() if include_optional: - return CreateCheckoutResponse( - url = '' + return UpdateAutopayRequest( + threshold = 56 ) else: - return CreateCheckoutResponse( - url = '', + return UpdateAutopayRequest( ) """ - def testCreateCheckoutResponse(self): - """Test CreateCheckoutResponse""" + def testUpdateAutopayRequest(self): + """Test UpdateAutopayRequest""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_user_vault_item.py b/test/test_user_vault_item.py new file mode 100644 index 0000000..4d4b5ca --- /dev/null +++ b/test/test_user_vault_item.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.user_vault_item import UserVaultItem + +class TestUserVaultItem(unittest.TestCase): + """UserVaultItem unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserVaultItem: + """Test UserVaultItem + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserVaultItem` + """ + model = UserVaultItem() + if include_optional: + return UserVaultItem( + type = 'env_vars', + key = '', + value = '' + ) + else: + return UserVaultItem( + type = 'env_vars', + key = '', + ) + """ + + def testUserVaultItem(self): + """Test UserVaultItem""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main()