diff --git a/README.md b/README.md index 644f9d3..f0aa360 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: 4.8.4 +- Package version: 4.9.0 - Generator version: 7.9.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen @@ -101,7 +101,6 @@ Class | Method | HTTP request | Description *EXTERNALApi* | [**create_inference_deployment_deployments_inference_post**](docs/EXTERNALApi.md#create_inference_deployment_deployments_inference_post) | **POST** /deployments/inference | Create Inference Deployment *EXTERNALApi* | [**create_inference_v3_deployment_deployments_inference_v3_post**](docs/EXTERNALApi.md#create_inference_v3_deployment_deployments_inference_v3_post) | **POST** /deployments/inference_v3 | Create Inference V3 Deployment *EXTERNALApi* | [**create_new_organization_organizations_post**](docs/EXTERNALApi.md#create_new_organization_organizations_post) | **POST** /organizations | Create New Organization -*EXTERNALApi* | [**create_rag_deployment_deployments_rag_post**](docs/EXTERNALApi.md#create_rag_deployment_deployments_rag_post) | **POST** /deployments/rag | Create Rag Deployment *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 @@ -124,7 +123,6 @@ Class | Method | HTTP request | Description *EXTERNALApi* | [**get_inference_deployment_deployments_inference_deployment_id_get**](docs/EXTERNALApi.md#get_inference_deployment_deployments_inference_deployment_id_get) | **GET** /deployments/inference/{deployment_id} | Get Inference Deployment *EXTERNALApi* | [**get_inference_v3_deployment_deployments_inference_v3_deployment_id_get**](docs/EXTERNALApi.md#get_inference_v3_deployment_deployments_inference_v3_deployment_id_get) | **GET** /deployments/inference_v3/{deployment_id} | Get Inference V3 Deployment *EXTERNALApi* | [**get_prebuilt_images_prebuilt_images_get**](docs/EXTERNALApi.md#get_prebuilt_images_prebuilt_images_get) | **GET** /prebuilt-images | Get Prebuilt Images -*EXTERNALApi* | [**get_rag_deployment_deployments_rag_deployment_id_get**](docs/EXTERNALApi.md#get_rag_deployment_deployments_rag_deployment_id_get) | **GET** /deployments/rag/{deployment_id} | Get Rag Deployment *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* | [**invite_user_organizations_invite_post**](docs/EXTERNALApi.md#invite_user_organizations_invite_post) | **POST** /organizations/invite | Invite User @@ -138,7 +136,6 @@ Class | Method | HTTP request | Description *EXTERNALApi* | [**update_deployment_status_v3_deployments_status_v3_deployment_id_put**](docs/EXTERNALApi.md#update_deployment_status_v3_deployments_status_v3_deployment_id_put) | **PUT** /deployments/status_v3/{deployment_id} | Update Deployment Status V3 *EXTERNALApi* | [**update_inference_deployment_deployments_inference_put**](docs/EXTERNALApi.md#update_inference_deployment_deployments_inference_put) | **PUT** /deployments/inference | Update Inference Deployment *EXTERNALApi* | [**update_inference_v3_deployment_deployments_inference_v3_put**](docs/EXTERNALApi.md#update_inference_v3_deployment_deployments_inference_v3_put) | **PUT** /deployments/inference_v3 | Update Inference V3 Deployment -*EXTERNALApi* | [**update_rag_deployment_deployments_rag_put**](docs/EXTERNALApi.md#update_rag_deployment_deployments_rag_put) | **PUT** /deployments/rag | Update Rag Deployment *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 @@ -163,8 +160,6 @@ Class | Method | HTTP request | Description - [CreateInferenceV3DeploymentRequest](docs/CreateInferenceV3DeploymentRequest.md) - [CreateOrganizationRequest](docs/CreateOrganizationRequest.md) - [CreateOrganizationResponse](docs/CreateOrganizationResponse.md) - - [CreateRagDeploymentRequest](docs/CreateRagDeploymentRequest.md) - - [CreateRagDeploymentResponse](docs/CreateRagDeploymentResponse.md) - [CreateUrlRequest](docs/CreateUrlRequest.md) - [CreateUrlResponse](docs/CreateUrlResponse.md) - [CreditsResponse](docs/CreditsResponse.md) @@ -187,7 +182,6 @@ Class | Method | HTTP request | Description - [GetDeploymentUsageResponse](docs/GetDeploymentUsageResponse.md) - [GetInferenceDeploymentResponse](docs/GetInferenceDeploymentResponse.md) - [GetInferenceV3DeploymentResponse](docs/GetInferenceV3DeploymentResponse.md) - - [GetRagDeploymentResponse](docs/GetRagDeploymentResponse.md) - [GpuTypeCapacity](docs/GpuTypeCapacity.md) - [HTTPValidationError](docs/HTTPValidationError.md) - [HardwareInstanceResponse](docs/HardwareInstanceResponse.md) diff --git a/docs/CreateCServeV3DeploymentRequest.md b/docs/CreateCServeV3DeploymentRequest.md index 3872e3a..480f34f 100644 --- a/docs/CreateCServeV3DeploymentRequest.md +++ b/docs/CreateCServeV3DeploymentRequest.md @@ -22,6 +22,7 @@ Name | Type | Description | Notes **concurrency** | **int** | | [optional] **env_vars** | **Dict[str, str]** | | [optional] **enable_logging** | **bool** | | [optional] [default to True] +**enable_node_model_cache** | **bool** | | [optional] [default to False] ## Example diff --git a/docs/CreateRagDeploymentRequest.md b/docs/CreateRagDeploymentRequest.md deleted file mode 100644 index 3dde8a8..0000000 --- a/docs/CreateRagDeploymentRequest.md +++ /dev/null @@ -1,44 +0,0 @@ -# CreateRagDeploymentRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | -**cluster_id** | **int** | | -**hardware_instance_id** | **int** | | -**user_annotations** | **Dict[str, str]** | | [optional] -**recipe** | [**CServeV2Recipe**](CServeV2Recipe.md) | | -**cserve_version** | **str** | | [optional] -**hf_token** | **str** | | [optional] -**llm_model** | **str** | | -**centml_api_key** | **str** | | -**min_scale** | **int** | | [optional] [default to 1] -**max_scale** | **int** | | [optional] [default to 1] -**initial_scale** | **int** | | [optional] -**endpoint_bearer_token** | **str** | | [optional] -**endpoint_certificate_authority** | **str** | | [optional] -**concurrency** | **int** | | [optional] -**env_vars** | **Dict[str, str]** | | [optional] - -## Example - -```python -from platform_api_python_client.models.create_rag_deployment_request import CreateRagDeploymentRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateRagDeploymentRequest from a JSON string -create_rag_deployment_request_instance = CreateRagDeploymentRequest.from_json(json) -# print the JSON string representation of the object -print(CreateRagDeploymentRequest.to_json()) - -# convert the object into a dict -create_rag_deployment_request_dict = create_rag_deployment_request_instance.to_dict() -# create an instance of CreateRagDeploymentRequest from a dict -create_rag_deployment_request_from_dict = CreateRagDeploymentRequest.from_dict(create_rag_deployment_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/CreateRagDeploymentResponse.md b/docs/CreateRagDeploymentResponse.md deleted file mode 100644 index 33e88fd..0000000 --- a/docs/CreateRagDeploymentResponse.md +++ /dev/null @@ -1,31 +0,0 @@ -# CreateRagDeploymentResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | -**created_at** | **datetime** | | -**endpoint_url** | **str** | | - -## Example - -```python -from platform_api_python_client.models.create_rag_deployment_response import CreateRagDeploymentResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateRagDeploymentResponse from a JSON string -create_rag_deployment_response_instance = CreateRagDeploymentResponse.from_json(json) -# print the JSON string representation of the object -print(CreateRagDeploymentResponse.to_json()) - -# convert the object into a dict -create_rag_deployment_response_dict = create_rag_deployment_response_instance.to_dict() -# create an instance of CreateRagDeploymentResponse from a dict -create_rag_deployment_response_from_dict = CreateRagDeploymentResponse.from_dict(create_rag_deployment_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/DeploymentResponse.md b/docs/DeploymentResponse.md index 73b0122..dc67525 100644 --- a/docs/DeploymentResponse.md +++ b/docs/DeploymentResponse.md @@ -27,6 +27,7 @@ Name | Type | Description | Notes **concurrency** | **int** | | [optional] **env_vars** | **Dict[str, str]** | | [optional] **enable_logging** | **bool** | | [optional] [default to True] +**enable_node_model_cache** | **bool** | | [optional] [default to False] **container_port** | **int** | | **healthcheck** | **str** | | [optional] **command** | **List[str]** | | [optional] diff --git a/docs/EXTERNALApi.md b/docs/EXTERNALApi.md index 4b8aa4d..d2bba61 100644 --- a/docs/EXTERNALApi.md +++ b/docs/EXTERNALApi.md @@ -11,7 +11,6 @@ Method | HTTP request | Description [**create_inference_deployment_deployments_inference_post**](EXTERNALApi.md#create_inference_deployment_deployments_inference_post) | **POST** /deployments/inference | Create Inference Deployment [**create_inference_v3_deployment_deployments_inference_v3_post**](EXTERNALApi.md#create_inference_v3_deployment_deployments_inference_v3_post) | **POST** /deployments/inference_v3 | Create Inference V3 Deployment [**create_new_organization_organizations_post**](EXTERNALApi.md#create_new_organization_organizations_post) | **POST** /organizations | Create New Organization -[**create_rag_deployment_deployments_rag_post**](EXTERNALApi.md#create_rag_deployment_deployments_rag_post) | **POST** /deployments/rag | Create Rag Deployment [**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 @@ -34,7 +33,6 @@ Method | HTTP request | Description [**get_inference_deployment_deployments_inference_deployment_id_get**](EXTERNALApi.md#get_inference_deployment_deployments_inference_deployment_id_get) | **GET** /deployments/inference/{deployment_id} | Get Inference Deployment [**get_inference_v3_deployment_deployments_inference_v3_deployment_id_get**](EXTERNALApi.md#get_inference_v3_deployment_deployments_inference_v3_deployment_id_get) | **GET** /deployments/inference_v3/{deployment_id} | Get Inference V3 Deployment [**get_prebuilt_images_prebuilt_images_get**](EXTERNALApi.md#get_prebuilt_images_prebuilt_images_get) | **GET** /prebuilt-images | Get Prebuilt Images -[**get_rag_deployment_deployments_rag_deployment_id_get**](EXTERNALApi.md#get_rag_deployment_deployments_rag_deployment_id_get) | **GET** /deployments/rag/{deployment_id} | Get Rag Deployment [**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 [**invite_user_organizations_invite_post**](EXTERNALApi.md#invite_user_organizations_invite_post) | **POST** /organizations/invite | Invite User @@ -48,7 +46,6 @@ Method | HTTP request | Description [**update_deployment_status_v3_deployments_status_v3_deployment_id_put**](EXTERNALApi.md#update_deployment_status_v3_deployments_status_v3_deployment_id_put) | **PUT** /deployments/status_v3/{deployment_id} | Update Deployment Status V3 [**update_inference_deployment_deployments_inference_put**](EXTERNALApi.md#update_inference_deployment_deployments_inference_put) | **PUT** /deployments/inference | Update Inference Deployment [**update_inference_v3_deployment_deployments_inference_v3_put**](EXTERNALApi.md#update_inference_v3_deployment_deployments_inference_v3_put) | **PUT** /deployments/inference_v3 | Update Inference V3 Deployment -[**update_rag_deployment_deployments_rag_put**](EXTERNALApi.md#update_rag_deployment_deployments_rag_put) | **PUT** /deployments/rag | Update Rag Deployment [**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 @@ -599,84 +596,6 @@ 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) -# **create_rag_deployment_deployments_rag_post** -> CreateRagDeploymentResponse create_rag_deployment_deployments_rag_post(create_rag_deployment_request) - -Create Rag Deployment - -### Example - -* Bearer Authentication (HTTPBearer): - -```python -import platform_api_python_client -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.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_rag_deployment_request = platform_api_python_client.CreateRagDeploymentRequest() # CreateRagDeploymentRequest | - - try: - # Create Rag Deployment - api_response = api_instance.create_rag_deployment_deployments_rag_post(create_rag_deployment_request) - print("The response of EXTERNALApi->create_rag_deployment_deployments_rag_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling EXTERNALApi->create_rag_deployment_deployments_rag_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **create_rag_deployment_request** | [**CreateRagDeploymentRequest**](CreateRagDeploymentRequest.md)| | - -### Return type - -[**CreateRagDeploymentResponse**](CreateRagDeploymentResponse.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) - # **delete_api_key_credentials_api_key_id_delete** > object delete_api_key_credentials_api_key_id_delete(id) @@ -2401,83 +2320,6 @@ 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_rag_deployment_deployments_rag_deployment_id_get** -> GetRagDeploymentResponse get_rag_deployment_deployments_rag_deployment_id_get(deployment_id) - -Get Rag Deployment - -### Example - -* Bearer Authentication (HTTPBearer): - -```python -import platform_api_python_client -from platform_api_python_client.models.get_rag_deployment_response import GetRagDeploymentResponse -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) - deployment_id = 56 # int | - - try: - # Get Rag Deployment - api_response = api_instance.get_rag_deployment_deployments_rag_deployment_id_get(deployment_id) - print("The response of EXTERNALApi->get_rag_deployment_deployments_rag_deployment_id_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling EXTERNALApi->get_rag_deployment_deployments_rag_deployment_id_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **deployment_id** | **int**| | - -### Return type - -[**GetRagDeploymentResponse**](GetRagDeploymentResponse.md) - -### Authorization - -[HTTPBearer](../README.md#HTTPBearer) - -### HTTP request headers - - - **Content-Type**: Not defined - - **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_usage_daily_bills_get** > ListDailyBillResponse get_usage_daily_bills_get(start_date, end_date) @@ -3514,86 +3356,6 @@ 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_rag_deployment_deployments_rag_put** -> UpdateDeploymentResponse update_rag_deployment_deployments_rag_put(deployment_id, create_rag_deployment_request) - -Update Rag Deployment - -### Example - -* Bearer Authentication (HTTPBearer): - -```python -import platform_api_python_client -from platform_api_python_client.models.create_rag_deployment_request import CreateRagDeploymentRequest -from platform_api_python_client.models.update_deployment_response import UpdateDeploymentResponse -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) - deployment_id = 56 # int | - create_rag_deployment_request = platform_api_python_client.CreateRagDeploymentRequest() # CreateRagDeploymentRequest | - - try: - # Update Rag Deployment - api_response = api_instance.update_rag_deployment_deployments_rag_put(deployment_id, create_rag_deployment_request) - print("The response of EXTERNALApi->update_rag_deployment_deployments_rag_put:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling EXTERNALApi->update_rag_deployment_deployments_rag_put: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **deployment_id** | **int**| | - **create_rag_deployment_request** | [**CreateRagDeploymentRequest**](CreateRagDeploymentRequest.md)| | - -### Return type - -[**UpdateDeploymentResponse**](UpdateDeploymentResponse.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) - # **update_user_vault_item_endpoint_user_vault_put** > object update_user_vault_item_endpoint_user_vault_put(user_vault_item) diff --git a/docs/GetCServeV3DeploymentResponse.md b/docs/GetCServeV3DeploymentResponse.md index d12ed27..a1bc138 100644 --- a/docs/GetCServeV3DeploymentResponse.md +++ b/docs/GetCServeV3DeploymentResponse.md @@ -27,6 +27,7 @@ Name | Type | Description | Notes **concurrency** | **int** | | [optional] **env_vars** | **Dict[str, str]** | | [optional] **enable_logging** | **bool** | | [optional] [default to True] +**enable_node_model_cache** | **bool** | | [optional] [default to False] ## Example diff --git a/docs/GetRagDeploymentResponse.md b/docs/GetRagDeploymentResponse.md deleted file mode 100644 index 0b84a69..0000000 --- a/docs/GetRagDeploymentResponse.md +++ /dev/null @@ -1,51 +0,0 @@ -# GetRagDeploymentResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**creator_email** | **str** | | -**cluster_id** | **int** | | -**id** | **int** | | -**name** | **str** | | -**endpoint_url** | **str** | | -**image_url** | **str** | | [optional] -**type** | [**DeploymentType**](DeploymentType.md) | | -**status** | [**DeploymentStatus**](DeploymentStatus.md) | | -**created_at** | **datetime** | | -**hardware_instance_id** | **int** | | -**revision_number** | **int** | | -**user_annotations** | **Dict[str, str]** | | [optional] -**recipe** | [**CServeV2Recipe**](CServeV2Recipe.md) | | -**cserve_version** | **str** | | [optional] -**llm_model** | **str** | | -**centml_api_key** | **str** | | -**min_scale** | **int** | | [optional] [default to 1] -**max_scale** | **int** | | [optional] [default to 1] -**initial_scale** | **int** | | [optional] -**endpoint_certificate_authority** | **str** | | [optional] -**endpoint_bearer_token** | **str** | | [optional] -**concurrency** | **int** | | [optional] -**env_vars** | **Dict[str, str]** | | [optional] - -## Example - -```python -from platform_api_python_client.models.get_rag_deployment_response import GetRagDeploymentResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of GetRagDeploymentResponse from a JSON string -get_rag_deployment_response_instance = GetRagDeploymentResponse.from_json(json) -# print the JSON string representation of the object -print(GetRagDeploymentResponse.to_json()) - -# convert the object into a dict -get_rag_deployment_response_dict = get_rag_deployment_response_instance.to_dict() -# create an instance of GetRagDeploymentResponse from a dict -get_rag_deployment_response_from_dict = GetRagDeploymentResponse.from_dict(get_rag_deployment_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/platform_api_python_client/__init__.py b/platform_api_python_client/__init__.py index dc41205..94d36e6 100644 --- a/platform_api_python_client/__init__.py +++ b/platform_api_python_client/__init__.py @@ -14,7 +14,7 @@ """ # noqa: E501 -__version__ = "4.8.4" +__version__ = "4.9.0" # import apis into sdk package from platform_api_python_client.api.external_api import EXTERNALApi @@ -49,8 +49,6 @@ from platform_api_python_client.models.create_inference_v3_deployment_request import CreateInferenceV3DeploymentRequest from platform_api_python_client.models.create_organization_request import CreateOrganizationRequest from platform_api_python_client.models.create_organization_response import CreateOrganizationResponse -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_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 @@ -73,7 +71,6 @@ 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_inference_v3_deployment_response import GetInferenceV3DeploymentResponse -from platform_api_python_client.models.get_rag_deployment_response import GetRagDeploymentResponse from platform_api_python_client.models.gpu_type_capacity import GpuTypeCapacity from platform_api_python_client.models.http_validation_error import HTTPValidationError from platform_api_python_client.models.hardware_instance_response import HardwareInstanceResponse diff --git a/platform_api_python_client/api/external_api.py b/platform_api_python_client/api/external_api.py index 57f8110..8f25fbe 100644 --- a/platform_api_python_client/api/external_api.py +++ b/platform_api_python_client/api/external_api.py @@ -32,8 +32,6 @@ from platform_api_python_client.models.create_inference_v3_deployment_request import CreateInferenceV3DeploymentRequest from platform_api_python_client.models.create_organization_request import CreateOrganizationRequest from platform_api_python_client.models.create_organization_response import CreateOrganizationResponse -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_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 @@ -49,7 +47,6 @@ 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_inference_v3_deployment_response import GetInferenceV3DeploymentResponse -from platform_api_python_client.models.get_rag_deployment_response import GetRagDeploymentResponse from platform_api_python_client.models.invite_user_request import InviteUserRequest 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 @@ -2004,280 +2001,6 @@ def _create_new_organization_organizations_post_serialize( - @validate_call - def create_rag_deployment_deployments_rag_post( - self, - create_rag_deployment_request: CreateRagDeploymentRequest, - _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, - ) -> CreateRagDeploymentResponse: - """Create Rag Deployment - - - :param create_rag_deployment_request: (required) - :type create_rag_deployment_request: CreateRagDeploymentRequest - :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._create_rag_deployment_deployments_rag_post_serialize( - create_rag_deployment_request=create_rag_deployment_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateRagDeploymentResponse", - '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 create_rag_deployment_deployments_rag_post_with_http_info( - self, - create_rag_deployment_request: CreateRagDeploymentRequest, - _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[CreateRagDeploymentResponse]: - """Create Rag Deployment - - - :param create_rag_deployment_request: (required) - :type create_rag_deployment_request: CreateRagDeploymentRequest - :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._create_rag_deployment_deployments_rag_post_serialize( - create_rag_deployment_request=create_rag_deployment_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateRagDeploymentResponse", - '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 create_rag_deployment_deployments_rag_post_without_preload_content( - self, - create_rag_deployment_request: CreateRagDeploymentRequest, - _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: - """Create Rag Deployment - - - :param create_rag_deployment_request: (required) - :type create_rag_deployment_request: CreateRagDeploymentRequest - :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._create_rag_deployment_deployments_rag_post_serialize( - create_rag_deployment_request=create_rag_deployment_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateRagDeploymentResponse", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _create_rag_deployment_deployments_rag_post_serialize( - self, - create_rag_deployment_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_rag_deployment_request is not None: - _body_params = create_rag_deployment_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='/deployments/rag', - 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 delete_api_key_credentials_api_key_id_delete( self, @@ -8300,9 +8023,10 @@ def _get_prebuilt_images_prebuilt_images_get_serialize( @validate_call - def get_rag_deployment_deployments_rag_deployment_id_get( + def get_usage_daily_bills_get( self, - deployment_id: StrictInt, + start_date: date, + end_date: date, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -8315,276 +8039,14 @@ def get_rag_deployment_deployments_rag_deployment_id_get( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetRagDeploymentResponse: - """Get Rag Deployment + ) -> ListDailyBillResponse: + """Get Usage - :param deployment_id: (required) - :type deployment_id: 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 - (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._get_rag_deployment_deployments_rag_deployment_id_get_serialize( - deployment_id=deployment_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetRagDeploymentResponse", - '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 get_rag_deployment_deployments_rag_deployment_id_get_with_http_info( - self, - deployment_id: StrictInt, - _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[GetRagDeploymentResponse]: - """Get Rag Deployment - - - :param deployment_id: (required) - :type deployment_id: 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 - (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._get_rag_deployment_deployments_rag_deployment_id_get_serialize( - deployment_id=deployment_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetRagDeploymentResponse", - '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 get_rag_deployment_deployments_rag_deployment_id_get_without_preload_content( - self, - deployment_id: StrictInt, - _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: - """Get Rag Deployment - - - :param deployment_id: (required) - :type deployment_id: 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 - (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._get_rag_deployment_deployments_rag_deployment_id_get_serialize( - deployment_id=deployment_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetRagDeploymentResponse", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_rag_deployment_deployments_rag_deployment_id_get_serialize( - self, - deployment_id, - _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 - 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 - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'HTTPBearer' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/deployments/rag/{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 get_usage_daily_bills_get( - self, - start_date: date, - end_date: date, - _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, - ) -> ListDailyBillResponse: - """Get Usage - - - :param start_date: (required) - :type start_date: date - :param end_date: (required) - :type end_date: date + :param start_date: (required) + :type start_date: date + :param end_date: (required) + :type end_date: date :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 @@ -12310,297 +11772,6 @@ def _update_inference_v3_deployment_deployments_inference_v3_put_serialize( - @validate_call - def update_rag_deployment_deployments_rag_put( - self, - deployment_id: StrictInt, - create_rag_deployment_request: CreateRagDeploymentRequest, - _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, - ) -> UpdateDeploymentResponse: - """Update Rag Deployment - - - :param deployment_id: (required) - :type deployment_id: int - :param create_rag_deployment_request: (required) - :type create_rag_deployment_request: CreateRagDeploymentRequest - :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_rag_deployment_deployments_rag_put_serialize( - deployment_id=deployment_id, - create_rag_deployment_request=create_rag_deployment_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UpdateDeploymentResponse", - '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_rag_deployment_deployments_rag_put_with_http_info( - self, - deployment_id: StrictInt, - create_rag_deployment_request: CreateRagDeploymentRequest, - _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[UpdateDeploymentResponse]: - """Update Rag Deployment - - - :param deployment_id: (required) - :type deployment_id: int - :param create_rag_deployment_request: (required) - :type create_rag_deployment_request: CreateRagDeploymentRequest - :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_rag_deployment_deployments_rag_put_serialize( - deployment_id=deployment_id, - create_rag_deployment_request=create_rag_deployment_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UpdateDeploymentResponse", - '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_rag_deployment_deployments_rag_put_without_preload_content( - self, - deployment_id: StrictInt, - create_rag_deployment_request: CreateRagDeploymentRequest, - _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 Rag Deployment - - - :param deployment_id: (required) - :type deployment_id: int - :param create_rag_deployment_request: (required) - :type create_rag_deployment_request: CreateRagDeploymentRequest - :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_rag_deployment_deployments_rag_put_serialize( - deployment_id=deployment_id, - create_rag_deployment_request=create_rag_deployment_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UpdateDeploymentResponse", - '422': "HTTPValidationError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _update_rag_deployment_deployments_rag_put_serialize( - self, - deployment_id, - create_rag_deployment_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 - if deployment_id is not None: - - _query_params.append(('deployment_id', deployment_id)) - - # process the header parameters - # process the form parameters - # process the body parameter - if create_rag_deployment_request is not None: - _body_params = create_rag_deployment_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='PUT', - resource_path='/deployments/rag', - 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, diff --git a/platform_api_python_client/api_client.py b/platform_api_python_client/api_client.py index db024e3..3d05692 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/4.8.4/python' + self.user_agent = 'OpenAPI-Generator/4.9.0/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 9a50fbb..57ebfbd 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: 4.8.4".\ + "SDK Package Version: 4.9.0".\ 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 3afce00..86b9050 100644 --- a/platform_api_python_client/models/__init__.py +++ b/platform_api_python_client/models/__init__.py @@ -32,8 +32,6 @@ from platform_api_python_client.models.create_inference_v3_deployment_request import CreateInferenceV3DeploymentRequest from platform_api_python_client.models.create_organization_request import CreateOrganizationRequest from platform_api_python_client.models.create_organization_response import CreateOrganizationResponse -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_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 @@ -56,7 +54,6 @@ 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_inference_v3_deployment_response import GetInferenceV3DeploymentResponse -from platform_api_python_client.models.get_rag_deployment_response import GetRagDeploymentResponse from platform_api_python_client.models.gpu_type_capacity import GpuTypeCapacity from platform_api_python_client.models.http_validation_error import HTTPValidationError from platform_api_python_client.models.hardware_instance_response import HardwareInstanceResponse diff --git a/platform_api_python_client/models/create_c_serve_v3_deployment_request.py b/platform_api_python_client/models/create_c_serve_v3_deployment_request.py index 4abffbd..bb413b1 100644 --- a/platform_api_python_client/models/create_c_serve_v3_deployment_request.py +++ b/platform_api_python_client/models/create_c_serve_v3_deployment_request.py @@ -45,7 +45,8 @@ class CreateCServeV3DeploymentRequest(BaseModel): concurrency: Optional[StrictInt] = None env_vars: Optional[Dict[str, StrictStr]] = None enable_logging: Optional[StrictBool] = True - __properties: ClassVar[List[str]] = ["max_surge", "max_unavailable", "name", "cluster_id", "hardware_instance_id", "user_annotations", "recipe", "cserve_version", "hf_token", "endpoint_bearer_token", "endpoint_certificate_authority", "min_replicas", "max_replicas", "initial_replicas", "concurrency", "env_vars", "enable_logging"] + enable_node_model_cache: Optional[StrictBool] = False + __properties: ClassVar[List[str]] = ["max_surge", "max_unavailable", "name", "cluster_id", "hardware_instance_id", "user_annotations", "recipe", "cserve_version", "hf_token", "endpoint_bearer_token", "endpoint_certificate_authority", "min_replicas", "max_replicas", "initial_replicas", "concurrency", "env_vars", "enable_logging", "enable_node_model_cache"] @field_validator('name') def name_validate_regular_expression(cls, value): @@ -169,7 +170,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "initial_replicas": obj.get("initial_replicas"), "concurrency": obj.get("concurrency"), "env_vars": obj.get("env_vars"), - "enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else True + "enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else True, + "enable_node_model_cache": obj.get("enable_node_model_cache") if obj.get("enable_node_model_cache") is not None else False }) 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 deleted file mode 100644 index 1511ce5..0000000 --- a/platform_api_python_client/models/create_rag_deployment_request.py +++ /dev/null @@ -1,164 +0,0 @@ -# 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, 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 import CServeV2Recipe -from typing import Optional, Set -from typing_extensions import Self - -class CreateRagDeploymentRequest(BaseModel): - """ - CreateRagDeploymentRequest - """ # noqa: E501 - name: Annotated[str, Field(min_length=1, strict=True, max_length=20)] - cluster_id: StrictInt - hardware_instance_id: StrictInt - user_annotations: Optional[Dict[str, StrictStr]] = None - recipe: CServeV2Recipe - cserve_version: Optional[StrictStr] = None - hf_token: Optional[StrictStr] = None - llm_model: StrictStr - centml_api_key: StrictStr - min_scale: Optional[StrictInt] = 1 - max_scale: Optional[StrictInt] = 1 - initial_scale: Optional[StrictInt] = None - endpoint_bearer_token: Optional[StrictStr] = None - endpoint_certificate_authority: Optional[StrictStr] = None - concurrency: Optional[StrictInt] = None - env_vars: Optional[Dict[str, StrictStr]] = None - __properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "user_annotations", "recipe", "cserve_version", "hf_token", "llm_model", "centml_api_key", "min_scale", "max_scale", "initial_scale", "endpoint_bearer_token", "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, - 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 CreateRagDeploymentRequest 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 recipe - if self.recipe: - _dict['recipe'] = self.recipe.to_dict() - # set to None if user_annotations (nullable) is None - # and model_fields_set contains the field - if self.user_annotations is None and "user_annotations" in self.model_fields_set: - _dict['user_annotations'] = None - - # set to None if cserve_version (nullable) is None - # and model_fields_set contains the field - if self.cserve_version is None and "cserve_version" in self.model_fields_set: - _dict['cserve_version'] = None - - # set to None if hf_token (nullable) is None - # and model_fields_set contains the field - if self.hf_token is None and "hf_token" in self.model_fields_set: - _dict['hf_token'] = None - - # set to None if initial_scale (nullable) is None - # and model_fields_set contains the field - if self.initial_scale is None and "initial_scale" in self.model_fields_set: - _dict['initial_scale'] = None - - # set to None if endpoint_bearer_token (nullable) is None - # and model_fields_set contains the field - if self.endpoint_bearer_token is None and "endpoint_bearer_token" in self.model_fields_set: - _dict['endpoint_bearer_token'] = 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: - _dict['endpoint_certificate_authority'] = None - - # set to None if concurrency (nullable) is None - # and model_fields_set contains the field - if self.concurrency is None and "concurrency" in self.model_fields_set: - _dict['concurrency'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CreateRagDeploymentRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "name": obj.get("name"), - "cluster_id": obj.get("cluster_id"), - "hardware_instance_id": obj.get("hardware_instance_id"), - "user_annotations": obj.get("user_annotations"), - "recipe": CServeV2Recipe.from_dict(obj["recipe"]) if obj.get("recipe") is not None else None, - "cserve_version": obj.get("cserve_version"), - "hf_token": obj.get("hf_token"), - "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, - "max_scale": obj.get("max_scale") if obj.get("max_scale") is not None else 1, - "initial_scale": obj.get("initial_scale"), - "endpoint_bearer_token": obj.get("endpoint_bearer_token"), - "endpoint_certificate_authority": obj.get("endpoint_certificate_authority"), - "concurrency": obj.get("concurrency"), - "env_vars": obj.get("env_vars") - }) - return _obj - - diff --git a/platform_api_python_client/models/create_rag_deployment_response.py b/platform_api_python_client/models/create_rag_deployment_response.py deleted file mode 100644 index 6272944..0000000 --- a/platform_api_python_client/models/create_rag_deployment_response.py +++ /dev/null @@ -1,92 +0,0 @@ -# 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 datetime import datetime -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 CreateRagDeploymentResponse(BaseModel): - """ - CreateRagDeploymentResponse - """ # noqa: E501 - id: StrictInt - created_at: datetime - endpoint_url: StrictStr - __properties: ClassVar[List[str]] = ["id", "created_at", "endpoint_url"] - - 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 CreateRagDeploymentResponse 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, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CreateRagDeploymentResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "created_at": obj.get("created_at"), - "endpoint_url": obj.get("endpoint_url") - }) - return _obj - - diff --git a/platform_api_python_client/models/get_c_serve_v3_deployment_response.py b/platform_api_python_client/models/get_c_serve_v3_deployment_response.py index 277cbf9..49752f9 100644 --- a/platform_api_python_client/models/get_c_serve_v3_deployment_response.py +++ b/platform_api_python_client/models/get_c_serve_v3_deployment_response.py @@ -52,7 +52,8 @@ class GetCServeV3DeploymentResponse(BaseModel): concurrency: Optional[StrictInt] = None env_vars: Optional[Dict[str, StrictStr]] = None enable_logging: Optional[StrictBool] = True - __properties: ClassVar[List[str]] = ["creator_email", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "revision_number", "user_annotations", "recipe", "cserve_version", "min_replicas", "max_replicas", "initial_replicas", "endpoint_certificate_authority", "endpoint_bearer_token", "concurrency", "env_vars", "enable_logging"] + enable_node_model_cache: Optional[StrictBool] = False + __properties: ClassVar[List[str]] = ["creator_email", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "revision_number", "user_annotations", "recipe", "cserve_version", "min_replicas", "max_replicas", "initial_replicas", "endpoint_certificate_authority", "endpoint_bearer_token", "concurrency", "env_vars", "enable_logging", "enable_node_model_cache"] model_config = ConfigDict( populate_by_name=True, @@ -164,7 +165,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "endpoint_bearer_token": obj.get("endpoint_bearer_token"), "concurrency": obj.get("concurrency"), "env_vars": obj.get("env_vars"), - "enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else True + "enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else True, + "enable_node_model_cache": obj.get("enable_node_model_cache") if obj.get("enable_node_model_cache") is not None else False }) 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 deleted file mode 100644 index 348b81b..0000000 --- a/platform_api_python_client/models/get_rag_deployment_response.py +++ /dev/null @@ -1,173 +0,0 @@ -# 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 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 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 -from typing_extensions import Self - -class GetRagDeploymentResponse(BaseModel): - """ - GetRagDeploymentResponse - """ # noqa: E501 - creator_email: StrictStr - cluster_id: StrictInt - id: StrictInt - name: StrictStr - endpoint_url: StrictStr - image_url: Optional[StrictStr] = None - type: DeploymentType - status: DeploymentStatus - created_at: datetime - hardware_instance_id: StrictInt - revision_number: StrictInt - user_annotations: Optional[Dict[str, StrictStr]] = None - recipe: CServeV2Recipe - cserve_version: Optional[StrictStr] = None - llm_model: StrictStr - centml_api_key: StrictStr - min_scale: Optional[StrictInt] = 1 - max_scale: Optional[StrictInt] = 1 - initial_scale: Optional[StrictInt] = None - endpoint_certificate_authority: Optional[StrictStr] = None - endpoint_bearer_token: Optional[StrictStr] = None - concurrency: Optional[StrictInt] = None - env_vars: Optional[Dict[str, StrictStr]] = None - __properties: ClassVar[List[str]] = ["creator_email", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "revision_number", "user_annotations", "recipe", "cserve_version", "llm_model", "centml_api_key", "min_scale", "max_scale", "initial_scale", "endpoint_certificate_authority", "endpoint_bearer_token", "concurrency", "env_vars"] - - 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 GetRagDeploymentResponse 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 recipe - if self.recipe: - _dict['recipe'] = self.recipe.to_dict() - # set to None if image_url (nullable) is None - # and model_fields_set contains the field - if self.image_url is None and "image_url" in self.model_fields_set: - _dict['image_url'] = None - - # set to None if user_annotations (nullable) is None - # and model_fields_set contains the field - if self.user_annotations is None and "user_annotations" in self.model_fields_set: - _dict['user_annotations'] = None - - # set to None if cserve_version (nullable) is None - # and model_fields_set contains the field - if self.cserve_version is None and "cserve_version" in self.model_fields_set: - _dict['cserve_version'] = None - - # set to None if initial_scale (nullable) is None - # and model_fields_set contains the field - if self.initial_scale is None and "initial_scale" in self.model_fields_set: - _dict['initial_scale'] = 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: - _dict['endpoint_certificate_authority'] = None - - # set to None if endpoint_bearer_token (nullable) is None - # and model_fields_set contains the field - if self.endpoint_bearer_token is None and "endpoint_bearer_token" in self.model_fields_set: - _dict['endpoint_bearer_token'] = None - - # set to None if concurrency (nullable) is None - # and model_fields_set contains the field - if self.concurrency is None and "concurrency" in self.model_fields_set: - _dict['concurrency'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of GetRagDeploymentResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "creator_email": obj.get("creator_email"), - "cluster_id": obj.get("cluster_id"), - "id": obj.get("id"), - "name": obj.get("name"), - "endpoint_url": obj.get("endpoint_url"), - "image_url": obj.get("image_url"), - "type": obj.get("type"), - "status": obj.get("status"), - "created_at": obj.get("created_at"), - "hardware_instance_id": obj.get("hardware_instance_id"), - "revision_number": obj.get("revision_number"), - "user_annotations": obj.get("user_annotations"), - "recipe": CServeV2Recipe.from_dict(obj["recipe"]) if obj.get("recipe") is not None else None, - "cserve_version": obj.get("cserve_version"), - "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, - "max_scale": obj.get("max_scale") if obj.get("max_scale") is not None else 1, - "initial_scale": obj.get("initial_scale"), - "endpoint_certificate_authority": obj.get("endpoint_certificate_authority"), - "endpoint_bearer_token": obj.get("endpoint_bearer_token"), - "concurrency": obj.get("concurrency"), - "env_vars": obj.get("env_vars") - }) - return _obj - - diff --git a/pyproject.toml b/pyproject.toml index bde6a5f..0479f35 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "platform_api_python_client" -version = "4.8.4" +version = "4.9.0" description = "Platform External API" authors = ["OpenAPI Generator Community "] license = "NoLicense" diff --git a/setup.py b/setup.py index e718e32..c55009c 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 = "4.8.4" +VERSION = "4.9.0" PYTHON_REQUIRES = ">= 3.8" REQUIRES = [ "urllib3 >= 1.25.3, < 3.0.0", diff --git a/test/test_create_c_serve_v3_deployment_request.py b/test/test_create_c_serve_v3_deployment_request.py index 941d542..ac6ff73 100644 --- a/test/test_create_c_serve_v3_deployment_request.py +++ b/test/test_create_c_serve_v3_deployment_request.py @@ -55,7 +55,8 @@ def make_instance(self, include_optional) -> CreateCServeV3DeploymentRequest: env_vars = { 'key' : '' }, - enable_logging = True + enable_logging = True, + enable_node_model_cache = True ) else: return CreateCServeV3DeploymentRequest( diff --git a/test/test_create_rag_deployment_request.py b/test/test_create_rag_deployment_request.py deleted file mode 100644 index fbe8b6d..0000000 --- a/test/test_create_rag_deployment_request.py +++ /dev/null @@ -1,76 +0,0 @@ -# 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.create_rag_deployment_request import CreateRagDeploymentRequest - -class TestCreateRagDeploymentRequest(unittest.TestCase): - """CreateRagDeploymentRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CreateRagDeploymentRequest: - """Test CreateRagDeploymentRequest - 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 `CreateRagDeploymentRequest` - """ - model = CreateRagDeploymentRequest() - if include_optional: - return CreateRagDeploymentRequest( - name = 'ar1c2v7s6djuy1zmetozkhdomha1b0', - cluster_id = 56, - hardware_instance_id = 56, - user_annotations = { - 'key' : '' - }, - recipe = { }, - cserve_version = '', - hf_token = '', - llm_model = '', - centml_api_key = '', - min_scale = 56, - max_scale = 56, - initial_scale = 56, - endpoint_bearer_token = '', - endpoint_certificate_authority = '', - concurrency = 56, - env_vars = { - 'key' : '' - } - ) - else: - return CreateRagDeploymentRequest( - name = 'ar1c2v7s6djuy1zmetozkhdomha1b0', - cluster_id = 56, - hardware_instance_id = 56, - recipe = { }, - llm_model = '', - centml_api_key = '', - ) - """ - - def testCreateRagDeploymentRequest(self): - """Test CreateRagDeploymentRequest""" - # 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_create_rag_deployment_response.py b/test/test_create_rag_deployment_response.py deleted file mode 100644 index 1eb92c2..0000000 --- a/test/test_create_rag_deployment_response.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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.create_rag_deployment_response import CreateRagDeploymentResponse - -class TestCreateRagDeploymentResponse(unittest.TestCase): - """CreateRagDeploymentResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CreateRagDeploymentResponse: - """Test CreateRagDeploymentResponse - 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 `CreateRagDeploymentResponse` - """ - model = CreateRagDeploymentResponse() - if include_optional: - return CreateRagDeploymentResponse( - id = 56, - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - endpoint_url = '' - ) - else: - return CreateRagDeploymentResponse( - id = 56, - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - endpoint_url = '', - ) - """ - - def testCreateRagDeploymentResponse(self): - """Test CreateRagDeploymentResponse""" - # 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_deployment_response.py b/test/test_deployment_response.py index d91a5c5..c72a97b 100644 --- a/test/test_deployment_response.py +++ b/test/test_deployment_response.py @@ -61,6 +61,7 @@ def make_instance(self, include_optional) -> DeploymentResponse: 'key' : '' }, enable_logging = True, + enable_node_model_cache = True, container_port = 56, healthcheck = '', command = [ diff --git a/test/test_external_api.py b/test/test_external_api.py index 1e913d8..3b1813a 100644 --- a/test/test_external_api.py +++ b/test/test_external_api.py @@ -75,13 +75,6 @@ def test_create_new_organization_organizations_post(self) -> None: """ pass - def test_create_rag_deployment_deployments_rag_post(self) -> None: - """Test case for create_rag_deployment_deployments_rag_post - - Create Rag Deployment - """ - pass - def test_delete_api_key_credentials_api_key_id_delete(self) -> None: """Test case for delete_api_key_credentials_api_key_id_delete @@ -236,13 +229,6 @@ def test_get_prebuilt_images_prebuilt_images_get(self) -> None: """ pass - def test_get_rag_deployment_deployments_rag_deployment_id_get(self) -> None: - """Test case for get_rag_deployment_deployments_rag_deployment_id_get - - Get Rag Deployment - """ - pass - def test_get_usage_daily_bills_get(self) -> None: """Test case for get_usage_daily_bills_get @@ -334,13 +320,6 @@ def test_update_inference_v3_deployment_deployments_inference_v3_put(self) -> No """ pass - def test_update_rag_deployment_deployments_rag_put(self) -> None: - """Test case for update_rag_deployment_deployments_rag_put - - Update Rag Deployment - """ - pass - def test_update_user_vault_item_endpoint_user_vault_put(self) -> None: """Test case for update_user_vault_item_endpoint_user_vault_put diff --git a/test/test_get_c_serve_v3_deployment_response.py b/test/test_get_c_serve_v3_deployment_response.py index b04ed75..1215630 100644 --- a/test/test_get_c_serve_v3_deployment_response.py +++ b/test/test_get_c_serve_v3_deployment_response.py @@ -60,7 +60,8 @@ def make_instance(self, include_optional) -> GetCServeV3DeploymentResponse: env_vars = { 'key' : '' }, - enable_logging = True + enable_logging = True, + enable_node_model_cache = True ) else: return GetCServeV3DeploymentResponse( diff --git a/test/test_get_rag_deployment_response.py b/test/test_get_rag_deployment_response.py deleted file mode 100644 index 7dee5e3..0000000 --- a/test/test_get_rag_deployment_response.py +++ /dev/null @@ -1,90 +0,0 @@ -# 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_rag_deployment_response import GetRagDeploymentResponse - -class TestGetRagDeploymentResponse(unittest.TestCase): - """GetRagDeploymentResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetRagDeploymentResponse: - """Test GetRagDeploymentResponse - 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 `GetRagDeploymentResponse` - """ - model = GetRagDeploymentResponse() - if include_optional: - return GetRagDeploymentResponse( - creator_email = '', - 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, - revision_number = 56, - user_annotations = { - 'key' : '' - }, - recipe = { }, - cserve_version = '', - llm_model = '', - centml_api_key = '', - min_scale = 56, - max_scale = 56, - initial_scale = 56, - endpoint_certificate_authority = '', - endpoint_bearer_token = '', - concurrency = 56, - env_vars = { - 'key' : '' - } - ) - else: - return GetRagDeploymentResponse( - creator_email = '', - cluster_id = 56, - id = 56, - name = '', - endpoint_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, - revision_number = 56, - recipe = { }, - llm_model = '', - centml_api_key = '', - ) - """ - - def testGetRagDeploymentResponse(self): - """Test GetRagDeploymentResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main()