lightning-sdk 0.2.24rc0__py3-none-any.whl → 0.2.24rc1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- lightning_sdk/__init__.py +1 -1
- lightning_sdk/api/llm_api.py +18 -2
- lightning_sdk/lightning_cloud/openapi/__init__.py +6 -0
- lightning_sdk/lightning_cloud/openapi/api/__init__.py +1 -0
- lightning_sdk/lightning_cloud/openapi/api/cluster_service_api.py +9 -1
- lightning_sdk/lightning_cloud/openapi/api/lit_logger_service_api.py +13 -1
- lightning_sdk/lightning_cloud/openapi/api/volume_service_api.py +258 -0
- lightning_sdk/lightning_cloud/openapi/models/__init__.py +5 -0
- lightning_sdk/lightning_cloud/openapi/models/assistant_id_conversations_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/externalv1_user_status.py +1 -27
- lightning_sdk/lightning_cloud/openapi/models/project_id_schedules_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/schedules_id_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_billing_tier.py +1 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_capacity_reservation.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_data_connection_tier.py +103 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_filestore_data_connection.py +29 -3
- lightning_sdk/lightning_cloud/openapi/models/v1_get_user_response.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_get_volume_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_kubernetes_direct_v1.py +29 -3
- lightning_sdk/lightning_cloud/openapi/models/v1_login_request.py +1 -27
- lightning_sdk/lightning_cloud/openapi/models/v1_magic_link_login_request.py +3 -29
- lightning_sdk/lightning_cloud/openapi/models/v1_rule_resource.py +1 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_schedule.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_schedule_action_type.py +104 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_schedule_resource_type.py +1 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_update_user_request.py +1 -27
- lightning_sdk/lightning_cloud/openapi/models/v1_update_volume_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +157 -27
- lightning_sdk/lightning_cloud/openapi/models/volumes_id_body.py +123 -0
- lightning_sdk/llm/llm.py +6 -1
- {lightning_sdk-0.2.24rc0.dist-info → lightning_sdk-0.2.24rc1.dist-info}/METADATA +1 -1
- {lightning_sdk-0.2.24rc0.dist-info → lightning_sdk-0.2.24rc1.dist-info}/RECORD +36 -30
- {lightning_sdk-0.2.24rc0.dist-info → lightning_sdk-0.2.24rc1.dist-info}/LICENSE +0 -0
- {lightning_sdk-0.2.24rc0.dist-info → lightning_sdk-0.2.24rc1.dist-info}/WHEEL +0 -0
- {lightning_sdk-0.2.24rc0.dist-info → lightning_sdk-0.2.24rc1.dist-info}/entry_points.txt +0 -0
- {lightning_sdk-0.2.24rc0.dist-info → lightning_sdk-0.2.24rc1.dist-info}/top_level.txt +0 -0
lightning_sdk/__init__.py
CHANGED
lightning_sdk/api/llm_api.py
CHANGED
|
@@ -69,7 +69,7 @@ class LLMApi:
|
|
|
69
69
|
self,
|
|
70
70
|
prompt: str,
|
|
71
71
|
system_prompt: Optional[str],
|
|
72
|
-
max_completion_tokens: int,
|
|
72
|
+
max_completion_tokens: Optional[int],
|
|
73
73
|
assistant_id: str,
|
|
74
74
|
images: Optional[List[str]] = None,
|
|
75
75
|
conversation_id: Optional[str] = None,
|
|
@@ -77,8 +77,13 @@ class LLMApi:
|
|
|
77
77
|
name: Optional[str] = None,
|
|
78
78
|
metadata: Optional[Dict[str, str]] = None,
|
|
79
79
|
stream: bool = False,
|
|
80
|
+
**kwargs: Any,
|
|
80
81
|
) -> Union[V1ConversationResponseChunk, Generator[V1ConversationResponseChunk, None, None]]:
|
|
81
82
|
is_internal_conversation = os.getenv("LIGHTNING_INTERNAL_CONVERSATION", "false").lower() == "true"
|
|
83
|
+
ephemeral = os.getenv("LIGHTNING_EPHEMERAL", "false").lower() == "true"
|
|
84
|
+
if ephemeral:
|
|
85
|
+
conversation_id = None
|
|
86
|
+
name = None
|
|
82
87
|
body = {
|
|
83
88
|
"message": {
|
|
84
89
|
"author": {"role": "user"},
|
|
@@ -94,6 +99,9 @@ class LLMApi:
|
|
|
94
99
|
"metadata": metadata or {},
|
|
95
100
|
"internal_conversation": is_internal_conversation,
|
|
96
101
|
"system_prompt": system_prompt,
|
|
102
|
+
"ephemeral": ephemeral,
|
|
103
|
+
"parent_conversation_id": kwargs.get("parent_conversation_id", ""),
|
|
104
|
+
"parent_message_id": kwargs.get("parent_message_id", ""),
|
|
97
105
|
}
|
|
98
106
|
if images:
|
|
99
107
|
for image in images:
|
|
@@ -117,7 +125,7 @@ class LLMApi:
|
|
|
117
125
|
self,
|
|
118
126
|
prompt: str,
|
|
119
127
|
system_prompt: Optional[str],
|
|
120
|
-
max_completion_tokens: int,
|
|
128
|
+
max_completion_tokens: Optional[int],
|
|
121
129
|
assistant_id: str,
|
|
122
130
|
images: Optional[List[str]] = None,
|
|
123
131
|
conversation_id: Optional[str] = None,
|
|
@@ -125,8 +133,13 @@ class LLMApi:
|
|
|
125
133
|
name: Optional[str] = None,
|
|
126
134
|
metadata: Optional[Dict[str, str]] = None,
|
|
127
135
|
stream: bool = False,
|
|
136
|
+
**kwargs: Any,
|
|
128
137
|
) -> Union[V1ConversationResponseChunk, AsyncGenerator[V1ConversationResponseChunk, None]]:
|
|
129
138
|
is_internal_conversation = os.getenv("LIGHTNING_INTERNAL_CONVERSATION", "false").lower() == "true"
|
|
139
|
+
ephemeral = os.getenv("LIGHTNING_EPHEMERAL", "false").lower() == "true"
|
|
140
|
+
if ephemeral:
|
|
141
|
+
conversation_id = None
|
|
142
|
+
name = None
|
|
130
143
|
body = {
|
|
131
144
|
"message": {
|
|
132
145
|
"author": {"role": "user"},
|
|
@@ -142,6 +155,9 @@ class LLMApi:
|
|
|
142
155
|
"metadata": metadata or {},
|
|
143
156
|
"internal_conversation": is_internal_conversation,
|
|
144
157
|
"system_prompt": system_prompt,
|
|
158
|
+
"ephemeral": ephemeral,
|
|
159
|
+
"parent_conversation_id": kwargs.get("parent_conversation_id", ""),
|
|
160
|
+
"parent_message_id": kwargs.get("parent_message_id", ""),
|
|
145
161
|
}
|
|
146
162
|
if images:
|
|
147
163
|
for image in images:
|
|
@@ -63,6 +63,7 @@ from lightning_sdk.lightning_cloud.openapi.api.snowflake_service_api import Snow
|
|
|
63
63
|
from lightning_sdk.lightning_cloud.openapi.api.storage_service_api import StorageServiceApi
|
|
64
64
|
from lightning_sdk.lightning_cloud.openapi.api.studio_jobs_service_api import StudioJobsServiceApi
|
|
65
65
|
from lightning_sdk.lightning_cloud.openapi.api.user_service_api import UserServiceApi
|
|
66
|
+
from lightning_sdk.lightning_cloud.openapi.api.volume_service_api import VolumeServiceApi
|
|
66
67
|
# import ApiClient
|
|
67
68
|
from lightning_sdk.lightning_cloud.openapi.api_client import ApiClient
|
|
68
69
|
from lightning_sdk.lightning_cloud.openapi.configuration import Configuration
|
|
@@ -394,6 +395,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_data_connection import V1Da
|
|
|
394
395
|
from lightning_sdk.lightning_cloud.openapi.models.v1_data_connection_artifact import V1DataConnectionArtifact
|
|
395
396
|
from lightning_sdk.lightning_cloud.openapi.models.v1_data_connection_mount import V1DataConnectionMount
|
|
396
397
|
from lightning_sdk.lightning_cloud.openapi.models.v1_data_connection_state import V1DataConnectionState
|
|
398
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_data_connection_tier import V1DataConnectionTier
|
|
397
399
|
from lightning_sdk.lightning_cloud.openapi.models.v1_data_path import V1DataPath
|
|
398
400
|
from lightning_sdk.lightning_cloud.openapi.models.v1_dataset import V1Dataset
|
|
399
401
|
from lightning_sdk.lightning_cloud.openapi.models.v1_dataset_type import V1DatasetType
|
|
@@ -575,6 +577,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_get_user_balance_response i
|
|
|
575
577
|
from lightning_sdk.lightning_cloud.openapi.models.v1_get_user_notification_preferences_response import V1GetUserNotificationPreferencesResponse
|
|
576
578
|
from lightning_sdk.lightning_cloud.openapi.models.v1_get_user_response import V1GetUserResponse
|
|
577
579
|
from lightning_sdk.lightning_cloud.openapi.models.v1_get_user_storage_breakdown_response import V1GetUserStorageBreakdownResponse
|
|
580
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_get_volume_response import V1GetVolumeResponse
|
|
578
581
|
from lightning_sdk.lightning_cloud.openapi.models.v1_git_credentials import V1GitCredentials
|
|
579
582
|
from lightning_sdk.lightning_cloud.openapi.models.v1_google_cloud_direct_v1 import V1GoogleCloudDirectV1
|
|
580
583
|
from lightning_sdk.lightning_cloud.openapi.models.v1_google_cloud_direct_v1_status import V1GoogleCloudDirectV1Status
|
|
@@ -869,6 +872,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_slurm_job import V1SLURMJob
|
|
|
869
872
|
from lightning_sdk.lightning_cloud.openapi.models.v1_ssh_key_pair import V1SSHKeyPair
|
|
870
873
|
from lightning_sdk.lightning_cloud.openapi.models.v1_ssh_public_key import V1SSHPublicKey
|
|
871
874
|
from lightning_sdk.lightning_cloud.openapi.models.v1_schedule import V1Schedule
|
|
875
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_schedule_action_type import V1ScheduleActionType
|
|
872
876
|
from lightning_sdk.lightning_cloud.openapi.models.v1_schedule_resource_type import V1ScheduleResourceType
|
|
873
877
|
from lightning_sdk.lightning_cloud.openapi.models.v1_search_job_logs_response import V1SearchJobLogsResponse
|
|
874
878
|
from lightning_sdk.lightning_cloud.openapi.models.v1_search_user import V1SearchUser
|
|
@@ -947,6 +951,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_update_user_credits_auto_re
|
|
|
947
951
|
from lightning_sdk.lightning_cloud.openapi.models.v1_update_user_request import V1UpdateUserRequest
|
|
948
952
|
from lightning_sdk.lightning_cloud.openapi.models.v1_update_user_viewed_new_features_request import V1UpdateUserViewedNewFeaturesRequest
|
|
949
953
|
from lightning_sdk.lightning_cloud.openapi.models.v1_update_user_viewed_new_features_response import V1UpdateUserViewedNewFeaturesResponse
|
|
954
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_update_volume_response import V1UpdateVolumeResponse
|
|
950
955
|
from lightning_sdk.lightning_cloud.openapi.models.v1_upload_agent_job_artifact_response import V1UploadAgentJobArtifactResponse
|
|
951
956
|
from lightning_sdk.lightning_cloud.openapi.models.v1_upload_agent_job_output_response import V1UploadAgentJobOutputResponse
|
|
952
957
|
from lightning_sdk.lightning_cloud.openapi.models.v1_upload_lightningapp_instance_artifact_response import V1UploadLightningappInstanceArtifactResponse
|
|
@@ -991,6 +996,7 @@ from lightning_sdk.lightning_cloud.openapi.models.version_uploads_body1 import V
|
|
|
991
996
|
from lightning_sdk.lightning_cloud.openapi.models.versions_id_body import VersionsIdBody
|
|
992
997
|
from lightning_sdk.lightning_cloud.openapi.models.versions_version_body import VersionsVersionBody
|
|
993
998
|
from lightning_sdk.lightning_cloud.openapi.models.versions_version_body1 import VersionsVersionBody1
|
|
999
|
+
from lightning_sdk.lightning_cloud.openapi.models.volumes_id_body import VolumesIdBody
|
|
994
1000
|
from lightning_sdk.lightning_cloud.openapi.models.works_id_body import WorksIdBody
|
|
995
1001
|
from lightning_sdk.lightning_cloud.openapi.models.v1_image_spec import V1ImageSpec as Gridv1ImageSpec
|
|
996
1002
|
from lightning_sdk.lightning_cloud.openapi.models.clusters_id_body import ClustersIdBody as Body
|
|
@@ -44,3 +44,4 @@ from lightning_sdk.lightning_cloud.openapi.api.snowflake_service_api import Snow
|
|
|
44
44
|
from lightning_sdk.lightning_cloud.openapi.api.storage_service_api import StorageServiceApi
|
|
45
45
|
from lightning_sdk.lightning_cloud.openapi.api.studio_jobs_service_api import StudioJobsServiceApi
|
|
46
46
|
from lightning_sdk.lightning_cloud.openapi.api.user_service_api import UserServiceApi
|
|
47
|
+
from lightning_sdk.lightning_cloud.openapi.api.volume_service_api import VolumeServiceApi
|
|
@@ -2428,6 +2428,8 @@ class ClusterServiceApi(object):
|
|
|
2428
2428
|
:param datetime start_time:
|
|
2429
2429
|
:param datetime end_time:
|
|
2430
2430
|
:param bool available_only:
|
|
2431
|
+
:param bool from_aggregate:
|
|
2432
|
+
:param str apparent_provider:
|
|
2431
2433
|
:return: V1ListClusterCapacityReservationsResponse
|
|
2432
2434
|
If the method is called asynchronously,
|
|
2433
2435
|
returns the request thread.
|
|
@@ -2453,12 +2455,14 @@ class ClusterServiceApi(object):
|
|
|
2453
2455
|
:param datetime start_time:
|
|
2454
2456
|
:param datetime end_time:
|
|
2455
2457
|
:param bool available_only:
|
|
2458
|
+
:param bool from_aggregate:
|
|
2459
|
+
:param str apparent_provider:
|
|
2456
2460
|
:return: V1ListClusterCapacityReservationsResponse
|
|
2457
2461
|
If the method is called asynchronously,
|
|
2458
2462
|
returns the request thread.
|
|
2459
2463
|
"""
|
|
2460
2464
|
|
|
2461
|
-
all_params = ['project_id', 'cluster_id', 'start_time', 'end_time', 'available_only'] # noqa: E501
|
|
2465
|
+
all_params = ['project_id', 'cluster_id', 'start_time', 'end_time', 'available_only', 'from_aggregate', 'apparent_provider'] # noqa: E501
|
|
2462
2466
|
all_params.append('async_req')
|
|
2463
2467
|
all_params.append('_return_http_data_only')
|
|
2464
2468
|
all_params.append('_preload_content')
|
|
@@ -2497,6 +2501,10 @@ class ClusterServiceApi(object):
|
|
|
2497
2501
|
query_params.append(('endTime', params['end_time'])) # noqa: E501
|
|
2498
2502
|
if 'available_only' in params:
|
|
2499
2503
|
query_params.append(('availableOnly', params['available_only'])) # noqa: E501
|
|
2504
|
+
if 'from_aggregate' in params:
|
|
2505
|
+
query_params.append(('fromAggregate', params['from_aggregate'])) # noqa: E501
|
|
2506
|
+
if 'apparent_provider' in params:
|
|
2507
|
+
query_params.append(('apparentProvider', params['apparent_provider'])) # noqa: E501
|
|
2500
2508
|
|
|
2501
2509
|
header_params = {}
|
|
2502
2510
|
|
|
@@ -1329,6 +1329,9 @@ class LitLoggerServiceApi(object):
|
|
|
1329
1329
|
:param str user_id:
|
|
1330
1330
|
:param str cloud_space_id:
|
|
1331
1331
|
:param str app_id:
|
|
1332
|
+
:param int limit:
|
|
1333
|
+
:param int offset:
|
|
1334
|
+
:param str order_by:
|
|
1332
1335
|
:return: V1ListMetricsStreamsResponse
|
|
1333
1336
|
If the method is called asynchronously,
|
|
1334
1337
|
returns the request thread.
|
|
@@ -1353,12 +1356,15 @@ class LitLoggerServiceApi(object):
|
|
|
1353
1356
|
:param str user_id:
|
|
1354
1357
|
:param str cloud_space_id:
|
|
1355
1358
|
:param str app_id:
|
|
1359
|
+
:param int limit:
|
|
1360
|
+
:param int offset:
|
|
1361
|
+
:param str order_by:
|
|
1356
1362
|
:return: V1ListMetricsStreamsResponse
|
|
1357
1363
|
If the method is called asynchronously,
|
|
1358
1364
|
returns the request thread.
|
|
1359
1365
|
"""
|
|
1360
1366
|
|
|
1361
|
-
all_params = ['project_id', 'user_id', 'cloud_space_id', 'app_id'] # noqa: E501
|
|
1367
|
+
all_params = ['project_id', 'user_id', 'cloud_space_id', 'app_id', 'limit', 'offset', 'order_by'] # noqa: E501
|
|
1362
1368
|
all_params.append('async_req')
|
|
1363
1369
|
all_params.append('_return_http_data_only')
|
|
1364
1370
|
all_params.append('_preload_content')
|
|
@@ -1391,6 +1397,12 @@ class LitLoggerServiceApi(object):
|
|
|
1391
1397
|
query_params.append(('cloudSpaceId', params['cloud_space_id'])) # noqa: E501
|
|
1392
1398
|
if 'app_id' in params:
|
|
1393
1399
|
query_params.append(('appId', params['app_id'])) # noqa: E501
|
|
1400
|
+
if 'limit' in params:
|
|
1401
|
+
query_params.append(('limit', params['limit'])) # noqa: E501
|
|
1402
|
+
if 'offset' in params:
|
|
1403
|
+
query_params.append(('offset', params['offset'])) # noqa: E501
|
|
1404
|
+
if 'order_by' in params:
|
|
1405
|
+
query_params.append(('orderBy', params['order_by'])) # noqa: E501
|
|
1394
1406
|
|
|
1395
1407
|
header_params = {}
|
|
1396
1408
|
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
external/v1/auth_service.proto
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
|
|
7
|
+
|
|
8
|
+
OpenAPI spec version: version not set
|
|
9
|
+
|
|
10
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
11
|
+
|
|
12
|
+
NOTE
|
|
13
|
+
----
|
|
14
|
+
standard swagger-codegen-cli for this python client has been modified
|
|
15
|
+
by custom templates. The purpose of these templates is to include
|
|
16
|
+
typing information in the API and Model code. Please refer to the
|
|
17
|
+
main grid repository for more info
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
from __future__ import absolute_import
|
|
21
|
+
|
|
22
|
+
import re # noqa: F401
|
|
23
|
+
from typing import TYPE_CHECKING, Any
|
|
24
|
+
|
|
25
|
+
# python 2 and python 3 compatibility library
|
|
26
|
+
import six
|
|
27
|
+
|
|
28
|
+
from lightning_sdk.lightning_cloud.openapi.api_client import ApiClient
|
|
29
|
+
|
|
30
|
+
if TYPE_CHECKING:
|
|
31
|
+
from datetime import datetime
|
|
32
|
+
from lightning_sdk.lightning_cloud.openapi.models import *
|
|
33
|
+
|
|
34
|
+
class VolumeServiceApi(object):
|
|
35
|
+
"""NOTE: This class is auto generated by the swagger code generator program.
|
|
36
|
+
|
|
37
|
+
Do not edit the class manually.
|
|
38
|
+
Ref: https://github.com/swagger-api/swagger-codegen
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
def __init__(self, api_client=None):
|
|
42
|
+
if api_client is None:
|
|
43
|
+
api_client = ApiClient()
|
|
44
|
+
self.api_client = api_client
|
|
45
|
+
|
|
46
|
+
def volume_service_get_volume(self, project_id: 'str', id: 'str', **kwargs) -> 'V1GetVolumeResponse': # noqa: E501
|
|
47
|
+
"""volume_service_get_volume # noqa: E501
|
|
48
|
+
|
|
49
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
50
|
+
asynchronous HTTP request, please pass async_req=True
|
|
51
|
+
>>> thread = api.volume_service_get_volume(project_id, id, async_req=True)
|
|
52
|
+
>>> result = thread.get()
|
|
53
|
+
|
|
54
|
+
:param async_req bool
|
|
55
|
+
:param str project_id: (required)
|
|
56
|
+
:param str id: (required)
|
|
57
|
+
:return: V1GetVolumeResponse
|
|
58
|
+
If the method is called asynchronously,
|
|
59
|
+
returns the request thread.
|
|
60
|
+
"""
|
|
61
|
+
kwargs['_return_http_data_only'] = True
|
|
62
|
+
if kwargs.get('async_req'):
|
|
63
|
+
return self.volume_service_get_volume_with_http_info(project_id, id, **kwargs) # noqa: E501
|
|
64
|
+
else:
|
|
65
|
+
(data) = self.volume_service_get_volume_with_http_info(project_id, id, **kwargs) # noqa: E501
|
|
66
|
+
return data
|
|
67
|
+
|
|
68
|
+
def volume_service_get_volume_with_http_info(self, project_id: 'str', id: 'str', **kwargs) -> 'V1GetVolumeResponse': # noqa: E501
|
|
69
|
+
"""volume_service_get_volume # noqa: E501
|
|
70
|
+
|
|
71
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
72
|
+
asynchronous HTTP request, please pass async_req=True
|
|
73
|
+
>>> thread = api.volume_service_get_volume_with_http_info(project_id, id, async_req=True)
|
|
74
|
+
>>> result = thread.get()
|
|
75
|
+
|
|
76
|
+
:param async_req bool
|
|
77
|
+
:param str project_id: (required)
|
|
78
|
+
:param str id: (required)
|
|
79
|
+
:return: V1GetVolumeResponse
|
|
80
|
+
If the method is called asynchronously,
|
|
81
|
+
returns the request thread.
|
|
82
|
+
"""
|
|
83
|
+
|
|
84
|
+
all_params = ['project_id', 'id'] # noqa: E501
|
|
85
|
+
all_params.append('async_req')
|
|
86
|
+
all_params.append('_return_http_data_only')
|
|
87
|
+
all_params.append('_preload_content')
|
|
88
|
+
all_params.append('_request_timeout')
|
|
89
|
+
|
|
90
|
+
params = locals()
|
|
91
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
92
|
+
if key not in all_params:
|
|
93
|
+
raise TypeError(
|
|
94
|
+
"Got an unexpected keyword argument '%s'"
|
|
95
|
+
" to method volume_service_get_volume" % key
|
|
96
|
+
)
|
|
97
|
+
params[key] = val
|
|
98
|
+
del params['kwargs']
|
|
99
|
+
# verify the required parameter 'project_id' is set
|
|
100
|
+
if ('project_id' not in params or
|
|
101
|
+
params['project_id'] is None):
|
|
102
|
+
raise ValueError("Missing the required parameter `project_id` when calling `volume_service_get_volume`") # noqa: E501
|
|
103
|
+
# verify the required parameter 'id' is set
|
|
104
|
+
if ('id' not in params or
|
|
105
|
+
params['id'] is None):
|
|
106
|
+
raise ValueError("Missing the required parameter `id` when calling `volume_service_get_volume`") # noqa: E501
|
|
107
|
+
|
|
108
|
+
collection_formats = {}
|
|
109
|
+
|
|
110
|
+
path_params = {}
|
|
111
|
+
if 'project_id' in params:
|
|
112
|
+
path_params['projectId'] = params['project_id'] # noqa: E501
|
|
113
|
+
if 'id' in params:
|
|
114
|
+
path_params['id'] = params['id'] # noqa: E501
|
|
115
|
+
|
|
116
|
+
query_params = []
|
|
117
|
+
|
|
118
|
+
header_params = {}
|
|
119
|
+
|
|
120
|
+
form_params = []
|
|
121
|
+
local_var_files = {}
|
|
122
|
+
|
|
123
|
+
body_params = None
|
|
124
|
+
# HTTP header `Accept`
|
|
125
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
126
|
+
['application/json']) # noqa: E501
|
|
127
|
+
|
|
128
|
+
# Authentication setting
|
|
129
|
+
auth_settings = [] # noqa: E501
|
|
130
|
+
|
|
131
|
+
return self.api_client.call_api(
|
|
132
|
+
'/v1/projects/{projectId}/volumes/{id}', 'GET',
|
|
133
|
+
path_params,
|
|
134
|
+
query_params,
|
|
135
|
+
header_params,
|
|
136
|
+
body=body_params,
|
|
137
|
+
post_params=form_params,
|
|
138
|
+
files=local_var_files,
|
|
139
|
+
response_type='V1GetVolumeResponse', # noqa: E501
|
|
140
|
+
auth_settings=auth_settings,
|
|
141
|
+
async_req=params.get('async_req'),
|
|
142
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
143
|
+
_preload_content=params.get('_preload_content', True),
|
|
144
|
+
_request_timeout=params.get('_request_timeout'),
|
|
145
|
+
collection_formats=collection_formats)
|
|
146
|
+
|
|
147
|
+
def volume_service_update_volume(self, body: 'VolumesIdBody', project_id: 'str', id: 'str', **kwargs) -> 'V1UpdateVolumeResponse': # noqa: E501
|
|
148
|
+
"""volume_service_update_volume # noqa: E501
|
|
149
|
+
|
|
150
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
151
|
+
asynchronous HTTP request, please pass async_req=True
|
|
152
|
+
>>> thread = api.volume_service_update_volume(body, project_id, id, async_req=True)
|
|
153
|
+
>>> result = thread.get()
|
|
154
|
+
|
|
155
|
+
:param async_req bool
|
|
156
|
+
:param VolumesIdBody body: (required)
|
|
157
|
+
:param str project_id: (required)
|
|
158
|
+
:param str id: (required)
|
|
159
|
+
:return: V1UpdateVolumeResponse
|
|
160
|
+
If the method is called asynchronously,
|
|
161
|
+
returns the request thread.
|
|
162
|
+
"""
|
|
163
|
+
kwargs['_return_http_data_only'] = True
|
|
164
|
+
if kwargs.get('async_req'):
|
|
165
|
+
return self.volume_service_update_volume_with_http_info(body, project_id, id, **kwargs) # noqa: E501
|
|
166
|
+
else:
|
|
167
|
+
(data) = self.volume_service_update_volume_with_http_info(body, project_id, id, **kwargs) # noqa: E501
|
|
168
|
+
return data
|
|
169
|
+
|
|
170
|
+
def volume_service_update_volume_with_http_info(self, body: 'VolumesIdBody', project_id: 'str', id: 'str', **kwargs) -> 'V1UpdateVolumeResponse': # noqa: E501
|
|
171
|
+
"""volume_service_update_volume # noqa: E501
|
|
172
|
+
|
|
173
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
174
|
+
asynchronous HTTP request, please pass async_req=True
|
|
175
|
+
>>> thread = api.volume_service_update_volume_with_http_info(body, project_id, id, async_req=True)
|
|
176
|
+
>>> result = thread.get()
|
|
177
|
+
|
|
178
|
+
:param async_req bool
|
|
179
|
+
:param VolumesIdBody body: (required)
|
|
180
|
+
:param str project_id: (required)
|
|
181
|
+
:param str id: (required)
|
|
182
|
+
:return: V1UpdateVolumeResponse
|
|
183
|
+
If the method is called asynchronously,
|
|
184
|
+
returns the request thread.
|
|
185
|
+
"""
|
|
186
|
+
|
|
187
|
+
all_params = ['body', 'project_id', 'id'] # noqa: E501
|
|
188
|
+
all_params.append('async_req')
|
|
189
|
+
all_params.append('_return_http_data_only')
|
|
190
|
+
all_params.append('_preload_content')
|
|
191
|
+
all_params.append('_request_timeout')
|
|
192
|
+
|
|
193
|
+
params = locals()
|
|
194
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
195
|
+
if key not in all_params:
|
|
196
|
+
raise TypeError(
|
|
197
|
+
"Got an unexpected keyword argument '%s'"
|
|
198
|
+
" to method volume_service_update_volume" % key
|
|
199
|
+
)
|
|
200
|
+
params[key] = val
|
|
201
|
+
del params['kwargs']
|
|
202
|
+
# verify the required parameter 'body' is set
|
|
203
|
+
if ('body' not in params or
|
|
204
|
+
params['body'] is None):
|
|
205
|
+
raise ValueError("Missing the required parameter `body` when calling `volume_service_update_volume`") # noqa: E501
|
|
206
|
+
# verify the required parameter 'project_id' is set
|
|
207
|
+
if ('project_id' not in params or
|
|
208
|
+
params['project_id'] is None):
|
|
209
|
+
raise ValueError("Missing the required parameter `project_id` when calling `volume_service_update_volume`") # noqa: E501
|
|
210
|
+
# verify the required parameter 'id' is set
|
|
211
|
+
if ('id' not in params or
|
|
212
|
+
params['id'] is None):
|
|
213
|
+
raise ValueError("Missing the required parameter `id` when calling `volume_service_update_volume`") # noqa: E501
|
|
214
|
+
|
|
215
|
+
collection_formats = {}
|
|
216
|
+
|
|
217
|
+
path_params = {}
|
|
218
|
+
if 'project_id' in params:
|
|
219
|
+
path_params['projectId'] = params['project_id'] # noqa: E501
|
|
220
|
+
if 'id' in params:
|
|
221
|
+
path_params['id'] = params['id'] # noqa: E501
|
|
222
|
+
|
|
223
|
+
query_params = []
|
|
224
|
+
|
|
225
|
+
header_params = {}
|
|
226
|
+
|
|
227
|
+
form_params = []
|
|
228
|
+
local_var_files = {}
|
|
229
|
+
|
|
230
|
+
body_params = None
|
|
231
|
+
if 'body' in params:
|
|
232
|
+
body_params = params['body']
|
|
233
|
+
# HTTP header `Accept`
|
|
234
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
235
|
+
['application/json']) # noqa: E501
|
|
236
|
+
|
|
237
|
+
# HTTP header `Content-Type`
|
|
238
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
239
|
+
['application/json']) # noqa: E501
|
|
240
|
+
|
|
241
|
+
# Authentication setting
|
|
242
|
+
auth_settings = [] # noqa: E501
|
|
243
|
+
|
|
244
|
+
return self.api_client.call_api(
|
|
245
|
+
'/v1/projects/{projectId}/volumes/{id}', 'PUT',
|
|
246
|
+
path_params,
|
|
247
|
+
query_params,
|
|
248
|
+
header_params,
|
|
249
|
+
body=body_params,
|
|
250
|
+
post_params=form_params,
|
|
251
|
+
files=local_var_files,
|
|
252
|
+
response_type='V1UpdateVolumeResponse', # noqa: E501
|
|
253
|
+
auth_settings=auth_settings,
|
|
254
|
+
async_req=params.get('async_req'),
|
|
255
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
256
|
+
_preload_content=params.get('_preload_content', True),
|
|
257
|
+
_request_timeout=params.get('_request_timeout'),
|
|
258
|
+
collection_formats=collection_formats)
|
|
@@ -348,6 +348,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_data_connection import V1Da
|
|
|
348
348
|
from lightning_sdk.lightning_cloud.openapi.models.v1_data_connection_artifact import V1DataConnectionArtifact
|
|
349
349
|
from lightning_sdk.lightning_cloud.openapi.models.v1_data_connection_mount import V1DataConnectionMount
|
|
350
350
|
from lightning_sdk.lightning_cloud.openapi.models.v1_data_connection_state import V1DataConnectionState
|
|
351
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_data_connection_tier import V1DataConnectionTier
|
|
351
352
|
from lightning_sdk.lightning_cloud.openapi.models.v1_data_path import V1DataPath
|
|
352
353
|
from lightning_sdk.lightning_cloud.openapi.models.v1_dataset import V1Dataset
|
|
353
354
|
from lightning_sdk.lightning_cloud.openapi.models.v1_dataset_type import V1DatasetType
|
|
@@ -529,6 +530,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_get_user_balance_response i
|
|
|
529
530
|
from lightning_sdk.lightning_cloud.openapi.models.v1_get_user_notification_preferences_response import V1GetUserNotificationPreferencesResponse
|
|
530
531
|
from lightning_sdk.lightning_cloud.openapi.models.v1_get_user_response import V1GetUserResponse
|
|
531
532
|
from lightning_sdk.lightning_cloud.openapi.models.v1_get_user_storage_breakdown_response import V1GetUserStorageBreakdownResponse
|
|
533
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_get_volume_response import V1GetVolumeResponse
|
|
532
534
|
from lightning_sdk.lightning_cloud.openapi.models.v1_git_credentials import V1GitCredentials
|
|
533
535
|
from lightning_sdk.lightning_cloud.openapi.models.v1_google_cloud_direct_v1 import V1GoogleCloudDirectV1
|
|
534
536
|
from lightning_sdk.lightning_cloud.openapi.models.v1_google_cloud_direct_v1_status import V1GoogleCloudDirectV1Status
|
|
@@ -823,6 +825,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_slurm_job import V1SLURMJob
|
|
|
823
825
|
from lightning_sdk.lightning_cloud.openapi.models.v1_ssh_key_pair import V1SSHKeyPair
|
|
824
826
|
from lightning_sdk.lightning_cloud.openapi.models.v1_ssh_public_key import V1SSHPublicKey
|
|
825
827
|
from lightning_sdk.lightning_cloud.openapi.models.v1_schedule import V1Schedule
|
|
828
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_schedule_action_type import V1ScheduleActionType
|
|
826
829
|
from lightning_sdk.lightning_cloud.openapi.models.v1_schedule_resource_type import V1ScheduleResourceType
|
|
827
830
|
from lightning_sdk.lightning_cloud.openapi.models.v1_search_job_logs_response import V1SearchJobLogsResponse
|
|
828
831
|
from lightning_sdk.lightning_cloud.openapi.models.v1_search_user import V1SearchUser
|
|
@@ -901,6 +904,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_update_user_credits_auto_re
|
|
|
901
904
|
from lightning_sdk.lightning_cloud.openapi.models.v1_update_user_request import V1UpdateUserRequest
|
|
902
905
|
from lightning_sdk.lightning_cloud.openapi.models.v1_update_user_viewed_new_features_request import V1UpdateUserViewedNewFeaturesRequest
|
|
903
906
|
from lightning_sdk.lightning_cloud.openapi.models.v1_update_user_viewed_new_features_response import V1UpdateUserViewedNewFeaturesResponse
|
|
907
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_update_volume_response import V1UpdateVolumeResponse
|
|
904
908
|
from lightning_sdk.lightning_cloud.openapi.models.v1_upload_agent_job_artifact_response import V1UploadAgentJobArtifactResponse
|
|
905
909
|
from lightning_sdk.lightning_cloud.openapi.models.v1_upload_agent_job_output_response import V1UploadAgentJobOutputResponse
|
|
906
910
|
from lightning_sdk.lightning_cloud.openapi.models.v1_upload_lightningapp_instance_artifact_response import V1UploadLightningappInstanceArtifactResponse
|
|
@@ -945,4 +949,5 @@ from lightning_sdk.lightning_cloud.openapi.models.version_uploads_body1 import V
|
|
|
945
949
|
from lightning_sdk.lightning_cloud.openapi.models.versions_id_body import VersionsIdBody
|
|
946
950
|
from lightning_sdk.lightning_cloud.openapi.models.versions_version_body import VersionsVersionBody
|
|
947
951
|
from lightning_sdk.lightning_cloud.openapi.models.versions_version_body1 import VersionsVersionBody1
|
|
952
|
+
from lightning_sdk.lightning_cloud.openapi.models.volumes_id_body import VolumesIdBody
|
|
948
953
|
from lightning_sdk.lightning_cloud.openapi.models.works_id_body import WorksIdBody
|
|
@@ -50,6 +50,7 @@ class AssistantIdConversationsBody(object):
|
|
|
50
50
|
'message': 'V1Message',
|
|
51
51
|
'metadata': 'dict(str, str)',
|
|
52
52
|
'name': 'str',
|
|
53
|
+
'parent_conversation_id': 'str',
|
|
53
54
|
'parent_message_id': 'str',
|
|
54
55
|
'reasoning_effort': 'str',
|
|
55
56
|
'store': 'bool',
|
|
@@ -67,6 +68,7 @@ class AssistantIdConversationsBody(object):
|
|
|
67
68
|
'message': 'message',
|
|
68
69
|
'metadata': 'metadata',
|
|
69
70
|
'name': 'name',
|
|
71
|
+
'parent_conversation_id': 'parentConversationId',
|
|
70
72
|
'parent_message_id': 'parentMessageId',
|
|
71
73
|
'reasoning_effort': 'reasoningEffort',
|
|
72
74
|
'store': 'store',
|
|
@@ -74,7 +76,7 @@ class AssistantIdConversationsBody(object):
|
|
|
74
76
|
'system_prompt': 'systemPrompt'
|
|
75
77
|
}
|
|
76
78
|
|
|
77
|
-
def __init__(self, auto_name: 'bool' =None, billing_project_id: 'str' =None, conversation_id: 'str' =None, ephemeral: 'bool' =None, internal_conversation: 'bool' =None, max_tokens: 'str' =None, message: 'V1Message' =None, metadata: 'dict(str, str)' =None, name: 'str' =None, parent_message_id: 'str' =None, reasoning_effort: 'str' =None, store: 'bool' =None, stream: 'bool' =None, system_prompt: 'str' =None): # noqa: E501
|
|
79
|
+
def __init__(self, auto_name: 'bool' =None, billing_project_id: 'str' =None, conversation_id: 'str' =None, ephemeral: 'bool' =None, internal_conversation: 'bool' =None, max_tokens: 'str' =None, message: 'V1Message' =None, metadata: 'dict(str, str)' =None, name: 'str' =None, parent_conversation_id: 'str' =None, parent_message_id: 'str' =None, reasoning_effort: 'str' =None, store: 'bool' =None, stream: 'bool' =None, system_prompt: 'str' =None): # noqa: E501
|
|
78
80
|
"""AssistantIdConversationsBody - a model defined in Swagger""" # noqa: E501
|
|
79
81
|
self._auto_name = None
|
|
80
82
|
self._billing_project_id = None
|
|
@@ -85,6 +87,7 @@ class AssistantIdConversationsBody(object):
|
|
|
85
87
|
self._message = None
|
|
86
88
|
self._metadata = None
|
|
87
89
|
self._name = None
|
|
90
|
+
self._parent_conversation_id = None
|
|
88
91
|
self._parent_message_id = None
|
|
89
92
|
self._reasoning_effort = None
|
|
90
93
|
self._store = None
|
|
@@ -109,6 +112,8 @@ class AssistantIdConversationsBody(object):
|
|
|
109
112
|
self.metadata = metadata
|
|
110
113
|
if name is not None:
|
|
111
114
|
self.name = name
|
|
115
|
+
if parent_conversation_id is not None:
|
|
116
|
+
self.parent_conversation_id = parent_conversation_id
|
|
112
117
|
if parent_message_id is not None:
|
|
113
118
|
self.parent_message_id = parent_message_id
|
|
114
119
|
if reasoning_effort is not None:
|
|
@@ -309,6 +314,27 @@ class AssistantIdConversationsBody(object):
|
|
|
309
314
|
|
|
310
315
|
self._name = name
|
|
311
316
|
|
|
317
|
+
@property
|
|
318
|
+
def parent_conversation_id(self) -> 'str':
|
|
319
|
+
"""Gets the parent_conversation_id of this AssistantIdConversationsBody. # noqa: E501
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
:return: The parent_conversation_id of this AssistantIdConversationsBody. # noqa: E501
|
|
323
|
+
:rtype: str
|
|
324
|
+
"""
|
|
325
|
+
return self._parent_conversation_id
|
|
326
|
+
|
|
327
|
+
@parent_conversation_id.setter
|
|
328
|
+
def parent_conversation_id(self, parent_conversation_id: 'str'):
|
|
329
|
+
"""Sets the parent_conversation_id of this AssistantIdConversationsBody.
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
:param parent_conversation_id: The parent_conversation_id of this AssistantIdConversationsBody. # noqa: E501
|
|
333
|
+
:type: str
|
|
334
|
+
"""
|
|
335
|
+
|
|
336
|
+
self._parent_conversation_id = parent_conversation_id
|
|
337
|
+
|
|
312
338
|
@property
|
|
313
339
|
def parent_message_id(self) -> 'str':
|
|
314
340
|
"""Gets the parent_message_id of this AssistantIdConversationsBody. # noqa: E501
|
|
@@ -48,7 +48,6 @@ class Externalv1UserStatus(object):
|
|
|
48
48
|
'completed_signup': 'bool',
|
|
49
49
|
'has_received_free_months': 'bool',
|
|
50
50
|
'installed_grid': 'bool',
|
|
51
|
-
'should_auto_verify': 'bool',
|
|
52
51
|
'verified': 'bool',
|
|
53
52
|
'verified_at': 'datetime'
|
|
54
53
|
}
|
|
@@ -61,12 +60,11 @@ class Externalv1UserStatus(object):
|
|
|
61
60
|
'completed_signup': 'completedSignup',
|
|
62
61
|
'has_received_free_months': 'hasReceivedFreeMonths',
|
|
63
62
|
'installed_grid': 'installedGrid',
|
|
64
|
-
'should_auto_verify': 'shouldAutoVerify',
|
|
65
63
|
'verified': 'verified',
|
|
66
64
|
'verified_at': 'verifiedAt'
|
|
67
65
|
}
|
|
68
66
|
|
|
69
|
-
def __init__(self, acked_storage_violation: 'bool' =None, auto_verify_reason: 'str' =None, auto_verify_response: 'bool' =None, completed_project_onboarding: 'bool' =None, completed_signup: 'bool' =None, has_received_free_months: 'bool' =None, installed_grid: 'bool' =None,
|
|
67
|
+
def __init__(self, acked_storage_violation: 'bool' =None, auto_verify_reason: 'str' =None, auto_verify_response: 'bool' =None, completed_project_onboarding: 'bool' =None, completed_signup: 'bool' =None, has_received_free_months: 'bool' =None, installed_grid: 'bool' =None, verified: 'bool' =None, verified_at: 'datetime' =None): # noqa: E501
|
|
70
68
|
"""Externalv1UserStatus - a model defined in Swagger""" # noqa: E501
|
|
71
69
|
self._acked_storage_violation = None
|
|
72
70
|
self._auto_verify_reason = None
|
|
@@ -75,7 +73,6 @@ class Externalv1UserStatus(object):
|
|
|
75
73
|
self._completed_signup = None
|
|
76
74
|
self._has_received_free_months = None
|
|
77
75
|
self._installed_grid = None
|
|
78
|
-
self._should_auto_verify = None
|
|
79
76
|
self._verified = None
|
|
80
77
|
self._verified_at = None
|
|
81
78
|
self.discriminator = None
|
|
@@ -93,8 +90,6 @@ class Externalv1UserStatus(object):
|
|
|
93
90
|
self.has_received_free_months = has_received_free_months
|
|
94
91
|
if installed_grid is not None:
|
|
95
92
|
self.installed_grid = installed_grid
|
|
96
|
-
if should_auto_verify is not None:
|
|
97
|
-
self.should_auto_verify = should_auto_verify
|
|
98
93
|
if verified is not None:
|
|
99
94
|
self.verified = verified
|
|
100
95
|
if verified_at is not None:
|
|
@@ -247,27 +242,6 @@ class Externalv1UserStatus(object):
|
|
|
247
242
|
|
|
248
243
|
self._installed_grid = installed_grid
|
|
249
244
|
|
|
250
|
-
@property
|
|
251
|
-
def should_auto_verify(self) -> 'bool':
|
|
252
|
-
"""Gets the should_auto_verify of this Externalv1UserStatus. # noqa: E501
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
:return: The should_auto_verify of this Externalv1UserStatus. # noqa: E501
|
|
256
|
-
:rtype: bool
|
|
257
|
-
"""
|
|
258
|
-
return self._should_auto_verify
|
|
259
|
-
|
|
260
|
-
@should_auto_verify.setter
|
|
261
|
-
def should_auto_verify(self, should_auto_verify: 'bool'):
|
|
262
|
-
"""Sets the should_auto_verify of this Externalv1UserStatus.
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
:param should_auto_verify: The should_auto_verify of this Externalv1UserStatus. # noqa: E501
|
|
266
|
-
:type: bool
|
|
267
|
-
"""
|
|
268
|
-
|
|
269
|
-
self._should_auto_verify = should_auto_verify
|
|
270
|
-
|
|
271
245
|
@property
|
|
272
246
|
def verified(self) -> 'bool':
|
|
273
247
|
"""Gets the verified of this Externalv1UserStatus. # noqa: E501
|