lightning-sdk 0.2.20__py3-none-any.whl → 0.2.21rc0__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.
Files changed (27) hide show
  1. lightning_sdk/__init__.py +1 -1
  2. lightning_sdk/api/license_api.py +2 -2
  3. lightning_sdk/api/llm_api.py +53 -1
  4. lightning_sdk/api/studio_api.py +5 -0
  5. lightning_sdk/lightning_cloud/openapi/__init__.py +0 -1
  6. lightning_sdk/lightning_cloud/openapi/api/endpoint_service_api.py +11 -1
  7. lightning_sdk/lightning_cloud/openapi/api/user_service_api.py +0 -85
  8. lightning_sdk/lightning_cloud/openapi/models/__init__.py +0 -1
  9. lightning_sdk/lightning_cloud/openapi/models/update.py +79 -1
  10. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_environment_template.py +53 -1
  11. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_environment_template_config.py +27 -1
  12. lightning_sdk/lightning_cloud/openapi/models/v1_cluster_deletion_options.py +27 -1
  13. lightning_sdk/lightning_cloud/openapi/models/v1_create_cloud_space_environment_template_request.py +79 -1
  14. lightning_sdk/lightning_cloud/openapi/models/v1_create_project_request.py +79 -1
  15. lightning_sdk/lightning_cloud/openapi/models/v1_message.py +53 -1
  16. lightning_sdk/lightning_cloud/openapi/models/v1_routing_telemetry.py +27 -1
  17. lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +27 -287
  18. lightning_sdk/llm/__init__.py +2 -1
  19. lightning_sdk/llm/asyncllm.py +48 -0
  20. lightning_sdk/services/utilities.py +15 -1
  21. {lightning_sdk-0.2.20.dist-info → lightning_sdk-0.2.21rc0.dist-info}/METADATA +1 -1
  22. {lightning_sdk-0.2.20.dist-info → lightning_sdk-0.2.21rc0.dist-info}/RECORD +26 -26
  23. lightning_sdk/lightning_cloud/openapi/models/v1_get_user_storage_response.py +0 -201
  24. {lightning_sdk-0.2.20.dist-info → lightning_sdk-0.2.21rc0.dist-info}/LICENSE +0 -0
  25. {lightning_sdk-0.2.20.dist-info → lightning_sdk-0.2.21rc0.dist-info}/WHEEL +0 -0
  26. {lightning_sdk-0.2.20.dist-info → lightning_sdk-0.2.21rc0.dist-info}/entry_points.txt +0 -0
  27. {lightning_sdk-0.2.20.dist-info → lightning_sdk-0.2.21rc0.dist-info}/top_level.txt +0 -0
