lightning-sdk 0.2.16__py3-none-any.whl → 0.2.18__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 +6 -2
- lightning_sdk/api/studio_api.py +61 -0
- lightning_sdk/lightning_cloud/openapi/__init__.py +1 -0
- lightning_sdk/lightning_cloud/openapi/api/assistants_service_api.py +5 -1
- lightning_sdk/lightning_cloud/openapi/api/cloud_space_environment_template_service_api.py +97 -0
- lightning_sdk/lightning_cloud/openapi/api/jobs_service_api.py +5 -1
- lightning_sdk/lightning_cloud/openapi/models/__init__.py +1 -0
- lightning_sdk/lightning_cloud/openapi/models/assistant_id_conversations_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/create_deployment_request_defines_a_spec_for_the_job_that_allows_for_autoscaling_jobs.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/deployment_id_alertingpolicies_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/deployment_id_alertingpolicies_body1.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/deployments_id_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_environment_template.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_create_deployment_request.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_data_connection.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_deployment.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_deployment_alerting_policy.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_deployment_alerting_recipients.py +175 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_google_cloud_direct_v1.py +1 -27
- lightning_sdk/lightning_cloud/openapi/models/v1_project.py +1 -27
- lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +53 -27
- lightning_sdk/studio.py +8 -0
- {lightning_sdk-0.2.16.dist-info → lightning_sdk-0.2.18.dist-info}/METADATA +1 -1
- {lightning_sdk-0.2.16.dist-info → lightning_sdk-0.2.18.dist-info}/RECORD +30 -29
- {lightning_sdk-0.2.16.dist-info → lightning_sdk-0.2.18.dist-info}/LICENSE +0 -0
- {lightning_sdk-0.2.16.dist-info → lightning_sdk-0.2.18.dist-info}/WHEEL +0 -0
- {lightning_sdk-0.2.16.dist-info → lightning_sdk-0.2.18.dist-info}/entry_points.txt +0 -0
- {lightning_sdk-0.2.16.dist-info → lightning_sdk-0.2.18.dist-info}/top_level.txt +0 -0
lightning_sdk/__init__.py
CHANGED
lightning_sdk/api/llm_api.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import base64
|
|
2
2
|
import json
|
|
3
|
+
import os
|
|
3
4
|
from typing import Dict, Generator, List, Optional, Union
|
|
4
5
|
|
|
5
6
|
from pip._vendor.urllib3 import HTTPResponse
|
|
@@ -56,10 +57,11 @@ class LLMApi:
|
|
|
56
57
|
except json.JSONDecodeError:
|
|
57
58
|
print("Error decoding JSON:", decoded_line)
|
|
58
59
|
|
|
59
|
-
def _encode_image_bytes_to_data_url(self, image: str
|
|
60
|
+
def _encode_image_bytes_to_data_url(self, image: str) -> str:
|
|
60
61
|
with open(image, "rb") as image_file:
|
|
61
62
|
b64 = base64.b64encode(image_file.read()).decode("utf-8")
|
|
62
|
-
|
|
63
|
+
extension = image.split(".")[-1]
|
|
64
|
+
return f"data:image/{extension};base64,{b64}"
|
|
63
65
|
|
|
64
66
|
def start_conversation(
|
|
65
67
|
self,
|
|
@@ -74,6 +76,7 @@ class LLMApi:
|
|
|
74
76
|
metadata: Optional[Dict[str, str]] = None,
|
|
75
77
|
stream: bool = False,
|
|
76
78
|
) -> Union[V1ConversationResponseChunk, Generator[V1ConversationResponseChunk, None, None]]:
|
|
79
|
+
is_internal_conversation = os.getenv("LIGHTNING_INTERNAL_CONVERSATION", "false").lower() == "true"
|
|
77
80
|
body = {
|
|
78
81
|
"message": {
|
|
79
82
|
"author": {"role": "user"},
|
|
@@ -87,6 +90,7 @@ class LLMApi:
|
|
|
87
90
|
"name": name,
|
|
88
91
|
"stream": stream,
|
|
89
92
|
"metadata": metadata or {},
|
|
93
|
+
"internal_conversation": is_internal_conversation,
|
|
90
94
|
}
|
|
91
95
|
if images:
|
|
92
96
|
for image in images:
|
lightning_sdk/api/studio_api.py
CHANGED
|
@@ -32,6 +32,7 @@ from lightning_sdk.lightning_cloud.openapi import (
|
|
|
32
32
|
IdForkBody1,
|
|
33
33
|
IdStartBody,
|
|
34
34
|
ProjectIdCloudspacesBody,
|
|
35
|
+
V1Assistant,
|
|
35
36
|
V1CloudSpace,
|
|
36
37
|
V1CloudSpaceInstanceConfig,
|
|
37
38
|
V1CloudSpaceSeedFile,
|
|
@@ -47,6 +48,16 @@ from lightning_sdk.lightning_cloud.openapi import (
|
|
|
47
48
|
V1UserRequestedComputeConfig,
|
|
48
49
|
)
|
|
49
50
|
from lightning_sdk.lightning_cloud.openapi.models import ProjectIdEndpointsBody
|
|
51
|
+
from lightning_sdk.lightning_cloud.openapi.models.project_id_agentmanagedendpoints_body import (
|
|
52
|
+
ProjectIdAgentmanagedendpointsBody,
|
|
53
|
+
)
|
|
54
|
+
from lightning_sdk.lightning_cloud.openapi.models.project_id_agents_body import (
|
|
55
|
+
ProjectIdAgentsBody,
|
|
56
|
+
)
|
|
57
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_endpoint import V1Endpoint
|
|
58
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_managed_endpoint import V1ManagedEndpoint
|
|
59
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_managed_model import V1ManagedModel
|
|
60
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_upstream_managed import V1UpstreamManaged
|
|
50
61
|
from lightning_sdk.lightning_cloud.rest_client import LightningClient
|
|
51
62
|
from lightning_sdk.machine import Machine
|
|
52
63
|
|
|
@@ -734,6 +745,56 @@ class StudioApi:
|
|
|
734
745
|
)
|
|
735
746
|
return endpoint.urls[0]
|
|
736
747
|
|
|
748
|
+
def create_assistant(self, studio_id: str, teamspace_id: str, port: int, assistant_name: str) -> V1Assistant:
|
|
749
|
+
target_teamspace = self._client.projects_service_get_project(teamspace_id)
|
|
750
|
+
org_id = ""
|
|
751
|
+
if target_teamspace.owner_type == "ORGANIZATION":
|
|
752
|
+
org_id = target_teamspace.owner_id
|
|
753
|
+
endpoint = self._client.endpoint_service_create_endpoint(
|
|
754
|
+
project_id=teamspace_id,
|
|
755
|
+
body=ProjectIdEndpointsBody(
|
|
756
|
+
ports=[str(port)],
|
|
757
|
+
cloudspace=V1UpstreamCloudSpace(
|
|
758
|
+
cloudspace_id=studio_id,
|
|
759
|
+
port=str(port),
|
|
760
|
+
type=V1EndpointType.PLUGIN_API,
|
|
761
|
+
),
|
|
762
|
+
),
|
|
763
|
+
)
|
|
764
|
+
valid_url = endpoint.urls[0]
|
|
765
|
+
managed_endpoint = self._client.assistants_service_create_assistant_managed_endpoint(
|
|
766
|
+
body=ProjectIdAgentmanagedendpointsBody(
|
|
767
|
+
endpoint=V1ManagedEndpoint(
|
|
768
|
+
name=assistant_name,
|
|
769
|
+
base_url=valid_url + "/v1",
|
|
770
|
+
models_metadata=[
|
|
771
|
+
V1ManagedModel(
|
|
772
|
+
name=assistant_name,
|
|
773
|
+
)
|
|
774
|
+
],
|
|
775
|
+
),
|
|
776
|
+
org_id=org_id,
|
|
777
|
+
),
|
|
778
|
+
project_id=teamspace_id,
|
|
779
|
+
)
|
|
780
|
+
|
|
781
|
+
body = ProjectIdAgentsBody(
|
|
782
|
+
endpoint=V1Endpoint(
|
|
783
|
+
cloudspace=V1UpstreamCloudSpace(cloudspace_id=studio_id),
|
|
784
|
+
name=assistant_name,
|
|
785
|
+
managed=V1UpstreamManaged(id=managed_endpoint.endpoint.id),
|
|
786
|
+
),
|
|
787
|
+
name=assistant_name,
|
|
788
|
+
model=assistant_name,
|
|
789
|
+
cloudspace_id=studio_id,
|
|
790
|
+
model_provider="",
|
|
791
|
+
)
|
|
792
|
+
|
|
793
|
+
return self._client.assistants_service_create_assistant(
|
|
794
|
+
body=body,
|
|
795
|
+
project_id=teamspace_id,
|
|
796
|
+
)
|
|
797
|
+
|
|
737
798
|
def _create_app(
|
|
738
799
|
self, studio_id: str, teamspace_id: str, cloud_account: str, plugin_type: str, **other_arguments: Any
|
|
739
800
|
) -> Externalv1LightningappInstance:
|
|
@@ -449,6 +449,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_deployment_alerting_policy_
|
|
|
449
449
|
from lightning_sdk.lightning_cloud.openapi.models.v1_deployment_alerting_policy_operation import V1DeploymentAlertingPolicyOperation
|
|
450
450
|
from lightning_sdk.lightning_cloud.openapi.models.v1_deployment_alerting_policy_severity import V1DeploymentAlertingPolicySeverity
|
|
451
451
|
from lightning_sdk.lightning_cloud.openapi.models.v1_deployment_alerting_policy_type import V1DeploymentAlertingPolicyType
|
|
452
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_deployment_alerting_recipients import V1DeploymentAlertingRecipients
|
|
452
453
|
from lightning_sdk.lightning_cloud.openapi.models.v1_deployment_details import V1DeploymentDetails
|
|
453
454
|
from lightning_sdk.lightning_cloud.openapi.models.v1_deployment_event import V1DeploymentEvent
|
|
454
455
|
from lightning_sdk.lightning_cloud.openapi.models.v1_deployment_event_type import V1DeploymentEventType
|
|
@@ -1274,6 +1274,7 @@ class AssistantsServiceApi(object):
|
|
|
1274
1274
|
:param async_req bool
|
|
1275
1275
|
:param str assistant_id: (required)
|
|
1276
1276
|
:param str page_token:
|
|
1277
|
+
:param bool filter_internal:
|
|
1277
1278
|
:return: V1ListConversationsResponse
|
|
1278
1279
|
If the method is called asynchronously,
|
|
1279
1280
|
returns the request thread.
|
|
@@ -1296,12 +1297,13 @@ class AssistantsServiceApi(object):
|
|
|
1296
1297
|
:param async_req bool
|
|
1297
1298
|
:param str assistant_id: (required)
|
|
1298
1299
|
:param str page_token:
|
|
1300
|
+
:param bool filter_internal:
|
|
1299
1301
|
:return: V1ListConversationsResponse
|
|
1300
1302
|
If the method is called asynchronously,
|
|
1301
1303
|
returns the request thread.
|
|
1302
1304
|
"""
|
|
1303
1305
|
|
|
1304
|
-
all_params = ['assistant_id', 'page_token'] # noqa: E501
|
|
1306
|
+
all_params = ['assistant_id', 'page_token', 'filter_internal'] # noqa: E501
|
|
1305
1307
|
all_params.append('async_req')
|
|
1306
1308
|
all_params.append('_return_http_data_only')
|
|
1307
1309
|
all_params.append('_preload_content')
|
|
@@ -1330,6 +1332,8 @@ class AssistantsServiceApi(object):
|
|
|
1330
1332
|
query_params = []
|
|
1331
1333
|
if 'page_token' in params:
|
|
1332
1334
|
query_params.append(('pageToken', params['page_token'])) # noqa: E501
|
|
1335
|
+
if 'filter_internal' in params:
|
|
1336
|
+
query_params.append(('filterInternal', params['filter_internal'])) # noqa: E501
|
|
1333
1337
|
|
|
1334
1338
|
header_params = {}
|
|
1335
1339
|
|
|
@@ -431,6 +431,103 @@ class CloudSpaceEnvironmentTemplateServiceApi(object):
|
|
|
431
431
|
_request_timeout=params.get('_request_timeout'),
|
|
432
432
|
collection_formats=collection_formats)
|
|
433
433
|
|
|
434
|
+
def cloud_space_environment_template_service_list_managed_cloud_space_environment_templates(self, **kwargs) -> 'V1ListCloudSpaceEnvironmentTemplatesResponse': # noqa: E501
|
|
435
|
+
"""cloud_space_environment_template_service_list_managed_cloud_space_environment_templates # noqa: E501
|
|
436
|
+
|
|
437
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
438
|
+
asynchronous HTTP request, please pass async_req=True
|
|
439
|
+
>>> thread = api.cloud_space_environment_template_service_list_managed_cloud_space_environment_templates(async_req=True)
|
|
440
|
+
>>> result = thread.get()
|
|
441
|
+
|
|
442
|
+
:param async_req bool
|
|
443
|
+
:param str org_id:
|
|
444
|
+
:param str page_token:
|
|
445
|
+
:param int limit:
|
|
446
|
+
:return: V1ListCloudSpaceEnvironmentTemplatesResponse
|
|
447
|
+
If the method is called asynchronously,
|
|
448
|
+
returns the request thread.
|
|
449
|
+
"""
|
|
450
|
+
kwargs['_return_http_data_only'] = True
|
|
451
|
+
if kwargs.get('async_req'):
|
|
452
|
+
return self.cloud_space_environment_template_service_list_managed_cloud_space_environment_templates_with_http_info(**kwargs) # noqa: E501
|
|
453
|
+
else:
|
|
454
|
+
(data) = self.cloud_space_environment_template_service_list_managed_cloud_space_environment_templates_with_http_info(**kwargs) # noqa: E501
|
|
455
|
+
return data
|
|
456
|
+
|
|
457
|
+
def cloud_space_environment_template_service_list_managed_cloud_space_environment_templates_with_http_info(self, **kwargs) -> 'V1ListCloudSpaceEnvironmentTemplatesResponse': # noqa: E501
|
|
458
|
+
"""cloud_space_environment_template_service_list_managed_cloud_space_environment_templates # noqa: E501
|
|
459
|
+
|
|
460
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
461
|
+
asynchronous HTTP request, please pass async_req=True
|
|
462
|
+
>>> thread = api.cloud_space_environment_template_service_list_managed_cloud_space_environment_templates_with_http_info(async_req=True)
|
|
463
|
+
>>> result = thread.get()
|
|
464
|
+
|
|
465
|
+
:param async_req bool
|
|
466
|
+
:param str org_id:
|
|
467
|
+
:param str page_token:
|
|
468
|
+
:param int limit:
|
|
469
|
+
:return: V1ListCloudSpaceEnvironmentTemplatesResponse
|
|
470
|
+
If the method is called asynchronously,
|
|
471
|
+
returns the request thread.
|
|
472
|
+
"""
|
|
473
|
+
|
|
474
|
+
all_params = ['org_id', 'page_token', 'limit'] # noqa: E501
|
|
475
|
+
all_params.append('async_req')
|
|
476
|
+
all_params.append('_return_http_data_only')
|
|
477
|
+
all_params.append('_preload_content')
|
|
478
|
+
all_params.append('_request_timeout')
|
|
479
|
+
|
|
480
|
+
params = locals()
|
|
481
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
482
|
+
if key not in all_params:
|
|
483
|
+
raise TypeError(
|
|
484
|
+
"Got an unexpected keyword argument '%s'"
|
|
485
|
+
" to method cloud_space_environment_template_service_list_managed_cloud_space_environment_templates" % key
|
|
486
|
+
)
|
|
487
|
+
params[key] = val
|
|
488
|
+
del params['kwargs']
|
|
489
|
+
|
|
490
|
+
collection_formats = {}
|
|
491
|
+
|
|
492
|
+
path_params = {}
|
|
493
|
+
|
|
494
|
+
query_params = []
|
|
495
|
+
if 'org_id' in params:
|
|
496
|
+
query_params.append(('orgId', params['org_id'])) # noqa: E501
|
|
497
|
+
if 'page_token' in params:
|
|
498
|
+
query_params.append(('pageToken', params['page_token'])) # noqa: E501
|
|
499
|
+
if 'limit' in params:
|
|
500
|
+
query_params.append(('limit', params['limit'])) # noqa: E501
|
|
501
|
+
|
|
502
|
+
header_params = {}
|
|
503
|
+
|
|
504
|
+
form_params = []
|
|
505
|
+
local_var_files = {}
|
|
506
|
+
|
|
507
|
+
body_params = None
|
|
508
|
+
# HTTP header `Accept`
|
|
509
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
510
|
+
['application/json']) # noqa: E501
|
|
511
|
+
|
|
512
|
+
# Authentication setting
|
|
513
|
+
auth_settings = [] # noqa: E501
|
|
514
|
+
|
|
515
|
+
return self.api_client.call_api(
|
|
516
|
+
'/v1/cloudspaces/environment-templates/managed', 'GET',
|
|
517
|
+
path_params,
|
|
518
|
+
query_params,
|
|
519
|
+
header_params,
|
|
520
|
+
body=body_params,
|
|
521
|
+
post_params=form_params,
|
|
522
|
+
files=local_var_files,
|
|
523
|
+
response_type='V1ListCloudSpaceEnvironmentTemplatesResponse', # noqa: E501
|
|
524
|
+
auth_settings=auth_settings,
|
|
525
|
+
async_req=params.get('async_req'),
|
|
526
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
527
|
+
_preload_content=params.get('_preload_content', True),
|
|
528
|
+
_request_timeout=params.get('_request_timeout'),
|
|
529
|
+
collection_formats=collection_formats)
|
|
530
|
+
|
|
434
531
|
def cloud_space_environment_template_service_update_cloud_space_environment_template(self, body: 'Update', id: 'str', **kwargs) -> 'V1CloudSpaceEnvironmentTemplate': # noqa: E501
|
|
435
532
|
"""cloud_space_environment_template_service_update_cloud_space_environment_template # noqa: E501
|
|
436
533
|
|
|
@@ -3361,6 +3361,7 @@ class JobsServiceApi(object):
|
|
|
3361
3361
|
:param async_req bool
|
|
3362
3362
|
:param str project_id: (required)
|
|
3363
3363
|
:param str id: (required)
|
|
3364
|
+
:param str first_request_id:
|
|
3364
3365
|
:param str last_request_id:
|
|
3365
3366
|
:param datetime start:
|
|
3366
3367
|
:param datetime end:
|
|
@@ -3389,6 +3390,7 @@ class JobsServiceApi(object):
|
|
|
3389
3390
|
:param async_req bool
|
|
3390
3391
|
:param str project_id: (required)
|
|
3391
3392
|
:param str id: (required)
|
|
3393
|
+
:param str first_request_id:
|
|
3392
3394
|
:param str last_request_id:
|
|
3393
3395
|
:param datetime start:
|
|
3394
3396
|
:param datetime end:
|
|
@@ -3400,7 +3402,7 @@ class JobsServiceApi(object):
|
|
|
3400
3402
|
returns the request thread.
|
|
3401
3403
|
"""
|
|
3402
3404
|
|
|
3403
|
-
all_params = ['project_id', 'id', 'last_request_id', 'start', 'end', 'path', 'status_code', 'limit'] # noqa: E501
|
|
3405
|
+
all_params = ['project_id', 'id', 'first_request_id', 'last_request_id', 'start', 'end', 'path', 'status_code', 'limit'] # noqa: E501
|
|
3404
3406
|
all_params.append('async_req')
|
|
3405
3407
|
all_params.append('_return_http_data_only')
|
|
3406
3408
|
all_params.append('_preload_content')
|
|
@@ -3433,6 +3435,8 @@ class JobsServiceApi(object):
|
|
|
3433
3435
|
path_params['id'] = params['id'] # noqa: E501
|
|
3434
3436
|
|
|
3435
3437
|
query_params = []
|
|
3438
|
+
if 'first_request_id' in params:
|
|
3439
|
+
query_params.append(('firstRequestId', params['first_request_id'])) # noqa: E501
|
|
3436
3440
|
if 'last_request_id' in params:
|
|
3437
3441
|
query_params.append(('lastRequestId', params['last_request_id'])) # noqa: E501
|
|
3438
3442
|
if 'start' in params:
|
|
@@ -405,6 +405,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_deployment_alerting_policy_
|
|
|
405
405
|
from lightning_sdk.lightning_cloud.openapi.models.v1_deployment_alerting_policy_operation import V1DeploymentAlertingPolicyOperation
|
|
406
406
|
from lightning_sdk.lightning_cloud.openapi.models.v1_deployment_alerting_policy_severity import V1DeploymentAlertingPolicySeverity
|
|
407
407
|
from lightning_sdk.lightning_cloud.openapi.models.v1_deployment_alerting_policy_type import V1DeploymentAlertingPolicyType
|
|
408
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_deployment_alerting_recipients import V1DeploymentAlertingRecipients
|
|
408
409
|
from lightning_sdk.lightning_cloud.openapi.models.v1_deployment_details import V1DeploymentDetails
|
|
409
410
|
from lightning_sdk.lightning_cloud.openapi.models.v1_deployment_event import V1DeploymentEvent
|
|
410
411
|
from lightning_sdk.lightning_cloud.openapi.models.v1_deployment_event_type import V1DeploymentEventType
|
|
@@ -44,6 +44,7 @@ class AssistantIdConversationsBody(object):
|
|
|
44
44
|
'auto_name': 'bool',
|
|
45
45
|
'billing_project_id': 'str',
|
|
46
46
|
'conversation_id': 'str',
|
|
47
|
+
'internal_conversation': 'bool',
|
|
47
48
|
'max_tokens': 'str',
|
|
48
49
|
'message': 'V1Message',
|
|
49
50
|
'metadata': 'dict(str, str)',
|
|
@@ -57,6 +58,7 @@ class AssistantIdConversationsBody(object):
|
|
|
57
58
|
'auto_name': 'autoName',
|
|
58
59
|
'billing_project_id': 'billingProjectId',
|
|
59
60
|
'conversation_id': 'conversationId',
|
|
61
|
+
'internal_conversation': 'internalConversation',
|
|
60
62
|
'max_tokens': 'maxTokens',
|
|
61
63
|
'message': 'message',
|
|
62
64
|
'metadata': 'metadata',
|
|
@@ -66,11 +68,12 @@ class AssistantIdConversationsBody(object):
|
|
|
66
68
|
'stream': 'stream'
|
|
67
69
|
}
|
|
68
70
|
|
|
69
|
-
def __init__(self, auto_name: 'bool' =None, billing_project_id: 'str' =None, conversation_id: 'str' =None, max_tokens: 'str' =None, message: 'V1Message' =None, metadata: 'dict(str, str)' =None, name: 'str' =None, parent_message_id: 'str' =None, store: 'bool' =None, stream: 'bool' =None): # noqa: E501
|
|
71
|
+
def __init__(self, auto_name: 'bool' =None, billing_project_id: 'str' =None, conversation_id: 'str' =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, store: 'bool' =None, stream: 'bool' =None): # noqa: E501
|
|
70
72
|
"""AssistantIdConversationsBody - a model defined in Swagger""" # noqa: E501
|
|
71
73
|
self._auto_name = None
|
|
72
74
|
self._billing_project_id = None
|
|
73
75
|
self._conversation_id = None
|
|
76
|
+
self._internal_conversation = None
|
|
74
77
|
self._max_tokens = None
|
|
75
78
|
self._message = None
|
|
76
79
|
self._metadata = None
|
|
@@ -85,6 +88,8 @@ class AssistantIdConversationsBody(object):
|
|
|
85
88
|
self.billing_project_id = billing_project_id
|
|
86
89
|
if conversation_id is not None:
|
|
87
90
|
self.conversation_id = conversation_id
|
|
91
|
+
if internal_conversation is not None:
|
|
92
|
+
self.internal_conversation = internal_conversation
|
|
88
93
|
if max_tokens is not None:
|
|
89
94
|
self.max_tokens = max_tokens
|
|
90
95
|
if message is not None:
|
|
@@ -163,6 +168,27 @@ class AssistantIdConversationsBody(object):
|
|
|
163
168
|
|
|
164
169
|
self._conversation_id = conversation_id
|
|
165
170
|
|
|
171
|
+
@property
|
|
172
|
+
def internal_conversation(self) -> 'bool':
|
|
173
|
+
"""Gets the internal_conversation of this AssistantIdConversationsBody. # noqa: E501
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
:return: The internal_conversation of this AssistantIdConversationsBody. # noqa: E501
|
|
177
|
+
:rtype: bool
|
|
178
|
+
"""
|
|
179
|
+
return self._internal_conversation
|
|
180
|
+
|
|
181
|
+
@internal_conversation.setter
|
|
182
|
+
def internal_conversation(self, internal_conversation: 'bool'):
|
|
183
|
+
"""Sets the internal_conversation of this AssistantIdConversationsBody.
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
:param internal_conversation: The internal_conversation of this AssistantIdConversationsBody. # noqa: E501
|
|
187
|
+
:type: bool
|
|
188
|
+
"""
|
|
189
|
+
|
|
190
|
+
self._internal_conversation = internal_conversation
|
|
191
|
+
|
|
166
192
|
@property
|
|
167
193
|
def max_tokens(self) -> 'str':
|
|
168
194
|
"""Gets the max_tokens of this AssistantIdConversationsBody. # noqa: E501
|
|
@@ -52,6 +52,7 @@ class CreateDeploymentRequestDefinesASpecForTheJobThatAllowsForAutoscalingJobs(o
|
|
|
52
52
|
'name': 'str',
|
|
53
53
|
'parameter_spec': 'V1ParameterizationSpec',
|
|
54
54
|
'parent_template_id': 'str',
|
|
55
|
+
'recipients': 'V1DeploymentAlertingRecipients',
|
|
55
56
|
'replicas': 'int',
|
|
56
57
|
'spec': 'V1JobSpec',
|
|
57
58
|
'strategy': 'V1DeploymentStrategy'
|
|
@@ -69,12 +70,13 @@ class CreateDeploymentRequestDefinesASpecForTheJobThatAllowsForAutoscalingJobs(o
|
|
|
69
70
|
'name': 'name',
|
|
70
71
|
'parameter_spec': 'parameterSpec',
|
|
71
72
|
'parent_template_id': 'parentTemplateId',
|
|
73
|
+
'recipients': 'recipients',
|
|
72
74
|
'replicas': 'replicas',
|
|
73
75
|
'spec': 'spec',
|
|
74
76
|
'strategy': 'strategy'
|
|
75
77
|
}
|
|
76
78
|
|
|
77
|
-
def __init__(self, api_standard: 'str' =None, apis: 'list[V1DeploymentAPI]' =None, autoscaling: 'V1AutoscalingSpec' =None, cloudspace_id: 'str' =None, cluster_id: 'str' =None, endpoint: 'V1Endpoint' =None, from_litserve: 'bool' =None, from_onboarding: 'bool' =None, name: 'str' =None, parameter_spec: 'V1ParameterizationSpec' =None, parent_template_id: 'str' =None, replicas: 'int' =None, spec: 'V1JobSpec' =None, strategy: 'V1DeploymentStrategy' =None): # noqa: E501
|
|
79
|
+
def __init__(self, api_standard: 'str' =None, apis: 'list[V1DeploymentAPI]' =None, autoscaling: 'V1AutoscalingSpec' =None, cloudspace_id: 'str' =None, cluster_id: 'str' =None, endpoint: 'V1Endpoint' =None, from_litserve: 'bool' =None, from_onboarding: 'bool' =None, name: 'str' =None, parameter_spec: 'V1ParameterizationSpec' =None, parent_template_id: 'str' =None, recipients: 'V1DeploymentAlertingRecipients' =None, replicas: 'int' =None, spec: 'V1JobSpec' =None, strategy: 'V1DeploymentStrategy' =None): # noqa: E501
|
|
78
80
|
"""CreateDeploymentRequestDefinesASpecForTheJobThatAllowsForAutoscalingJobs - a model defined in Swagger""" # noqa: E501
|
|
79
81
|
self._api_standard = None
|
|
80
82
|
self._apis = None
|
|
@@ -87,6 +89,7 @@ class CreateDeploymentRequestDefinesASpecForTheJobThatAllowsForAutoscalingJobs(o
|
|
|
87
89
|
self._name = None
|
|
88
90
|
self._parameter_spec = None
|
|
89
91
|
self._parent_template_id = None
|
|
92
|
+
self._recipients = None
|
|
90
93
|
self._replicas = None
|
|
91
94
|
self._spec = None
|
|
92
95
|
self._strategy = None
|
|
@@ -113,6 +116,8 @@ class CreateDeploymentRequestDefinesASpecForTheJobThatAllowsForAutoscalingJobs(o
|
|
|
113
116
|
self.parameter_spec = parameter_spec
|
|
114
117
|
if parent_template_id is not None:
|
|
115
118
|
self.parent_template_id = parent_template_id
|
|
119
|
+
if recipients is not None:
|
|
120
|
+
self.recipients = recipients
|
|
116
121
|
if replicas is not None:
|
|
117
122
|
self.replicas = replicas
|
|
118
123
|
if spec is not None:
|
|
@@ -351,6 +356,27 @@ class CreateDeploymentRequestDefinesASpecForTheJobThatAllowsForAutoscalingJobs(o
|
|
|
351
356
|
|
|
352
357
|
self._parent_template_id = parent_template_id
|
|
353
358
|
|
|
359
|
+
@property
|
|
360
|
+
def recipients(self) -> 'V1DeploymentAlertingRecipients':
|
|
361
|
+
"""Gets the recipients of this CreateDeploymentRequestDefinesASpecForTheJobThatAllowsForAutoscalingJobs. # noqa: E501
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
:return: The recipients of this CreateDeploymentRequestDefinesASpecForTheJobThatAllowsForAutoscalingJobs. # noqa: E501
|
|
365
|
+
:rtype: V1DeploymentAlertingRecipients
|
|
366
|
+
"""
|
|
367
|
+
return self._recipients
|
|
368
|
+
|
|
369
|
+
@recipients.setter
|
|
370
|
+
def recipients(self, recipients: 'V1DeploymentAlertingRecipients'):
|
|
371
|
+
"""Sets the recipients of this CreateDeploymentRequestDefinesASpecForTheJobThatAllowsForAutoscalingJobs.
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
:param recipients: The recipients of this CreateDeploymentRequestDefinesASpecForTheJobThatAllowsForAutoscalingJobs. # noqa: E501
|
|
375
|
+
:type: V1DeploymentAlertingRecipients
|
|
376
|
+
"""
|
|
377
|
+
|
|
378
|
+
self._recipients = recipients
|
|
379
|
+
|
|
354
380
|
@property
|
|
355
381
|
def replicas(self) -> 'int':
|
|
356
382
|
"""Gets the replicas of this CreateDeploymentRequestDefinesASpecForTheJobThatAllowsForAutoscalingJobs. # noqa: E501
|
|
@@ -47,6 +47,7 @@ class DeploymentIdAlertingpoliciesBody(object):
|
|
|
47
47
|
'limit': 'float',
|
|
48
48
|
'name': 'str',
|
|
49
49
|
'operation': 'V1DeploymentAlertingPolicyOperation',
|
|
50
|
+
'recipients': 'V1DeploymentAlertingRecipients',
|
|
50
51
|
'severity': 'V1DeploymentAlertingPolicySeverity',
|
|
51
52
|
'type': 'V1DeploymentAlertingPolicyType',
|
|
52
53
|
'value': 'float'
|
|
@@ -59,12 +60,13 @@ class DeploymentIdAlertingpoliciesBody(object):
|
|
|
59
60
|
'limit': 'limit',
|
|
60
61
|
'name': 'name',
|
|
61
62
|
'operation': 'operation',
|
|
63
|
+
'recipients': 'recipients',
|
|
62
64
|
'severity': 'severity',
|
|
63
65
|
'type': 'type',
|
|
64
66
|
'value': 'value'
|
|
65
67
|
}
|
|
66
68
|
|
|
67
|
-
def __init__(self, description: 'str' =None, frequency: 'V1DeploymentAlertingPolicyFrequency' =None, id: 'str' =None, limit: 'float' =None, name: 'str' =None, operation: 'V1DeploymentAlertingPolicyOperation' =None, severity: 'V1DeploymentAlertingPolicySeverity' =None, type: 'V1DeploymentAlertingPolicyType' =None, value: 'float' =None): # noqa: E501
|
|
69
|
+
def __init__(self, description: 'str' =None, frequency: 'V1DeploymentAlertingPolicyFrequency' =None, id: 'str' =None, limit: 'float' =None, name: 'str' =None, operation: 'V1DeploymentAlertingPolicyOperation' =None, recipients: 'V1DeploymentAlertingRecipients' =None, severity: 'V1DeploymentAlertingPolicySeverity' =None, type: 'V1DeploymentAlertingPolicyType' =None, value: 'float' =None): # noqa: E501
|
|
68
70
|
"""DeploymentIdAlertingpoliciesBody - a model defined in Swagger""" # noqa: E501
|
|
69
71
|
self._description = None
|
|
70
72
|
self._frequency = None
|
|
@@ -72,6 +74,7 @@ class DeploymentIdAlertingpoliciesBody(object):
|
|
|
72
74
|
self._limit = None
|
|
73
75
|
self._name = None
|
|
74
76
|
self._operation = None
|
|
77
|
+
self._recipients = None
|
|
75
78
|
self._severity = None
|
|
76
79
|
self._type = None
|
|
77
80
|
self._value = None
|
|
@@ -88,6 +91,8 @@ class DeploymentIdAlertingpoliciesBody(object):
|
|
|
88
91
|
self.name = name
|
|
89
92
|
if operation is not None:
|
|
90
93
|
self.operation = operation
|
|
94
|
+
if recipients is not None:
|
|
95
|
+
self.recipients = recipients
|
|
91
96
|
if severity is not None:
|
|
92
97
|
self.severity = severity
|
|
93
98
|
if type is not None:
|
|
@@ -221,6 +226,27 @@ class DeploymentIdAlertingpoliciesBody(object):
|
|
|
221
226
|
|
|
222
227
|
self._operation = operation
|
|
223
228
|
|
|
229
|
+
@property
|
|
230
|
+
def recipients(self) -> 'V1DeploymentAlertingRecipients':
|
|
231
|
+
"""Gets the recipients of this DeploymentIdAlertingpoliciesBody. # noqa: E501
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
:return: The recipients of this DeploymentIdAlertingpoliciesBody. # noqa: E501
|
|
235
|
+
:rtype: V1DeploymentAlertingRecipients
|
|
236
|
+
"""
|
|
237
|
+
return self._recipients
|
|
238
|
+
|
|
239
|
+
@recipients.setter
|
|
240
|
+
def recipients(self, recipients: 'V1DeploymentAlertingRecipients'):
|
|
241
|
+
"""Sets the recipients of this DeploymentIdAlertingpoliciesBody.
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
:param recipients: The recipients of this DeploymentIdAlertingpoliciesBody. # noqa: E501
|
|
245
|
+
:type: V1DeploymentAlertingRecipients
|
|
246
|
+
"""
|
|
247
|
+
|
|
248
|
+
self._recipients = recipients
|
|
249
|
+
|
|
224
250
|
@property
|
|
225
251
|
def severity(self) -> 'V1DeploymentAlertingPolicySeverity':
|
|
226
252
|
"""Gets the severity of this DeploymentIdAlertingpoliciesBody. # noqa: E501
|
|
@@ -46,6 +46,7 @@ class DeploymentIdAlertingpoliciesBody1(object):
|
|
|
46
46
|
'limit': 'float',
|
|
47
47
|
'name': 'str',
|
|
48
48
|
'operation': 'V1DeploymentAlertingPolicyOperation',
|
|
49
|
+
'recipients': 'V1DeploymentAlertingRecipients',
|
|
49
50
|
'severity': 'V1DeploymentAlertingPolicySeverity',
|
|
50
51
|
'type': 'V1DeploymentAlertingPolicyType',
|
|
51
52
|
'value': 'float'
|
|
@@ -57,18 +58,20 @@ class DeploymentIdAlertingpoliciesBody1(object):
|
|
|
57
58
|
'limit': 'limit',
|
|
58
59
|
'name': 'name',
|
|
59
60
|
'operation': 'operation',
|
|
61
|
+
'recipients': 'recipients',
|
|
60
62
|
'severity': 'severity',
|
|
61
63
|
'type': 'type',
|
|
62
64
|
'value': 'value'
|
|
63
65
|
}
|
|
64
66
|
|
|
65
|
-
def __init__(self, description: 'str' =None, frequency: 'V1DeploymentAlertingPolicyFrequency' =None, limit: 'float' =None, name: 'str' =None, operation: 'V1DeploymentAlertingPolicyOperation' =None, severity: 'V1DeploymentAlertingPolicySeverity' =None, type: 'V1DeploymentAlertingPolicyType' =None, value: 'float' =None): # noqa: E501
|
|
67
|
+
def __init__(self, description: 'str' =None, frequency: 'V1DeploymentAlertingPolicyFrequency' =None, limit: 'float' =None, name: 'str' =None, operation: 'V1DeploymentAlertingPolicyOperation' =None, recipients: 'V1DeploymentAlertingRecipients' =None, severity: 'V1DeploymentAlertingPolicySeverity' =None, type: 'V1DeploymentAlertingPolicyType' =None, value: 'float' =None): # noqa: E501
|
|
66
68
|
"""DeploymentIdAlertingpoliciesBody1 - a model defined in Swagger""" # noqa: E501
|
|
67
69
|
self._description = None
|
|
68
70
|
self._frequency = None
|
|
69
71
|
self._limit = None
|
|
70
72
|
self._name = None
|
|
71
73
|
self._operation = None
|
|
74
|
+
self._recipients = None
|
|
72
75
|
self._severity = None
|
|
73
76
|
self._type = None
|
|
74
77
|
self._value = None
|
|
@@ -83,6 +86,8 @@ class DeploymentIdAlertingpoliciesBody1(object):
|
|
|
83
86
|
self.name = name
|
|
84
87
|
if operation is not None:
|
|
85
88
|
self.operation = operation
|
|
89
|
+
if recipients is not None:
|
|
90
|
+
self.recipients = recipients
|
|
86
91
|
if severity is not None:
|
|
87
92
|
self.severity = severity
|
|
88
93
|
if type is not None:
|
|
@@ -195,6 +200,27 @@ class DeploymentIdAlertingpoliciesBody1(object):
|
|
|
195
200
|
|
|
196
201
|
self._operation = operation
|
|
197
202
|
|
|
203
|
+
@property
|
|
204
|
+
def recipients(self) -> 'V1DeploymentAlertingRecipients':
|
|
205
|
+
"""Gets the recipients of this DeploymentIdAlertingpoliciesBody1. # noqa: E501
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
:return: The recipients of this DeploymentIdAlertingpoliciesBody1. # noqa: E501
|
|
209
|
+
:rtype: V1DeploymentAlertingRecipients
|
|
210
|
+
"""
|
|
211
|
+
return self._recipients
|
|
212
|
+
|
|
213
|
+
@recipients.setter
|
|
214
|
+
def recipients(self, recipients: 'V1DeploymentAlertingRecipients'):
|
|
215
|
+
"""Sets the recipients of this DeploymentIdAlertingpoliciesBody1.
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
:param recipients: The recipients of this DeploymentIdAlertingpoliciesBody1. # noqa: E501
|
|
219
|
+
:type: V1DeploymentAlertingRecipients
|
|
220
|
+
"""
|
|
221
|
+
|
|
222
|
+
self._recipients = recipients
|
|
223
|
+
|
|
198
224
|
@property
|
|
199
225
|
def severity(self) -> 'V1DeploymentAlertingPolicySeverity':
|
|
200
226
|
"""Gets the severity of this DeploymentIdAlertingpoliciesBody1. # noqa: E501
|
|
@@ -58,6 +58,7 @@ class DeploymentsIdBody(object):
|
|
|
58
58
|
'oncall_notification': 'bool',
|
|
59
59
|
'parameter_spec': 'V1ParameterizationSpec',
|
|
60
60
|
'pipeline_id': 'str',
|
|
61
|
+
'recipients': 'V1DeploymentAlertingRecipients',
|
|
61
62
|
'release_id': 'str',
|
|
62
63
|
'replicas': 'int',
|
|
63
64
|
'spec': 'V1JobSpec',
|
|
@@ -88,6 +89,7 @@ class DeploymentsIdBody(object):
|
|
|
88
89
|
'oncall_notification': 'oncallNotification',
|
|
89
90
|
'parameter_spec': 'parameterSpec',
|
|
90
91
|
'pipeline_id': 'pipelineId',
|
|
92
|
+
'recipients': 'recipients',
|
|
91
93
|
'release_id': 'releaseId',
|
|
92
94
|
'replicas': 'replicas',
|
|
93
95
|
'spec': 'spec',
|
|
@@ -100,7 +102,7 @@ class DeploymentsIdBody(object):
|
|
|
100
102
|
'visibility': 'visibility'
|
|
101
103
|
}
|
|
102
104
|
|
|
103
|
-
def __init__(self, api_standard: 'str' =None, apis: 'list[V1DeploymentAPI]' =None, assistant_id: 'str' =None, autoscaling: 'V1AutoscalingSpec' =None, cloudspace_id: 'str' =None, created_at: 'datetime' =None, current_state: 'V1DeploymentState' =None, debug: 'bool' =None, desired_state: 'V1DeploymentState' =None, endpoint: 'V1Endpoint' =None, is_published: 'bool' =None, managed: 'bool' =None, managed_endpoint_id: 'str' =None, name: 'str' =None, oncall_notification: 'bool' =None, parameter_spec: 'V1ParameterizationSpec' =None, pipeline_id: 'str' =None, release_id: 'str' =None, replicas: 'int' =None, spec: 'V1JobSpec' =None, status: 'V1DeploymentStatus' =None, strategy: 'V1DeploymentStrategy' =None, template_id: 'str' =None, total_cost: 'float' =None, updated_at: 'datetime' =None, user_id: 'str' =None, visibility: 'V1ResourceVisibility' =None): # noqa: E501
|
|
105
|
+
def __init__(self, api_standard: 'str' =None, apis: 'list[V1DeploymentAPI]' =None, assistant_id: 'str' =None, autoscaling: 'V1AutoscalingSpec' =None, cloudspace_id: 'str' =None, created_at: 'datetime' =None, current_state: 'V1DeploymentState' =None, debug: 'bool' =None, desired_state: 'V1DeploymentState' =None, endpoint: 'V1Endpoint' =None, is_published: 'bool' =None, managed: 'bool' =None, managed_endpoint_id: 'str' =None, name: 'str' =None, oncall_notification: 'bool' =None, parameter_spec: 'V1ParameterizationSpec' =None, pipeline_id: 'str' =None, recipients: 'V1DeploymentAlertingRecipients' =None, release_id: 'str' =None, replicas: 'int' =None, spec: 'V1JobSpec' =None, status: 'V1DeploymentStatus' =None, strategy: 'V1DeploymentStrategy' =None, template_id: 'str' =None, total_cost: 'float' =None, updated_at: 'datetime' =None, user_id: 'str' =None, visibility: 'V1ResourceVisibility' =None): # noqa: E501
|
|
104
106
|
"""DeploymentsIdBody - a model defined in Swagger""" # noqa: E501
|
|
105
107
|
self._api_standard = None
|
|
106
108
|
self._apis = None
|
|
@@ -119,6 +121,7 @@ class DeploymentsIdBody(object):
|
|
|
119
121
|
self._oncall_notification = None
|
|
120
122
|
self._parameter_spec = None
|
|
121
123
|
self._pipeline_id = None
|
|
124
|
+
self._recipients = None
|
|
122
125
|
self._release_id = None
|
|
123
126
|
self._replicas = None
|
|
124
127
|
self._spec = None
|
|
@@ -164,6 +167,8 @@ class DeploymentsIdBody(object):
|
|
|
164
167
|
self.parameter_spec = parameter_spec
|
|
165
168
|
if pipeline_id is not None:
|
|
166
169
|
self.pipeline_id = pipeline_id
|
|
170
|
+
if recipients is not None:
|
|
171
|
+
self.recipients = recipients
|
|
167
172
|
if release_id is not None:
|
|
168
173
|
self.release_id = release_id
|
|
169
174
|
if replicas is not None:
|
|
@@ -542,6 +547,27 @@ class DeploymentsIdBody(object):
|
|
|
542
547
|
|
|
543
548
|
self._pipeline_id = pipeline_id
|
|
544
549
|
|
|
550
|
+
@property
|
|
551
|
+
def recipients(self) -> 'V1DeploymentAlertingRecipients':
|
|
552
|
+
"""Gets the recipients of this DeploymentsIdBody. # noqa: E501
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
:return: The recipients of this DeploymentsIdBody. # noqa: E501
|
|
556
|
+
:rtype: V1DeploymentAlertingRecipients
|
|
557
|
+
"""
|
|
558
|
+
return self._recipients
|
|
559
|
+
|
|
560
|
+
@recipients.setter
|
|
561
|
+
def recipients(self, recipients: 'V1DeploymentAlertingRecipients'):
|
|
562
|
+
"""Sets the recipients of this DeploymentsIdBody.
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
:param recipients: The recipients of this DeploymentsIdBody. # noqa: E501
|
|
566
|
+
:type: V1DeploymentAlertingRecipients
|
|
567
|
+
"""
|
|
568
|
+
|
|
569
|
+
self._recipients = recipients
|
|
570
|
+
|
|
545
571
|
@property
|
|
546
572
|
def release_id(self) -> 'str':
|
|
547
573
|
"""Gets the release_id of this DeploymentsIdBody. # noqa: E501
|