lightning-sdk 2025.7.9__py3-none-any.whl → 2025.7.17__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 (42) hide show
  1. lightning_sdk/__init__.py +1 -1
  2. lightning_sdk/api/llm_api.py +15 -6
  3. lightning_sdk/job/base.py +30 -1
  4. lightning_sdk/lightning_cloud/openapi/__init__.py +7 -1
  5. lightning_sdk/lightning_cloud/openapi/api/billing_service_api.py +109 -0
  6. lightning_sdk/lightning_cloud/openapi/api/cluster_service_api.py +5 -1
  7. lightning_sdk/lightning_cloud/openapi/api/user_service_api.py +11 -11
  8. lightning_sdk/lightning_cloud/openapi/models/__init__.py +7 -1
  9. lightning_sdk/lightning_cloud/openapi/models/assistant_id_conversations_body.py +29 -3
  10. lightning_sdk/lightning_cloud/openapi/models/project_id_storage_body.py +1 -27
  11. lightning_sdk/lightning_cloud/openapi/models/protobuf_null_value.py +102 -0
  12. lightning_sdk/lightning_cloud/openapi/models/storage_complete_body.py +1 -27
  13. lightning_sdk/lightning_cloud/openapi/models/uploads_upload_id_body1.py +3 -55
  14. lightning_sdk/lightning_cloud/openapi/models/{v1_list_new_features_for_user_response.py → v1_ai_pod_v1.py} +23 -23
  15. lightning_sdk/lightning_cloud/openapi/models/v1_artifact.py +27 -1
  16. lightning_sdk/lightning_cloud/openapi/models/v1_assistant_session_daily_aggregated.py +357 -0
  17. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_provider.py +1 -0
  18. lightning_sdk/lightning_cloud/openapi/models/v1_cluster_spec.py +27 -1
  19. lightning_sdk/lightning_cloud/openapi/models/v1_cluster_type.py +1 -0
  20. lightning_sdk/lightning_cloud/openapi/models/v1_complete_upload.py +3 -55
  21. lightning_sdk/lightning_cloud/openapi/models/v1_external_cluster_spec.py +27 -1
  22. lightning_sdk/lightning_cloud/openapi/models/v1_function_tool.py +175 -0
  23. lightning_sdk/lightning_cloud/openapi/models/v1_get_artifacts_page_response.py +29 -3
  24. lightning_sdk/lightning_cloud/openapi/models/v1_get_clickhouse_assistant_session_daily_aggregated_response.py +201 -0
  25. lightning_sdk/lightning_cloud/openapi/models/v1_lightningapp_instance_artifact.py +27 -1
  26. lightning_sdk/lightning_cloud/openapi/models/v1_list_notification_dialogs_response.py +149 -0
  27. lightning_sdk/lightning_cloud/openapi/models/v1_message.py +27 -1
  28. lightning_sdk/lightning_cloud/openapi/models/v1_presigned_url.py +1 -53
  29. lightning_sdk/lightning_cloud/openapi/models/v1_project.py +27 -1
  30. lightning_sdk/lightning_cloud/openapi/models/v1_tool.py +149 -0
  31. lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +131 -53
  32. lightning_sdk/lightning_cloud/openapi/models/v1_volume.py +27 -1
  33. lightning_sdk/lightning_cloud/utils/data_connection.py +57 -3
  34. lightning_sdk/llm/llm.py +32 -8
  35. lightning_sdk/llm/public_assistants.json +3 -1
  36. lightning_sdk/machine.py +12 -1
  37. {lightning_sdk-2025.7.9.dist-info → lightning_sdk-2025.7.17.dist-info}/METADATA +1 -1
  38. {lightning_sdk-2025.7.9.dist-info → lightning_sdk-2025.7.17.dist-info}/RECORD +42 -36
  39. {lightning_sdk-2025.7.9.dist-info → lightning_sdk-2025.7.17.dist-info}/LICENSE +0 -0
  40. {lightning_sdk-2025.7.9.dist-info → lightning_sdk-2025.7.17.dist-info}/WHEEL +0 -0
  41. {lightning_sdk-2025.7.9.dist-info → lightning_sdk-2025.7.17.dist-info}/entry_points.txt +0 -0
  42. {lightning_sdk-2025.7.9.dist-info → lightning_sdk-2025.7.17.dist-info}/top_level.txt +0 -0
@@ -41,6 +41,7 @@ class V1Message(object):
41
41
  and the value is json key in definition.