@@ -43,7 +43,10 @@ class V1CreateCloudSpaceEnvironmentTemplateRequest(object):
43
43
  swagger_types = {
44
44
  'allowed_machines': 'list[str]',
45
45
  'default_machine': 'str',
46
+ 'description': 'str',
46
47
  'environment_type': 'V1CloudSpaceEnvironmentType',
48
+ 'icon': 'str',
49
+ 'initial_setup_script_text': 'str',
47
50
  'machine_image_version': 'str',
48
51
  'name': 'str',
49
52
  'org_id': 'str',
@@ -54,7 +57,10 @@ class V1CreateCloudSpaceEnvironmentTemplateRequest(object):
54
57
  attribute_map = {
55
58
  'allowed_machines': 'allowedMachines',
56
59
  'default_machine': 'defaultMachine',
60
+ 'description': 'description',
57
61
  'environment_type': 'environmentType',
62
+ 'icon': 'icon',
63
+ 'initial_setup_script_text': 'initialSetupScriptText',
58
64
  'machine_image_version': 'machineImageVersion',
59
65
  'name': 'name',
60
66
  'org_id': 'orgId',
@@ -62,11 +68,14 @@ class V1CreateCloudSpaceEnvironmentTemplateRequest(object):
62
68
  'setup_script_text': 'setupScriptText'
63
69
  }
64
70
 
65
- def __init__(self, allowed_machines: 'list[str]' =None, default_machine: 'str' =None, environment_type: 'V1CloudSpaceEnvironmentType' =None, machine_image_version: 'str' =None, name: 'str' =None, org_id: 'str' =None, plugins: 'list[str]' =None, setup_script_text: 'str' =None): # noqa: E501
71
+ def __init__(self, allowed_machines: 'list[str]' =None, default_machine: 'str' =None, description: 'str' =None, environment_type: 'V1CloudSpaceEnvironmentType' =None, icon: 'str' =None, initial_setup_script_text: 'str' =None, machine_image_version: 'str' =None, name: 'str' =None, org_id: 'str' =None, plugins: 'list[str]' =None, setup_script_text: 'str' =None): # noqa: E501
66
72
  """V1CreateCloudSpaceEnvironmentTemplateRequest - a model defined in Swagger""" # noqa: E501
67
73
  self._allowed_machines = None
68
74
  self._default_machine = None
75
+ self._description = None
69
76
  self._environment_type = None
77
+ self._icon = None
78
+ self._initial_setup_script_text = None
70
79
  self._machine_image_version = None
71
80
  self._name = None
72
81
  self._org_id = None
@@ -77,8 +86,14 @@ class V1CreateCloudSpaceEnvironmentTemplateRequest(object):
77
86
  self.allowed_machines = allowed_machines
78
87
  if default_machine is not None:
79
88
  self.default_machine = default_machine
89
+ if description is not None:
90
+ self.description = description
80
91
  if environment_type is not None:
81
92
  self.environment_type = environment_type
93
+ if icon is not None:
94
+ self.icon = icon
95
+ if initial_setup_script_text is not None:
96
+ self.initial_setup_script_text = initial_setup_script_text
82
97
  if machine_image_version is not None:
83
98
  self.machine_image_version = machine_image_version
84
99
  if name is not None:
@@ -132,6 +147,27 @@ class V1CreateCloudSpaceEnvironmentTemplateRequest(object):
132
147
 
133
148
  self._default_machine = default_machine
134
149
 
150
+ @property
151
+ def description(self) -> 'str':
152
+ """Gets the description of this V1CreateCloudSpaceEnvironmentTemplateRequest. # noqa: E501
153
+
154
+
155
+ :return: The description of this V1CreateCloudSpaceEnvironmentTemplateRequest. # noqa: E501
156
+ :rtype: str
157
+ """
158
+ return self._description
159
+
160
+ @description.setter
161
+ def description(self, description: 'str'):
162
+ """Sets the description of this V1CreateCloudSpaceEnvironmentTemplateRequest.
163
+
164
+
165
+ :param description: The description of this V1CreateCloudSpaceEnvironmentTemplateRequest. # noqa: E501
166
+ :type: str
167
+ """
168
+
169
+ self._description = description
170
+
135
171
  @property
136
172
  def environment_type(self) -> 'V1CloudSpaceEnvironmentType':
137
173
  """Gets the environment_type of this V1CreateCloudSpaceEnvironmentTemplateRequest. # noqa: E501
@@ -153,6 +189,48 @@ class V1CreateCloudSpaceEnvironmentTemplateRequest(object):
153
189
 
154
190
  self._environment_type = environment_type
155
191
 
192
+ @property
193
+ def icon(self) -> 'str':
194
+ """Gets the icon of this V1CreateCloudSpaceEnvironmentTemplateRequest. # noqa: E501
195
+
196
+
197
+ :return: The icon of this V1CreateCloudSpaceEnvironmentTemplateRequest. # noqa: E501
198
+ :rtype: str
199
+ """
200
+ return self._icon
201
+
202
+ @icon.setter
203
+ def icon(self, icon: 'str'):
204
+ """Sets the icon of this V1CreateCloudSpaceEnvironmentTemplateRequest.
205
+
206
+
207
+ :param icon: The icon of this V1CreateCloudSpaceEnvironmentTemplateRequest. # noqa: E501
208
+ :type: str
209
+ """
210
+
211
+ self._icon = icon
212
+
213
+ @property
214
+ def initial_setup_script_text(self) -> 'str':
215
+ """Gets the initial_setup_script_text of this V1CreateCloudSpaceEnvironmentTemplateRequest. # noqa: E501
216
+
217
+
218
+ :return: The initial_setup_script_text of this V1CreateCloudSpaceEnvironmentTemplateRequest. # noqa: E501
219
+ :rtype: str
220
+ """
221
+ return self._initial_setup_script_text
222
+
223
+ @initial_setup_script_text.setter
224
+ def initial_setup_script_text(self, initial_setup_script_text: 'str'):
225
+ """Sets the initial_setup_script_text of this V1CreateCloudSpaceEnvironmentTemplateRequest.
226
+
227
+
228
+ :param initial_setup_script_text: The initial_setup_script_text of this V1CreateCloudSpaceEnvironmentTemplateRequest. # noqa: E501
229
+ :type: str
230
+ """
231
+
232
+ self._initial_setup_script_text = initial_setup_script_text
233
+
156
234
  @property
157
235
  def machine_image_version(self) -> 'str':
158
236
  """Gets the machine_image_version of this V1CreateCloudSpaceEnvironmentTemplateRequest. # noqa: E501
@@ -41,6 +41,9 @@ class V1CreateProjectRequest(object):
41
41
  and the value is json key in definition.
42
42
  """
43
43
  swagger_types = {
44
+ 'allow_credits_auto_replenish': 'bool',
45
+ 'auto_replenish_amount': 'float',
46
+ 'auto_replenish_threshold': 'float',
44
47
  'default_machine_image_version': 'str',
45
48
  'default_machine_type': 'str',
46
49
  'description': 'str',
@@ -52,6 +55,9 @@ class V1CreateProjectRequest(object):
52
55
  }
53
56
 
54
57
  attribute_map = {
58
+ 'allow_credits_auto_replenish': 'allowCreditsAutoReplenish',
59
+ 'auto_replenish_amount': 'autoReplenishAmount',
60
+ 'auto_replenish_threshold': 'autoReplenishThreshold',
55
61
  'default_machine_image_version': 'defaultMachineImageVersion',
56
62
  'default_machine_type': 'defaultMachineType',
57
63
  'description': 'description',
@@ -62,8 +68,11 @@ class V1CreateProjectRequest(object):
62
68
  'quotas': 'quotas'
63
69
  }
64
70
 
65
- def __init__(self, default_machine_image_version: 'str' =None, default_machine_type: 'str' =None, description: 'str' =None, display_name: 'str' =None, name: 'str' =None, organization_id: 'str' =None, preferred_cluster: 'str' =None, quotas: 'V1Quotas' =None): # noqa: E501
71
+ def __init__(self, allow_credits_auto_replenish: 'bool' =None, auto_replenish_amount: 'float' =None, auto_replenish_threshold: 'float' =None, default_machine_image_version: 'str' =None, default_machine_type: 'str' =None, description: 'str' =None, display_name: 'str' =None, name: 'str' =None, organization_id: 'str' =None, preferred_cluster: 'str' =None, quotas: 'V1Quotas' =None): # noqa: E501
66
72
  """V1CreateProjectRequest - a model defined in Swagger""" # noqa: E501
73
+ self._allow_credits_auto_replenish = None
74
+ self._auto_replenish_amount = None
75
+ self._auto_replenish_threshold = None
67
76
  self._default_machine_image_version = None
68
77
  self._default_machine_type = None
69
78
  self._description = None
@@ -73,6 +82,12 @@ class V1CreateProjectRequest(object):
73
82
  self._preferred_cluster = None
74
83
  self._quotas = None
75
84
  self.discriminator = None
85
+ if allow_credits_auto_replenish is not None:
86
+ self.allow_credits_auto_replenish = allow_credits_auto_replenish
87
+ if auto_replenish_amount is not None:
88
+ self.auto_replenish_amount = auto_replenish_amount
89
+ if auto_replenish_threshold is not None:
90
+ self.auto_replenish_threshold = auto_replenish_threshold
76
91
  if default_machine_image_version is not None:
77
92
  self.default_machine_image_version = default_machine_image_version
78
93
  if default_machine_type is not None:
@@ -90,6 +105,69 @@ class V1CreateProjectRequest(object):
90
105
  if quotas is not None:
91
106
  self.quotas = quotas
92
107
 
108
+ @property
109
+ def allow_credits_auto_replenish(self) -> 'bool':
110
+ """Gets the allow_credits_auto_replenish of this V1CreateProjectRequest. # noqa: E501
111
+
112
+
113
+ :return: The allow_credits_auto_replenish of this V1CreateProjectRequest. # noqa: E501
114
+ :rtype: bool
115
+ """
116
+ return self._allow_credits_auto_replenish
117
+
118
+ @allow_credits_auto_replenish.setter
119
+ def allow_credits_auto_replenish(self, allow_credits_auto_replenish: 'bool'):
120
+ """Sets the allow_credits_auto_replenish of this V1CreateProjectRequest.
121
+
122
+
123
+ :param allow_credits_auto_replenish: The allow_credits_auto_replenish of this V1CreateProjectRequest. # noqa: E501
124
+ :type: bool
125
+ """
126
+
127
+ self._allow_credits_auto_replenish = allow_credits_auto_replenish
128
+
129
+ @property
130
+ def auto_replenish_amount(self) -> 'float':
131
+ """Gets the auto_replenish_amount of this V1CreateProjectRequest. # noqa: E501
132
+
133
+
134
+ :return: The auto_replenish_amount of this V1CreateProjectRequest. # noqa: E501
135
+ :rtype: float
136
+ """
137
+ return self._auto_replenish_amount
138
+
139
+ @auto_replenish_amount.setter
140
+ def auto_replenish_amount(self, auto_replenish_amount: 'float'):
141
+ """Sets the auto_replenish_amount of this V1CreateProjectRequest.
142
+
143
+
144
+ :param auto_replenish_amount: The auto_replenish_amount of this V1CreateProjectRequest. # noqa: E501
145
+ :type: float
146
+ """
147
+
148
+ self._auto_replenish_amount = auto_replenish_amount
149
+
150
+ @property
151
+ def auto_replenish_threshold(self) -> 'float':
152
+ """Gets the auto_replenish_threshold of this V1CreateProjectRequest. # noqa: E501
153
+
154
+
155
+ :return: The auto_replenish_threshold of this V1CreateProjectRequest. # noqa: E501
156
+ :rtype: float
157
+ """
158
+ return self._auto_replenish_threshold
159
+
160
+ @auto_replenish_threshold.setter
161
+ def auto_replenish_threshold(self, auto_replenish_threshold: 'float'):
162
+ """Sets the auto_replenish_threshold of this V1CreateProjectRequest.
163
+
164
+
165
+ :param auto_replenish_threshold: The auto_replenish_threshold of this V1CreateProjectRequest. # noqa: E501
166
+ :type: float
167
+ """
168
+
169
+ self._auto_replenish_threshold = auto_replenish_threshold
170
+
93
171
  @property
94
172
  def default_machine_image_version(self) -> 'str':
95
173
  """Gets the default_machine_image_version of this V1CreateProjectRequest. # noqa: E501
@@ -49,8 +49,10 @@ class V1Message(object):
49
49
  'created_at': 'datetime',
50
50
  'executable': 'bool',
51
51
  'id': 'str',
52
+ 'internal_message': 'bool',
52
53
  'metadata': 'dict(str, str)',
53
54
  'model': 'str',
55
+ 'parent_message_id': 'str',
54
56
  'prompt_tokens': 'str',
55
57
  'throughput': 'float'
56
58
  }