42
42
  """
43
43
  swagger_types = {
44
+ 'account_id': 'str',
44
45
  'assistant_id': 'str',
45
46
  'author': 'V1MessageAuthor',
46
47
  'completion_tokens': 'str',
@@ -58,6 +59,7 @@ class V1Message(object):
58
59
  }
59
60
 
60
61
  attribute_map = {
62
+ 'account_id': 'accountId',
61
63
  'assistant_id': 'assistantId',
62
64
  'author': 'author',
63
65
  'completion_tokens': 'completionTokens',
@@ -74,8 +76,9 @@ class V1Message(object):
74
76
  'throughput': 'throughput'
75
77
  }
76
78
 
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
79
+ def __init__(self, account_id: 'str' =None, 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
78
80
  """V1Message - a model defined in Swagger""" # noqa: E501
81
+ self._account_id = None
79
82
  self._assistant_id = None
80
83
  self._author = None
81
84
  self._completion_tokens = None
@@ -91,6 +94,8 @@ class V1Message(object):
91
94
  self._prompt_tokens = None
92
95
  self._throughput = None
93
96
  self.discriminator = None
97
+ if account_id is not None:
98
+ self.account_id = account_id
94
99
  if assistant_id is not None:
95
100
  self.assistant_id = assistant_id
96
101
  if author is not None:
@@ -120,6 +125,27 @@ class V1Message(object):
120
125
  if throughput is not None:
121
126
  self.throughput = throughput
122
127
 
128
+ @property
129
+ def account_id(self) -> 'str':
130
+ """Gets the account_id of this V1Message. # noqa: E501
131
+
132
+
133
+ :return: The account_id of this V1Message. # noqa: E501
134
+ :rtype: str
135
+ """
136
+ return self._account_id
137
+
138
+ @account_id.setter
139
+ def account_id(self, account_id: 'str'):
140
+ """Sets the account_id of this V1Message.
141
+
142
+
143
+ :param account_id: The account_id of this V1Message. # noqa: E501
144
+ :type: str
145
+ """
146
+
147
+ self._account_id = account_id
148
+
123
149
  @property
124
150
  def assistant_id(self) -> 'str':
125
151
  """Gets the assistant_id of this V1Message. # noqa: E501
@@ -41,56 +41,25 @@ class V1PresignedUrl(object):
41
41
  and the value is json key in definition.
42
42
  """
43
43
  swagger_types = {
44
- 'cluster_id': 'str',
45
44
  'part_number': 'str',
46
- 'upload_id': 'str',
47
45
  'url': 'str'
48
46
  }
49
47
 
50
48
  attribute_map = {
51
- 'cluster_id': 'clusterId',
52
49
  'part_number': 'partNumber',
53
- 'upload_id': 'uploadId',
54
50
  'url': 'url'
55
51
  }
56
52
 
57
- def __init__(self, cluster_id: 'str' =None, part_number: 'str' =None, upload_id: 'str' =None, url: 'str' =None): # noqa: E501
53
+ def __init__(self, part_number: 'str' =None, url: 'str' =None): # noqa: E501
58
54
  """V1PresignedUrl - a model defined in Swagger""" # noqa: E501
59
- self._cluster_id = None
60
55
  self._part_number = None
61
- self._upload_id = None
62
56
  self._url = None
63
57
  self.discriminator = None
64
- if cluster_id is not None:
65
- self.cluster_id = cluster_id
66
58
  if part_number is not None:
67
59
  self.part_number = part_number
68
- if upload_id is not None:
69
- self.upload_id = upload_id
70
60
  if url is not None:
71
61
  self.url = url
72
62
 
73
- @property
74
- def cluster_id(self) -> 'str':
75
- """Gets the cluster_id of this V1PresignedUrl. # noqa: E501
76
-
77
-
78
- :return: The cluster_id of this V1PresignedUrl. # noqa: E501
79
- :rtype: str
80
- """
81
- return self._cluster_id
82
-
83
- @cluster_id.setter
84
- def cluster_id(self, cluster_id: 'str'):
85
- """Sets the cluster_id of this V1PresignedUrl.
86
-
87
-
88
- :param cluster_id: The cluster_id of this V1PresignedUrl. # noqa: E501
89
- :type: str
90
- """
91
-
92
- self._cluster_id = cluster_id
93
-
94
63
  @property
95
64
  def part_number(self) -> 'str':
96
65
  """Gets the part_number of this V1PresignedUrl. # noqa: E501
@@ -112,27 +81,6 @@ class V1PresignedUrl(object):
112
81
 
113
82
  self._part_number = part_number
114
83
 