@@ -64,13 +66,15 @@ class V1Message(object):
64
66
  'created_at': 'createdAt',
65
67
  'executable': 'executable',
66
68
  'id': 'id',
69
+ 'internal_message': 'internalMessage',
67
70
  'metadata': 'metadata',
68
71
  'model': 'model',
72
+ 'parent_message_id': 'parentMessageId',
69
73
  'prompt_tokens': 'promptTokens',
70
74
  'throughput': 'throughput'
71
75
  }
72
76
 
73
- def __init__(self, assistant_id: 'str' =None, author: 'V1MessageAuthor' =None, completion_tokens: 'str' =None, content: 'list[V1MessageContent]' =None, conversation_id: 'str' =None, created_at: 'datetime' =None, executable: 'bool' =None, id: 'str' =None, metadata: 'dict(str, str)' =None, model: 'str' =None, prompt_tokens: 'str' =None, throughput: 'float' =None): # noqa: E501
77
+ def __init__(self, assistant_id: 'str' =None, author: 'V1MessageAuthor' =None, completion_tokens: 'str' =None, content: 'list[V1MessageContent]' =None, conversation_id: 'str' =None, created_at: 'datetime' =None, executable: 'bool' =None, id: 'str' =None, internal_message: 'bool' =None, metadata: 'dict(str, str)' =None, model: 'str' =None, parent_message_id: 'str' =None, prompt_tokens: 'str' =None, throughput: 'float' =None): # noqa: E501
74
78
  """V1Message - a model defined in Swagger""" # noqa: E501
75
79
  self._assistant_id = None
76
80
  self._author = None
@@ -80,8 +84,10 @@ class V1Message(object):
80
84
  self._created_at = None
81
85
  self._executable = None
82
86
  self._id = None
87
+ self._internal_message = None
83
88
  self._metadata = None
84
89
  self._model = None
90
+ self._parent_message_id = None
85
91
  self._prompt_tokens = None
86
92
  self._throughput = None
87
93
  self.discriminator = None
@@ -101,10 +107,14 @@ class V1Message(object):
101
107
  self.executable = executable
102
108
  if id is not None:
103
109
  self.id = id
110
+ if internal_message is not None:
111
+ self.internal_message = internal_message
104
112
  if metadata is not None:
105
113
  self.metadata = metadata
106
114
  if model is not None:
107
115
  self.model = model
116
+ if parent_message_id is not None:
117
+ self.parent_message_id = parent_message_id
108
118
  if prompt_tokens is not None:
109
119
  self.prompt_tokens = prompt_tokens
110
120
  if throughput is not None:
@@ -278,6 +288,27 @@ class V1Message(object):
278
288
 
279
289
  self._id = id
280
290
 
291
+ @property
292
+ def internal_message(self) -> 'bool':
293
+ """Gets the internal_message of this V1Message. # noqa: E501
294
+
295
+
296
+ :return: The internal_message of this V1Message. # noqa: E501
297
+ :rtype: bool
298
+ """
299
+ return self._internal_message
300
+
301
+ @internal_message.setter
302
+ def internal_message(self, internal_message: 'bool'):
303
+ """Sets the internal_message of this V1Message.
304
+
305
+
306
+ :param internal_message: The internal_message of this V1Message. # noqa: E501
307
+ :type: bool
308
+ """
309
+
310
+ self._internal_message = internal_message
311
+
281
312
  @property