115
- @property
116
- def upload_id(self) -> 'str':
117
- """Gets the upload_id of this V1PresignedUrl. # noqa: E501
118
-
119
-
120
- :return: The upload_id of this V1PresignedUrl. # noqa: E501
121
- :rtype: str
122
- """
123
- return self._upload_id
124
-
125
- @upload_id.setter
126
- def upload_id(self, upload_id: 'str'):
127
- """Sets the upload_id of this V1PresignedUrl.
128
-
129
-
130
- :param upload_id: The upload_id of this V1PresignedUrl. # noqa: E501
131
- :type: str
132
- """
133
-
134
- self._upload_id = upload_id
135
-
136
84
  @property
137
85
  def url(self) -> 'str':
138
86
  """Gets the url of this V1PresignedUrl. # noqa: E501
@@ -58,6 +58,7 @@ class V1Project(object):
58
58
  'private': 'bool',
59
59
  'project_settings': 'V1ProjectSettings',
60
60
  'quotas': 'V1Quotas',
61
+ 'requires_uploads_sync': 'bool',
61
62
  'total_size_uploads_bytes': 'str',
62
63
  'updated_at': 'datetime'
63
64
  }
@@ -80,11 +81,12 @@ class V1Project(object):
80
81
  'private': 'private',
81
82
  'project_settings': 'projectSettings',
82
83
  'quotas': 'quotas',
84
+ 'requires_uploads_sync': 'requiresUploadsSync',
83
85
  'total_size_uploads_bytes': 'totalSizeUploadsBytes',
84
86
  'updated_at': 'updatedAt'
85
87
  }
86
88
 
87
- def __init__(self, abac_enabled: 'bool' =None, created_at: 'datetime' =None, creator_id: 'str' =None, current_storage_bytes: 'str' =None, description: 'str' =None, display_name: 'str' =None, free_storage_bytes: 'str' =None, id: 'str' =None, is_default: 'bool' =None, lock_out_uploads: 'bool' =None, name: 'str' =None, number_of_files_uploads: 'str' =None, owner_id: 'str' =None, owner_type: 'V1OwnerType' =None, private: 'bool' =None, project_settings: 'V1ProjectSettings' =None, quotas: 'V1Quotas' =None, total_size_uploads_bytes: 'str' =None, updated_at: 'datetime' =None): # noqa: E501
89
+ def __init__(self, abac_enabled: 'bool' =None, created_at: 'datetime' =None, creator_id: 'str' =None, current_storage_bytes: 'str' =None, description: 'str' =None, display_name: 'str' =None, free_storage_bytes: 'str' =None, id: 'str' =None, is_default: 'bool' =None, lock_out_uploads: 'bool' =None, name: 'str' =None, number_of_files_uploads: 'str' =None, owner_id: 'str' =None, owner_type: 'V1OwnerType' =None, private: 'bool' =None, project_settings: 'V1ProjectSettings' =None, quotas: 'V1Quotas' =None, requires_uploads_sync: 'bool' =None, total_size_uploads_bytes: 'str' =None, updated_at: 'datetime' =None): # noqa: E501
88
90
  """V1Project - a model defined in Swagger""" # noqa: E501
89
91
  self._abac_enabled = None
90
92
  self._created_at = None
@@ -103,6 +105,7 @@ class V1Project(object):
103
105
  self._private = None
104
106
  self._project_settings = None
105
107
  self._quotas = None
108
+ self._requires_uploads_sync = None
106
109
  self._total_size_uploads_bytes = None
107
110
  self._updated_at = None
108
111
  self.discriminator = None
@@ -140,6 +143,8 @@ class V1Project(object):
140
143
  self.project_settings = project_settings
141
144
  if quotas is not None:
142
145
  self.quotas = quotas
146
+ if requires_uploads_sync is not None:
147
+ self.requires_uploads_sync = requires_uploads_sync
143
148
  if total_size_uploads_bytes is not None:
144
149
  self.total_size_uploads_bytes = total_size_uploads_bytes
145
150
  if updated_at is not None:
@@ -502,6 +507,27 @@ class V1Project(object):
502
507
 
503
508
  self._quotas = quotas
504
509
 
510
+ @property
511
+ def requires_uploads_sync(self) -> 'bool':
512
+ """Gets the requires_uploads_sync of this V1Project. # noqa: E501
513
+
514
+
515
+ :return: The requires_uploads_sync of this V1Project. # noqa: E501
516
+ :rtype: bool
517
+ """
518
+ return self._requires_uploads_sync
519
+
520
+ @requires_uploads_sync.setter
521
+ def requires_uploads_sync(self, requires_uploads_sync: 'bool'):
522
+ """Sets the requires_uploads_sync of this V1Project.
523
+
524
+
525
+ :param requires_uploads_sync: The requires_uploads_sync of this V1Project. # noqa: E501
526
+ :type: bool
527
+ """
528
+
529
+ self._requires_uploads_sync = requires_uploads_sync
530
+
505
531
  @property
506
532
  def total_size_uploads_bytes(self) -> 'str':
507
533
  """Gets the total_size_uploads_bytes of this V1Project. # noqa: E501