282
313
  def metadata(self) -> 'dict(str, str)':
283
314
  """Gets the metadata of this V1Message. # noqa: E501
@@ -320,6 +351,27 @@ class V1Message(object):
320
351
 
321
352
  self._model = model
322
353
 
354
+ @property
355
+ def parent_message_id(self) -> 'str':
356
+ """Gets the parent_message_id of this V1Message. # noqa: E501
357
+
358
+
359
+ :return: The parent_message_id of this V1Message. # noqa: E501
360
+ :rtype: str
361
+ """
362
+ return self._parent_message_id
363
+
364
+ @parent_message_id.setter
365
+ def parent_message_id(self, parent_message_id: 'str'):
366
+ """Sets the parent_message_id of this V1Message.
367
+
368
+
369
+ :param parent_message_id: The parent_message_id of this V1Message. # noqa: E501
370
+ :type: str
371
+ """
372
+
373
+ self._parent_message_id = parent_message_id
374
+
323
375
  @property
324
376
  def prompt_tokens(self) -> 'str':
325
377
  """Gets the prompt_tokens of this V1Message. # noqa: E501
@@ -46,6 +46,7 @@ class V1RoutingTelemetry(object):
46
46
  'method': 'str',
47
47
  'path': 'str',
48
48
  'received_at': 'datetime',
49
+ 'resource_id': 'str',
49
50
  'status_code': 'int'
50
51
  }
51
52
 
@@ -55,16 +56,18 @@ class V1RoutingTelemetry(object):
55
56
  'method': 'method',
56
57
  'path': 'path',
57
58
  'received_at': 'receivedAt',
59
+ 'resource_id': 'resourceId',
58
60
  'status_code': 'statusCode'
59
61
  }
60
62
 
61
- def __init__(self, duration: 'float' =None, id: 'str' =None, method: 'str' =None, path: 'str' =None, received_at: 'datetime' =None, status_code: 'int' =None): # noqa: E501
63
+ def __init__(self, duration: 'float' =None, id: 'str' =None, method: 'str' =None, path: 'str' =None, received_at: 'datetime' =None, resource_id: 'str' =None, status_code: 'int' =None): # noqa: E501
62
64
  """V1RoutingTelemetry - a model defined in Swagger""" # noqa: E501
63
65
  self._duration = None
64
66
  self._id = None
65
67
  self._method = None
66
68
  self._path = None
67
69
  self._received_at = None
70
+ self._resource_id = None
68
71
  self._status_code = None
69
72
  self.discriminator = None
70
73
  if duration is not None:
@@ -77,6 +80,8 @@ class V1RoutingTelemetry(object):
77
80
  self.path = path
78
81
  if received_at is not None:
79
82
  self.received_at = received_at
83
+ if resource_id is not None:
84
+ self.resource_id = resource_id
80
85
  if status_code is not None:
81
86
  self.status_code = status_code
82
87
 
@@ -185,6 +190,27 @@ class V1RoutingTelemetry(object):
185
190
 
186
191
  self._received_at = received_at
187
192
 
193
+ @property
194
+ def resource_id(self) -> 'str':
195
+ """Gets the resource_id of this V1RoutingTelemetry. # noqa: E501
196
+
197
+
198
+ :return: The resource_id of this V1RoutingTelemetry. # noqa: E501
199
+ :rtype: str
200
+ """
201
+ return self._resource_id
202
+
203
+ @resource_id.setter
204
+ def resource_id(self, resource_id: 'str'):
205
+ """Sets the resource_id of this V1RoutingTelemetry.
206
+
207
+
208
+ :param resource_id: The resource_id of this V1RoutingTelemetry. # noqa: E501
209
+ :type: str
210
+ """
211
+
212
+ self._resource_id = resource_id
213
+
188
214
  @property
189
215
  def status_code(self) -> 'int':
190
216
  """Gets the status_code of this V1RoutingTelemetry. # noqa: E501