@@ -0,0 +1,149 @@
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
+ import pprint
21
+ import re # noqa: F401
22
+
23
+ from typing import TYPE_CHECKING
24
+
25
+ import six
26
+
27
+ if TYPE_CHECKING:
28
+ from datetime import datetime
29
+ from lightning_sdk.lightning_cloud.openapi.models import *
30
+
31
+ class V1Tool(object):
32
+ """NOTE: This class is auto generated by the swagger code generator program.
33
+
34
+ Do not edit the class manually.
35
+ """
36
+ """
37
+ Attributes:
38
+ swagger_types (dict): The key is attribute name
39
+ and the value is attribute type.
40
+ attribute_map (dict): The key is attribute name
41
+ and the value is json key in definition.
42
+ """
43
+ swagger_types = {
44
+ 'function': 'V1FunctionTool',
45
+ 'type': 'str'
46
+ }
47
+
48
+ attribute_map = {
49
+ 'function': 'function',
50
+ 'type': 'type'
51
+ }
52
+
53
+ def __init__(self, function: 'V1FunctionTool' =None, type: 'str' =None): # noqa: E501
54
+ """V1Tool - a model defined in Swagger""" # noqa: E501
55
+ self._function = None
56
+ self._type = None
57
+ self.discriminator = None
58
+ if function is not None:
59
+ self.function = function
60
+ if type is not None:
61
+ self.type = type
62
+
63
+ @property
64
+ def function(self) -> 'V1FunctionTool':
65
+ """Gets the function of this V1Tool. # noqa: E501
66
+
67
+
68
+ :return: The function of this V1Tool. # noqa: E501
69
+ :rtype: V1FunctionTool
70
+ """
71
+ return self._function
72
+
73
+ @function.setter
74
+ def function(self, function: 'V1FunctionTool'):
75
+ """Sets the function of this V1Tool.
76
+
77
+
78
+ :param function: The function of this V1Tool. # noqa: E501
79
+ :type: V1FunctionTool
80
+ """
81
+
82
+ self._function = function
83
+
84
+ @property
85
+ def type(self) -> 'str':
86
+ """Gets the type of this V1Tool. # noqa: E501
87
+
88
+
89
+ :return: The type of this V1Tool. # noqa: E501
90
+ :rtype: str
91
+ """
92
+ return self._type
93
+
94
+ @type.setter
95
+ def type(self, type: 'str'):
96
+ """Sets the type of this V1Tool.
97
+
98
+
99
+ :param type: The type of this V1Tool. # noqa: E501
100
+ :type: str
101
+ """
102
+
103
+ self._type = type
104
+
105
+ def to_dict(self) -> dict:
106
+ """Returns the model properties as a dict"""
107
+ result = {}
108
+
109
+ for attr, _ in six.iteritems(self.swagger_types):
110
+ value = getattr(self, attr)
111
+ if isinstance(value, list):
112
+ result[attr] = list(map(
113
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
114
+ value
115
+ ))
116
+ elif hasattr(value, "to_dict"):
117
+ result[attr] = value.to_dict()
118
+ elif isinstance(value, dict):
119
+ result[attr] = dict(map(
120
+ lambda item: (item[0], item[1].to_dict())
121
+ if hasattr(item[1], "to_dict") else item,
122
+ value.items()
123
+ ))
124
+ else:
125
+ result[attr] = value
126
+ if issubclass(V1Tool, dict):
127
+ for key, value in self.items():
128
+ result[key] = value
129
+
130
+ return result
131
+
132
+ def to_str(self) -> str:
133
+ """Returns the string representation of the model"""
134
+ return pprint.pformat(self.to_dict())
135
+
136
+ def __repr__(self) -> str:
137
+ """For `print` and `pprint`"""
138
+ return self.to_str()
139
+
140
+ def __eq__(self, other: 'V1Tool') -> bool:
141
+ """Returns true if both objects are equal"""
142
+ if not isinstance(other, V1Tool):
143
+ return False
144
+
145
+ return self.__dict__ == other.__dict__
146
+
147
+ def __ne__(self, other: 'V1Tool') -> bool:
148
+ """Returns true if both objects are not equal"""
149
+ return not self == other