h2ogpte 1.6.44rc6__py3-none-any.whl → 1.6.44rc9__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.
h2ogpte/__init__.py CHANGED
@@ -3,7 +3,7 @@ from h2ogpte.h2ogpte import H2OGPTE
3
3
  from h2ogpte.h2ogpte_async import H2OGPTEAsync
4
4
  from h2ogpte.session_async import SessionAsync
5
5
 
6
- __version__ = "1.6.44rc6"
6
+ __version__ = "1.6.44rc9"
7
7
 
8
8
  __all__ = [
9
9
  "H2OGPTE",
h2ogpte/connectors.py CHANGED
@@ -49,22 +49,28 @@ def create_ingest_job_from_cloud_storage(
49
49
  class S3Credential:
50
50
  def __init__(
51
51
  self,
52
- access_key_id: str,
53
- secret_access_key: str,
52
+ access_key_id: str = None,
53
+ secret_access_key: str = None,
54
54
  session_token: str = None,
55
55
  role_arn: str = None,
56
+ external_id: str = None,
57
+ use_irsa: bool = False,
56
58
  ):
57
59
  """
58
60
  Creates an object with S3 credentials.
59
- :param access_key_id: Access Key ID
60
- :param secret_access_key: Secret Access Key
61
+ :param access_key_id: Access Key ID (not required when using IRSA)
62
+ :param secret_access_key: Secret Access Key (not required when using IRSA)
61
63
  :param session_token: Session Token (optional)
62
64
  :param role_arn: Role providing access to the S3 storage
65
+ :param external_id: External ID for cross-account role assumption (optional)
66
+ :param use_irsa: Enable IAM Roles for Service Accounts (IRSA) - set to True to use pod service account
63
67
  """
64
68
  self.access_key_id = access_key_id
65
69
  self.secret_access_key = secret_access_key
66
70
  self.session_token = session_token
67
71
  self.role_arn = role_arn
72
+ self.external_id = external_id
73
+ self.use_irsa = use_irsa
68
74
 
69
75
 
70
76
  def create_ingest_job_from_s3(
h2ogpte/h2ogpte.py CHANGED
@@ -1249,6 +1249,22 @@ class H2OGPTE(H2OGPTESyncBase):
1249
1249
  )
1250
1250
  return collection_id
1251
1251
 
1252
+ def reset_all_collection_expirations(self):
1253
+ """
1254
+ Reset any expiry dates and inactivity intervals that have been set for all collections (admin only). This will also reset any archived collections back to active.
1255
+ """
1256
+
1257
+ header = self._get_auth_header()
1258
+ with self._RESTClient(self) as rest_client:
1259
+ result = _get_result(
1260
+ lambda: _rest_to_client_exceptions(
1261
+ lambda: rest_client.collection_api.reset_all_collection_expirations(
1262
+ _headers=header,
1263
+ )
1264
+ )
1265
+ )
1266
+ return result
1267
+
1252
1268
  def set_collection_size_limit(
1253
1269
  self, collection_id: str, limit: Union[int, str]
1254
1270
  ) -> str:
h2ogpte/h2ogpte_async.py CHANGED
@@ -1449,6 +1449,22 @@ class H2OGPTEAsync:
1449
1449
  )
1450
1450
  return collection_id
1451
1451
 
1452
+ async def reset_all_collection_expirations(self):
1453
+ """
1454
+ Reset any expiry dates and inactivity intervals that have been set for all collections (admin only). This will also reset any archived collections back to active.
1455
+ """
1456
+
1457
+ header = await self._get_auth_header()
1458
+ async with self._RESTClient(self) as rest_client:
1459
+ result = _get_result(
1460
+ await _rest_to_client_exceptions(
1461
+ rest_client.collection_api.reset_all_collection_expirations(
1462
+ _headers=header,
1463
+ )
1464
+ )
1465
+ )
1466
+ return result
1467
+
1452
1468
  async def set_collection_size_limit(
1453
1469
  self, collection_id: str, limit: Union[int, str]
1454
1470
  ) -> str:
@@ -14,7 +14,7 @@
14
14
  """ # noqa: E501
15
15
 
16
16
 
17
- __version__ = "1.6.44-dev6"
17
+ __version__ = "1.6.44-dev9"
18
18
 
19
19
  # import apis into sdk package
20
20
  from h2ogpte.rest_async.api.api_keys_api import APIKeysApi
@@ -9559,6 +9559,255 @@ class CollectionsApi:
9559
9559
 
9560
9560
 
9561
9561
 
9562
+ @validate_call
9563
+ async def reset_all_collection_expirations(
9564
+ self,
9565
+ _request_timeout: Union[
9566
+ None,
9567
+ Annotated[StrictFloat, Field(gt=0)],
9568
+ Tuple[
9569
+ Annotated[StrictFloat, Field(gt=0)],
9570
+ Annotated[StrictFloat, Field(gt=0)]
9571
+ ]
9572
+ ] = None,
9573
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
9574
+ _content_type: Optional[StrictStr] = None,
9575
+ _headers: Optional[Dict[StrictStr, Any]] = None,
9576
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
9577
+ ) -> None:
9578
+ """Reset all collection expiry dates and inactivity intervals that have been set.
9579
+
9580
+ Reset any expiry dates and inactivity intervals that have been set for all collections (admin only). This will also reset any archived collections back to active.
9581
+
9582
+ :param _request_timeout: timeout setting for this request. If one
9583
+ number provided, it will be total request
9584
+ timeout. It can also be a pair (tuple) of
9585
+ (connection, read) timeouts.
9586
+ :type _request_timeout: int, tuple(int, int), optional
9587
+ :param _request_auth: set to override the auth_settings for an a single
9588
+ request; this effectively ignores the
9589
+ authentication in the spec for a single request.
9590
+ :type _request_auth: dict, optional
9591
+ :param _content_type: force content-type for the request.
9592
+ :type _content_type: str, Optional
9593
+ :param _headers: set to override the headers for a single
9594
+ request; this effectively ignores the headers
9595
+ in the spec for a single request.
9596
+ :type _headers: dict, optional
9597
+ :param _host_index: set to override the host_index for a single
9598
+ request; this effectively ignores the host_index
9599
+ in the spec for a single request.
9600
+ :type _host_index: int, optional
9601
+ :return: Returns the result object.
9602
+ """ # noqa: E501
9603
+
9604
+ _param = self._reset_all_collection_expirations_serialize(
9605
+ _request_auth=_request_auth,
9606
+ _content_type=_content_type,
9607
+ _headers=_headers,
9608
+ _host_index=_host_index
9609
+ )
9610
+
9611
+ _response_types_map: Dict[str, Optional[str]] = {
9612
+ '204': None,
9613
+ '401': "EndpointError",
9614
+ }
9615
+ response_data = await self.api_client.call_api(
9616
+ *_param,
9617
+ _request_timeout=_request_timeout
9618
+ )
9619
+ await response_data.read()
9620
+ return self.api_client.response_deserialize(
9621
+ response_data=response_data,
9622
+ response_types_map=_response_types_map,
9623
+ ).data
9624
+
9625
+
9626
+ @validate_call
9627
+ async def reset_all_collection_expirations_with_http_info(
9628
+ self,
9629
+ _request_timeout: Union[
9630
+ None,
9631
+ Annotated[StrictFloat, Field(gt=0)],
9632
+ Tuple[
9633
+ Annotated[StrictFloat, Field(gt=0)],
9634
+ Annotated[StrictFloat, Field(gt=0)]
9635
+ ]
9636
+ ] = None,
9637
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
9638
+ _content_type: Optional[StrictStr] = None,
9639
+ _headers: Optional[Dict[StrictStr, Any]] = None,
9640
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
9641
+ ) -> ApiResponse[None]:
9642
+ """Reset all collection expiry dates and inactivity intervals that have been set.
9643
+
9644
+ Reset any expiry dates and inactivity intervals that have been set for all collections (admin only). This will also reset any archived collections back to active.
9645
+
9646
+ :param _request_timeout: timeout setting for this request. If one
9647
+ number provided, it will be total request
9648
+ timeout. It can also be a pair (tuple) of
9649
+ (connection, read) timeouts.
9650
+ :type _request_timeout: int, tuple(int, int), optional
9651
+ :param _request_auth: set to override the auth_settings for an a single
9652
+ request; this effectively ignores the
9653
+ authentication in the spec for a single request.
9654
+ :type _request_auth: dict, optional
9655
+ :param _content_type: force content-type for the request.
9656
+ :type _content_type: str, Optional
9657
+ :param _headers: set to override the headers for a single
9658
+ request; this effectively ignores the headers
9659
+ in the spec for a single request.
9660
+ :type _headers: dict, optional
9661
+ :param _host_index: set to override the host_index for a single
9662
+ request; this effectively ignores the host_index
9663
+ in the spec for a single request.
9664
+ :type _host_index: int, optional
9665
+ :return: Returns the result object.
9666
+ """ # noqa: E501
9667
+
9668
+ _param = self._reset_all_collection_expirations_serialize(
9669
+ _request_auth=_request_auth,
9670
+ _content_type=_content_type,
9671
+ _headers=_headers,
9672
+ _host_index=_host_index
9673
+ )
9674
+
9675
+ _response_types_map: Dict[str, Optional[str]] = {
9676
+ '204': None,
9677
+ '401': "EndpointError",
9678
+ }
9679
+ response_data = await self.api_client.call_api(
9680
+ *_param,
9681
+ _request_timeout=_request_timeout
9682
+ )
9683
+ await response_data.read()
9684
+ return self.api_client.response_deserialize(
9685
+ response_data=response_data,
9686
+ response_types_map=_response_types_map,
9687
+ )
9688
+
9689
+
9690
+ @validate_call
9691
+ async def reset_all_collection_expirations_without_preload_content(
9692
+ self,
9693
+ _request_timeout: Union[
9694
+ None,
9695
+ Annotated[StrictFloat, Field(gt=0)],
9696
+ Tuple[
9697
+ Annotated[StrictFloat, Field(gt=0)],
9698
+ Annotated[StrictFloat, Field(gt=0)]
9699
+ ]
9700
+ ] = None,
9701
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
9702
+ _content_type: Optional[StrictStr] = None,
9703
+ _headers: Optional[Dict[StrictStr, Any]] = None,
9704
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
9705
+ ) -> RESTResponseType:
9706
+ """Reset all collection expiry dates and inactivity intervals that have been set.
9707
+
9708
+ Reset any expiry dates and inactivity intervals that have been set for all collections (admin only). This will also reset any archived collections back to active.
9709
+
9710
+ :param _request_timeout: timeout setting for this request. If one
9711
+ number provided, it will be total request
9712
+ timeout. It can also be a pair (tuple) of
9713
+ (connection, read) timeouts.
9714
+ :type _request_timeout: int, tuple(int, int), optional
9715
+ :param _request_auth: set to override the auth_settings for an a single
9716
+ request; this effectively ignores the
9717
+ authentication in the spec for a single request.
9718
+ :type _request_auth: dict, optional
9719
+ :param _content_type: force content-type for the request.
9720
+ :type _content_type: str, Optional
9721
+ :param _headers: set to override the headers for a single
9722
+ request; this effectively ignores the headers
9723
+ in the spec for a single request.
9724
+ :type _headers: dict, optional
9725
+ :param _host_index: set to override the host_index for a single
9726
+ request; this effectively ignores the host_index
9727
+ in the spec for a single request.
9728
+ :type _host_index: int, optional
9729
+ :return: Returns the result object.
9730
+ """ # noqa: E501
9731
+
9732
+ _param = self._reset_all_collection_expirations_serialize(
9733
+ _request_auth=_request_auth,
9734
+ _content_type=_content_type,
9735
+ _headers=_headers,
9736
+ _host_index=_host_index
9737
+ )
9738
+
9739
+ _response_types_map: Dict[str, Optional[str]] = {
9740
+ '204': None,
9741
+ '401': "EndpointError",
9742
+ }
9743
+ response_data = await self.api_client.call_api(
9744
+ *_param,
9745
+ _request_timeout=_request_timeout
9746
+ )
9747
+ return response_data.response
9748
+
9749
+
9750
+ def _reset_all_collection_expirations_serialize(
9751
+ self,
9752
+ _request_auth,
9753
+ _content_type,
9754
+ _headers,
9755
+ _host_index,
9756
+ ) -> RequestSerialized:
9757
+
9758
+ _host = None
9759
+
9760
+ _collection_formats: Dict[str, str] = {
9761
+ }
9762
+
9763
+ _path_params: Dict[str, str] = {}
9764
+ _query_params: List[Tuple[str, str]] = []
9765
+ _header_params: Dict[str, Optional[str]] = _headers or {}
9766
+ _form_params: List[Tuple[str, str]] = []
9767
+ _files: Dict[
9768
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
9769
+ ] = {}
9770
+ _body_params: Optional[bytes] = None
9771
+
9772
+ # process the path parameters
9773
+ # process the query parameters
9774
+ # process the header parameters
9775
+ # process the form parameters
9776
+ # process the body parameter
9777
+
9778
+
9779
+ # set the HTTP header `Accept`
9780
+ if 'Accept' not in _header_params:
9781
+ _header_params['Accept'] = self.api_client.select_header_accept(
9782
+ [
9783
+ 'application/json'
9784
+ ]
9785
+ )
9786
+
9787
+
9788
+ # authentication setting
9789
+ _auth_settings: List[str] = [
9790
+ 'bearerAuth'
9791
+ ]
9792
+
9793
+ return self.api_client.param_serialize(
9794
+ method='POST',
9795
+ resource_path='/collections/reset_all_collection_expirations',
9796
+ path_params=_path_params,
9797
+ query_params=_query_params,
9798
+ header_params=_header_params,
9799
+ body=_body_params,
9800
+ post_params=_form_params,
9801
+ files=_files,
9802
+ auth_settings=_auth_settings,
9803
+ collection_formats=_collection_formats,
9804
+ _host=_host,
9805
+ _request_auth=_request_auth
9806
+ )
9807
+
9808
+
9809
+
9810
+
9562
9811
  @validate_call
9563
9812
  async def reset_collection_prompt_settings(
9564
9813
  self,
@@ -90,7 +90,7 @@ class ApiClient:
90
90
  self.default_headers[header_name] = header_value
91
91
  self.cookie = cookie
92
92
  # Set default User-Agent.
93
- self.user_agent = 'OpenAPI-Generator/1.6.44-dev6/python'
93
+ self.user_agent = 'OpenAPI-Generator/1.6.44-dev9/python'
94
94
  self.client_side_validation = configuration.client_side_validation
95
95
 
96
96
  async def __aenter__(self):
@@ -499,7 +499,7 @@ class Configuration:
499
499
  "OS: {env}\n"\
500
500
  "Python Version: {pyversion}\n"\
501
501
  "Version of the API: v1.0.0\n"\
502
- "SDK Package Version: 1.6.44-dev6".\
502
+ "SDK Package Version: 1.6.44-dev9".\
503
503
  format(env=sys.platform, pyversion=sys.version)
504
504
 
505
505
  def get_host_settings(self) -> List[HostSetting]:
@@ -17,20 +17,22 @@ import pprint
17
17
  import re # noqa: F401
18
18
  import json
19
19
 
20
- from pydantic import BaseModel, ConfigDict, StrictStr
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
21
21
  from typing import Any, ClassVar, Dict, List, Optional
22
22
  from typing import Optional, Set
23
23
  from typing_extensions import Self
24
24
 
25
25
  class S3Credentials(BaseModel):
26
26
  """
27
- The object with S3 credentials. If the object is not provided, only public buckets will be accessible.
27
+ The object with S3 credentials. If the object is not provided, only public buckets will be accessible. When use_irsa is true, access_key_id and secret_access_key are optional and the pod's service account will be used for authentication.
28
28
  """ # noqa: E501
29
- access_key_id: StrictStr
30
- secret_access_key: StrictStr
31
- session_token: Optional[StrictStr] = None
32
- role_arn: Optional[StrictStr] = None
33
- __properties: ClassVar[List[str]] = ["access_key_id", "secret_access_key", "session_token", "role_arn"]
29
+ use_irsa: Optional[StrictBool] = Field(default=False, description="Enable IAM Roles for Service Accounts (IRSA) to authenticate using the pod's service account. When enabled, explicit credentials are not required.")
30
+ access_key_id: Optional[StrictStr] = Field(default=None, description="AWS access key ID. Not required when using IRSA.")
31
+ secret_access_key: Optional[StrictStr] = Field(default=None, description="AWS secret access key. Not required when using IRSA.")
32
+ session_token: Optional[StrictStr] = Field(default=None, description="AWS session token for temporary credentials.")
33
+ role_arn: Optional[StrictStr] = Field(default=None, description="The Amazon Resource Name (ARN) of IAM Role that will be utilized for accessing the S3 storage. When IRSA is enabled, this role will be assumed from the service account identity (role chaining). When IRSA is disabled, it requires specification of other credentials to identify an identity the role will be associated with.")
34
+ external_id: Optional[StrictStr] = Field(default=None, description="Optional security token for assuming cross-account roles. This is used to prevent the 'confused deputy' problem when a third party assumes a role in your account. Only required if the role's trust policy requires an external ID.")
35
+ __properties: ClassVar[List[str]] = ["use_irsa", "access_key_id", "secret_access_key", "session_token", "role_arn", "external_id"]
34
36
 
35
37
  model_config = ConfigDict(
36
38
  populate_by_name=True,
@@ -83,10 +85,12 @@ class S3Credentials(BaseModel):
83
85
  return cls.model_validate(obj)
84
86
 
85
87
  _obj = cls.model_validate({
88
+ "use_irsa": obj.get("use_irsa") if obj.get("use_irsa") is not None else False,
86
89
  "access_key_id": obj.get("access_key_id"),
87
90
  "secret_access_key": obj.get("secret_access_key"),
88
91
  "session_token": obj.get("session_token"),
89
- "role_arn": obj.get("role_arn")
92
+ "role_arn": obj.get("role_arn"),
93
+ "external_id": obj.get("external_id")
90
94
  })
91
95
  return _obj
92
96
 
@@ -14,7 +14,7 @@
14
14
  """ # noqa: E501
15
15
 
16
16
 
17
- __version__ = "1.6.44-dev6"
17
+ __version__ = "1.6.44-dev9"
18
18
 
19
19
  # import apis into sdk package
20
20
  from h2ogpte.rest_sync.api.api_keys_api import APIKeysApi
@@ -9559,6 +9559,255 @@ class CollectionsApi:
9559
9559
 
9560
9560
 
9561
9561
 
9562
+ @validate_call
9563
+ def reset_all_collection_expirations(
9564
+ self,
9565
+ _request_timeout: Union[
9566
+ None,
9567
+ Annotated[StrictFloat, Field(gt=0)],
9568
+ Tuple[
9569
+ Annotated[StrictFloat, Field(gt=0)],
9570
+ Annotated[StrictFloat, Field(gt=0)]
9571
+ ]
9572
+ ] = None,
9573
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
9574
+ _content_type: Optional[StrictStr] = None,
9575
+ _headers: Optional[Dict[StrictStr, Any]] = None,
9576
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
9577
+ ) -> None:
9578
+ """Reset all collection expiry dates and inactivity intervals that have been set.
9579
+
9580
+ Reset any expiry dates and inactivity intervals that have been set for all collections (admin only). This will also reset any archived collections back to active.
9581
+
9582
+ :param _request_timeout: timeout setting for this request. If one
9583
+ number provided, it will be total request
9584
+ timeout. It can also be a pair (tuple) of
9585
+ (connection, read) timeouts.
9586
+ :type _request_timeout: int, tuple(int, int), optional
9587
+ :param _request_auth: set to override the auth_settings for an a single
9588
+ request; this effectively ignores the
9589
+ authentication in the spec for a single request.
9590
+ :type _request_auth: dict, optional
9591
+ :param _content_type: force content-type for the request.
9592
+ :type _content_type: str, Optional
9593
+ :param _headers: set to override the headers for a single
9594
+ request; this effectively ignores the headers
9595
+ in the spec for a single request.
9596
+ :type _headers: dict, optional
9597
+ :param _host_index: set to override the host_index for a single
9598
+ request; this effectively ignores the host_index
9599
+ in the spec for a single request.
9600
+ :type _host_index: int, optional
9601
+ :return: Returns the result object.
9602
+ """ # noqa: E501
9603
+
9604
+ _param = self._reset_all_collection_expirations_serialize(
9605
+ _request_auth=_request_auth,
9606
+ _content_type=_content_type,
9607
+ _headers=_headers,
9608
+ _host_index=_host_index
9609
+ )
9610
+
9611
+ _response_types_map: Dict[str, Optional[str]] = {
9612
+ '204': None,
9613
+ '401': "EndpointError",
9614
+ }
9615
+ response_data = self.api_client.call_api(
9616
+ *_param,
9617
+ _request_timeout=_request_timeout
9618
+ )
9619
+ response_data.read()
9620
+ return self.api_client.response_deserialize(
9621
+ response_data=response_data,
9622
+ response_types_map=_response_types_map,
9623
+ ).data
9624
+
9625
+
9626
+ @validate_call
9627
+ def reset_all_collection_expirations_with_http_info(
9628
+ self,
9629
+ _request_timeout: Union[
9630
+ None,
9631
+ Annotated[StrictFloat, Field(gt=0)],
9632
+ Tuple[
9633
+ Annotated[StrictFloat, Field(gt=0)],
9634
+ Annotated[StrictFloat, Field(gt=0)]
9635
+ ]
9636
+ ] = None,
9637
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
9638
+ _content_type: Optional[StrictStr] = None,
9639
+ _headers: Optional[Dict[StrictStr, Any]] = None,
9640
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
9641
+ ) -> ApiResponse[None]:
9642
+ """Reset all collection expiry dates and inactivity intervals that have been set.
9643
+
9644
+ Reset any expiry dates and inactivity intervals that have been set for all collections (admin only). This will also reset any archived collections back to active.
9645
+
9646
+ :param _request_timeout: timeout setting for this request. If one
9647
+ number provided, it will be total request
9648
+ timeout. It can also be a pair (tuple) of
9649
+ (connection, read) timeouts.
9650
+ :type _request_timeout: int, tuple(int, int), optional
9651
+ :param _request_auth: set to override the auth_settings for an a single
9652
+ request; this effectively ignores the
9653
+ authentication in the spec for a single request.
9654
+ :type _request_auth: dict, optional
9655
+ :param _content_type: force content-type for the request.
9656
+ :type _content_type: str, Optional
9657
+ :param _headers: set to override the headers for a single
9658
+ request; this effectively ignores the headers
9659
+ in the spec for a single request.
9660
+ :type _headers: dict, optional
9661
+ :param _host_index: set to override the host_index for a single
9662
+ request; this effectively ignores the host_index
9663
+ in the spec for a single request.
9664
+ :type _host_index: int, optional
9665
+ :return: Returns the result object.
9666
+ """ # noqa: E501
9667
+
9668
+ _param = self._reset_all_collection_expirations_serialize(
9669
+ _request_auth=_request_auth,
9670
+ _content_type=_content_type,
9671
+ _headers=_headers,
9672
+ _host_index=_host_index
9673
+ )
9674
+
9675
+ _response_types_map: Dict[str, Optional[str]] = {
9676
+ '204': None,
9677
+ '401': "EndpointError",
9678
+ }
9679
+ response_data = self.api_client.call_api(
9680
+ *_param,
9681
+ _request_timeout=_request_timeout
9682
+ )
9683
+ response_data.read()
9684
+ return self.api_client.response_deserialize(
9685
+ response_data=response_data,
9686
+ response_types_map=_response_types_map,
9687
+ )
9688
+
9689
+
9690
+ @validate_call
9691
+ def reset_all_collection_expirations_without_preload_content(
9692
+ self,
9693
+ _request_timeout: Union[
9694
+ None,
9695
+ Annotated[StrictFloat, Field(gt=0)],
9696
+ Tuple[
9697
+ Annotated[StrictFloat, Field(gt=0)],
9698
+ Annotated[StrictFloat, Field(gt=0)]
9699
+ ]
9700
+ ] = None,
9701
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
9702
+ _content_type: Optional[StrictStr] = None,
9703
+ _headers: Optional[Dict[StrictStr, Any]] = None,
9704
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
9705
+ ) -> RESTResponseType:
9706
+ """Reset all collection expiry dates and inactivity intervals that have been set.
9707
+
9708
+ Reset any expiry dates and inactivity intervals that have been set for all collections (admin only). This will also reset any archived collections back to active.
9709
+
9710
+ :param _request_timeout: timeout setting for this request. If one
9711
+ number provided, it will be total request
9712
+ timeout. It can also be a pair (tuple) of
9713
+ (connection, read) timeouts.
9714
+ :type _request_timeout: int, tuple(int, int), optional
9715
+ :param _request_auth: set to override the auth_settings for an a single
9716
+ request; this effectively ignores the
9717
+ authentication in the spec for a single request.
9718
+ :type _request_auth: dict, optional
9719
+ :param _content_type: force content-type for the request.
9720
+ :type _content_type: str, Optional
9721
+ :param _headers: set to override the headers for a single
9722
+ request; this effectively ignores the headers
9723
+ in the spec for a single request.
9724
+ :type _headers: dict, optional
9725
+ :param _host_index: set to override the host_index for a single
9726
+ request; this effectively ignores the host_index
9727
+ in the spec for a single request.
9728
+ :type _host_index: int, optional
9729
+ :return: Returns the result object.
9730
+ """ # noqa: E501
9731
+
9732
+ _param = self._reset_all_collection_expirations_serialize(
9733
+ _request_auth=_request_auth,
9734
+ _content_type=_content_type,
9735
+ _headers=_headers,
9736
+ _host_index=_host_index
9737
+ )
9738
+
9739
+ _response_types_map: Dict[str, Optional[str]] = {
9740
+ '204': None,
9741
+ '401': "EndpointError",
9742
+ }
9743
+ response_data = self.api_client.call_api(
9744
+ *_param,
9745
+ _request_timeout=_request_timeout
9746
+ )
9747
+ return response_data.response
9748
+
9749
+
9750
+ def _reset_all_collection_expirations_serialize(
9751
+ self,
9752
+ _request_auth,
9753
+ _content_type,
9754
+ _headers,
9755
+ _host_index,
9756
+ ) -> RequestSerialized:
9757
+
9758
+ _host = None
9759
+
9760
+ _collection_formats: Dict[str, str] = {
9761
+ }
9762
+
9763
+ _path_params: Dict[str, str] = {}
9764
+ _query_params: List[Tuple[str, str]] = []
9765
+ _header_params: Dict[str, Optional[str]] = _headers or {}
9766
+ _form_params: List[Tuple[str, str]] = []
9767
+ _files: Dict[
9768
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
9769
+ ] = {}
9770
+ _body_params: Optional[bytes] = None
9771
+
9772
+ # process the path parameters
9773
+ # process the query parameters
9774
+ # process the header parameters
9775
+ # process the form parameters
9776
+ # process the body parameter
9777
+
9778
+
9779
+ # set the HTTP header `Accept`
9780
+ if 'Accept' not in _header_params:
9781
+ _header_params['Accept'] = self.api_client.select_header_accept(
9782
+ [
9783
+ 'application/json'
9784
+ ]
9785
+ )
9786
+
9787
+
9788
+ # authentication setting
9789
+ _auth_settings: List[str] = [
9790
+ 'bearerAuth'
9791
+ ]
9792
+
9793
+ return self.api_client.param_serialize(
9794
+ method='POST',
9795
+ resource_path='/collections/reset_all_collection_expirations',
9796
+ path_params=_path_params,
9797
+ query_params=_query_params,
9798
+ header_params=_header_params,
9799
+ body=_body_params,
9800
+ post_params=_form_params,
9801
+ files=_files,
9802
+ auth_settings=_auth_settings,
9803
+ collection_formats=_collection_formats,
9804
+ _host=_host,
9805
+ _request_auth=_request_auth
9806
+ )
9807
+
9808
+
9809
+
9810
+
9562
9811
  @validate_call
9563
9812
  def reset_collection_prompt_settings(
9564
9813
  self,
@@ -90,7 +90,7 @@ class ApiClient:
90
90
  self.default_headers[header_name] = header_value
91
91
  self.cookie = cookie
92
92
  # Set default User-Agent.
93
- self.user_agent = 'OpenAPI-Generator/1.6.44-dev6/python'
93
+ self.user_agent = 'OpenAPI-Generator/1.6.44-dev9/python'
94
94
  self.client_side_validation = configuration.client_side_validation
95
95
 
96
96
  def __enter__(self):
@@ -503,7 +503,7 @@ class Configuration:
503
503
  "OS: {env}\n"\
504
504
  "Python Version: {pyversion}\n"\
505
505
  "Version of the API: v1.0.0\n"\
506
- "SDK Package Version: 1.6.44-dev6".\
506
+ "SDK Package Version: 1.6.44-dev9".\
507
507
  format(env=sys.platform, pyversion=sys.version)
508
508
 
509
509
  def get_host_settings(self) -> List[HostSetting]:
@@ -17,20 +17,22 @@ import pprint
17
17
  import re # noqa: F401
18
18
  import json
19
19
 
20
- from pydantic import BaseModel, ConfigDict, StrictStr
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
21
21
  from typing import Any, ClassVar, Dict, List, Optional
22
22
  from typing import Optional, Set
23
23
  from typing_extensions import Self
24
24
 
25
25
  class S3Credentials(BaseModel):
26
26
  """
27
- The object with S3 credentials. If the object is not provided, only public buckets will be accessible.
27
+ The object with S3 credentials. If the object is not provided, only public buckets will be accessible. When use_irsa is true, access_key_id and secret_access_key are optional and the pod's service account will be used for authentication.
28
28
  """ # noqa: E501
29
- access_key_id: StrictStr
30
- secret_access_key: StrictStr
31
- session_token: Optional[StrictStr] = None
32
- role_arn: Optional[StrictStr] = None
33
- __properties: ClassVar[List[str]] = ["access_key_id", "secret_access_key", "session_token", "role_arn"]
29
+ use_irsa: Optional[StrictBool] = Field(default=False, description="Enable IAM Roles for Service Accounts (IRSA) to authenticate using the pod's service account. When enabled, explicit credentials are not required.")
30
+ access_key_id: Optional[StrictStr] = Field(default=None, description="AWS access key ID. Not required when using IRSA.")
31
+ secret_access_key: Optional[StrictStr] = Field(default=None, description="AWS secret access key. Not required when using IRSA.")
32
+ session_token: Optional[StrictStr] = Field(default=None, description="AWS session token for temporary credentials.")
33
+ role_arn: Optional[StrictStr] = Field(default=None, description="The Amazon Resource Name (ARN) of IAM Role that will be utilized for accessing the S3 storage. When IRSA is enabled, this role will be assumed from the service account identity (role chaining). When IRSA is disabled, it requires specification of other credentials to identify an identity the role will be associated with.")
34
+ external_id: Optional[StrictStr] = Field(default=None, description="Optional security token for assuming cross-account roles. This is used to prevent the 'confused deputy' problem when a third party assumes a role in your account. Only required if the role's trust policy requires an external ID.")
35
+ __properties: ClassVar[List[str]] = ["use_irsa", "access_key_id", "secret_access_key", "session_token", "role_arn", "external_id"]
34
36
 
35
37
  model_config = ConfigDict(
36
38
  populate_by_name=True,
@@ -83,10 +85,12 @@ class S3Credentials(BaseModel):
83
85
  return cls.model_validate(obj)
84
86
 
85
87
  _obj = cls.model_validate({
88
+ "use_irsa": obj.get("use_irsa") if obj.get("use_irsa") is not None else False,
86
89
  "access_key_id": obj.get("access_key_id"),
87
90
  "secret_access_key": obj.get("secret_access_key"),
88
91
  "session_token": obj.get("session_token"),
89
- "role_arn": obj.get("role_arn")
92
+ "role_arn": obj.get("role_arn"),
93
+ "external_id": obj.get("external_id")
90
94
  })
91
95
  return _obj
92
96
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: h2ogpte
3
- Version: 1.6.44rc6
3
+ Version: 1.6.44rc9
4
4
  Summary: Client library for Enterprise h2oGPTe
5
5
  Author-email: "H2O.ai, Inc." <support@h2o.ai>
6
6
  Project-URL: Source, https://github.com/h2oai/h2ogpte
@@ -1,8 +1,8 @@
1
- h2ogpte/__init__.py,sha256=Ix9s7mV88gTJIRCD3Y9U_P5iDCrkHTPVWW1N5uB1WX0,1524
2
- h2ogpte/connectors.py,sha256=vkILsfW-tsLUn6KB6zgu_kjps4NMGgJpZ3OOaIjji04,8057
1
+ h2ogpte/__init__.py,sha256=J9-R6VEV8qEaclMf-7AN60HdZgnQJE3eo0AJgCuENgA,1524
2
+ h2ogpte/connectors.py,sha256=CRAEpkn9GotcCjWANfJjZ5Hq1cjGWJ4H_IO4eJgVWiI,8466
3
3
  h2ogpte/errors.py,sha256=XgLdfJO1fZ9Bf9rhUKpnvRzzvkNyan3Oc6WzGS6hCUA,1248
4
- h2ogpte/h2ogpte.py,sha256=K3W8gXrHr1K68244xIh9myDOR0mzdkQLTDnkIdxSTc4,308848
5
- h2ogpte/h2ogpte_async.py,sha256=QIiNhezH9d2FF7wowOcZdswvYSHJ-6OXUHe3BP1r4kg,328753
4
+ h2ogpte/h2ogpte.py,sha256=AqwDkynS9kLDi231PgGiwKm8kzVUQZUYquMqMdiYEHQ,309478
5
+ h2ogpte/h2ogpte_async.py,sha256=cfuKTU5T2rSYeYXDjTsJ_TbSAyglhoRr6kQoCc-8fgI,329391
6
6
  h2ogpte/h2ogpte_sync_base.py,sha256=ftsVzpMqEsyi0UACMI-7H_EIYEx9JEdEUImbyjWy_Hc,15285
7
7
  h2ogpte/session.py,sha256=BqJg3mWVeyz_ZLUJC_olzZzeLnRSaJwCH1NkXXfhg54,32608
8
8
  h2ogpte/session_async.py,sha256=UzNijTn3kZjAUYl_Jn5Oji4QrPTOpdX9KKByTmhLlK8,31354
@@ -41,17 +41,17 @@ h2ogpte/cli/ui/prompts.py,sha256=bJvRe_32KppQTK5bqnsrPh0RS4JaY9KkiV7y-3v8PMQ,538
41
41
  h2ogpte/cli/ui/status_bar.py,sha256=hs2MLvkg-y3Aiu3gWRtgMXf3jv3DGe7Y47ucgoBAP7Y,3852
42
42
  h2ogpte/cli/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
43
43
  h2ogpte/cli/utils/file_manager.py,sha256=ghNDX6G3Dr0vFvBYjbqx5o7qxq-pN8Vo2Rp1vyITfLo,13988
44
- h2ogpte/rest_async/__init__.py,sha256=9reksIT3P7gEDM8krgRey-5hM5sug7v9h50N9XAtDi4,15203
45
- h2ogpte/rest_async/api_client.py,sha256=3WugXotxD2f57OMUqPq77lQOqyAmGnadbfazsZFnIOg,29510
44
+ h2ogpte/rest_async/__init__.py,sha256=hVi4wgpvB75-g3mWK1adO4HqKuwVAGbddZwON05ggw4,15203
45
+ h2ogpte/rest_async/api_client.py,sha256=vUz2Aoa0qI34oPlC0VZYdWA6kmVcDbIrq8SOjZaZeu4,29510
46
46
  h2ogpte/rest_async/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
47
- h2ogpte/rest_async/configuration.py,sha256=UOVg3Z_EFQzjEgd97BhcP1dbukSL-n51-EKxyc2dimc,19567
47
+ h2ogpte/rest_async/configuration.py,sha256=ZFVITmWtExcHnI06BVaR8CCvcKjXuX1esUedxQ1ScV0,19567
48
48
  h2ogpte/rest_async/exceptions.py,sha256=aSDc-0lURtyQjf5HGa7_Ta0nATxKxfHW3huDA2Zdj6o,8370
49
49
  h2ogpte/rest_async/rest.py,sha256=mdjDwzJ1kiaYtONUfDRqKsRPw5-tG6eyZV2P1yBuwRo,9147
50
50
  h2ogpte/rest_async/api/__init__.py,sha256=R_x57GGyaSgxZyrJOyOt551TodbRSQf3T7VrraQc-84,973
51
51
  h2ogpte/rest_async/api/agents_api.py,sha256=_-7Y1h3ssEqqgjriUmuDnngbimbVifva75Z7ks3-wNw,177547
52
52
  h2ogpte/rest_async/api/api_keys_api.py,sha256=hgywNjCWaIrhFRJacKuPkJSKDEltIK8B9fi-4xMWLgs,58244
53
53
  h2ogpte/rest_async/api/chat_api.py,sha256=bJDJqTIXiTYW4anTkqE4XYuEqRDcRW8LcwlMgXyQQS4,295852
54
- h2ogpte/rest_async/api/collections_api.py,sha256=fvB_HNR41uaS986lzitfIZ350grq6cAqsPZ2ZsvNY0A,639458
54
+ h2ogpte/rest_async/api/collections_api.py,sha256=kg6ZJyqNtnrqu2Q1cS8S-ViYPjXTEAynE2nlSQ-61HA,649556
55
55
  h2ogpte/rest_async/api/configurations_api.py,sha256=H9I2hukGC8ACin3cSUR3pAqtghJs0OUPJAzC9nOlkGY,127865
56
56
  h2ogpte/rest_async/api/document_ingestion_api.py,sha256=K8iIH9yPEwZlJdySLnEQkSen2uneR2kEUHZXzJyc0JA,489154
57
57
  h2ogpte/rest_async/api/documents_api.py,sha256=X-w5x4bX2wHXlxb_97XgWdgNi5qAkdksoqz7bHKG5fA,261595
@@ -164,7 +164,7 @@ h2ogpte/rest_async/models/reset_and_share_with_groups_request.py,sha256=6IwfFIjA
164
164
  h2ogpte/rest_async/models/role_create_request.py,sha256=UayaEOpH_Qx8AYff5cFALodAmbTaO4YphBsMM2lHHFI,4476
165
165
  h2ogpte/rest_async/models/role_info.py,sha256=gCcSiqjkux4zFt0cR9CQDaeWgSneVQJ11JgthdtQUms,4633
166
166
  h2ogpte/rest_async/models/roles_reset_request.py,sha256=W5cKp897NVOwlWX-GR9OZ1THtqWDhjmCibadKZSa9i4,4409
167
- h2ogpte/rest_async/models/s3_credentials.py,sha256=fAeFj3sXAcQq6hpPgs_A_PHRPaM6Dmu8D4Id7zMcFZs,4835
167
+ h2ogpte/rest_async/models/s3_credentials.py,sha256=GS4bIxa8tc4E0pzVjemDYiWJjqXVrWfSN3dsqEUegtI,6304
168
168
  h2ogpte/rest_async/models/search_collection_chunks_request.py,sha256=KfMNH2VvZYLahzrOVHpjfCmUpWIWV_YUWczjBuZ02O4,5129
169
169
  h2ogpte/rest_async/models/self_test_result.py,sha256=LOiW5WOJSBKlG7KMZ2tOHfmSow0BbDXSBN8p9OlNNeA,5750
170
170
  h2ogpte/rest_async/models/set_collection_size_limit_request.py,sha256=f8OGSc2uSRcwj7yByFWHj5A1eG_jPXajMHxZDjGO3DM,4501
@@ -201,17 +201,17 @@ h2ogpte/rest_async/models/user_deletion_request.py,sha256=z7gD8XKOGwwg782TRzXJii
201
201
  h2ogpte/rest_async/models/user_info.py,sha256=ef59Eh9k42JUY3X2RnCrwYR7sc_8lXT1vRLGoNz3uTU,4489
202
202
  h2ogpte/rest_async/models/user_job_details.py,sha256=kzu8fLxVsRMgnyt6dLr0VWjlIoE3i1VRpGR9nDxFyk4,4985
203
203
  h2ogpte/rest_async/models/user_permission.py,sha256=1k74E7s2kD2waSZ79KPlgTupVYEacTKWMqcKxv2972A,4856
204
- h2ogpte/rest_sync/__init__.py,sha256=X9-WJtgMWJ2px2jeWaWkwKIu9dk8jNVcQe6g_EYPors,15042
205
- h2ogpte/rest_sync/api_client.py,sha256=2_uN89Z_ESjAmevS0hYHKzcq3GuxCSjr6NMA9O-XAlg,29397
204
+ h2ogpte/rest_sync/__init__.py,sha256=TDrF5FTonsbsGxH76o6LhgFnIEJO0PN3l9hrpjPJpuA,15042
205
+ h2ogpte/rest_sync/api_client.py,sha256=XxK-Au-xNVKnRCFoK4UxFu_P1PCfmklCV486CWwiwl0,29397
206
206
  h2ogpte/rest_sync/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
207
- h2ogpte/rest_sync/configuration.py,sha256=aeg0VuYA7yiV3xfBLBxbT7mzb9XO-SXg3DfEcTUjCPg,19850
207
+ h2ogpte/rest_sync/configuration.py,sha256=3WQeOh-BPaYPudUv13dayS589uPKWlROAIHVwD-4HOo,19850
208
208
  h2ogpte/rest_sync/exceptions.py,sha256=aSDc-0lURtyQjf5HGa7_Ta0nATxKxfHW3huDA2Zdj6o,8370
209
209
  h2ogpte/rest_sync/rest.py,sha256=evRzviTYC_fsrpTtFlGvruXmquH9C0jDn-oQrGrE5A0,11314
210
210
  h2ogpte/rest_sync/api/__init__.py,sha256=ZuLQQtyiXnP5UOwTlIOYLGLQq1BG_0PEkzC9s698vjM,958
211
211
  h2ogpte/rest_sync/api/agents_api.py,sha256=zWzPXtqHbhBe6xVZZKYl93bFLDVzNw2KmAJG5xIW6i0,176763
212
212
  h2ogpte/rest_sync/api/api_keys_api.py,sha256=MueDC8Z4VUC61IVIBem0kD0Wpgh35MvhoilUtPVLrN0,57997
213
213
  h2ogpte/rest_sync/api/chat_api.py,sha256=9DoF08mTxi3D7sYRkvOM76qB4crS13lb5QmTXtJIV1U,294582
214
- h2ogpte/rest_sync/api/collections_api.py,sha256=3oTV2IuRV9l_8Wjb9ivQX7bQ6Ay6uFO6zIjbre1bSXs,636980
214
+ h2ogpte/rest_sync/api/collections_api.py,sha256=DsM57mFCtEn7WjMen3-zbZz_fC0TH1-zttlXJGQwwCs,647030
215
215
  h2ogpte/rest_sync/api/configurations_api.py,sha256=B39KQB3fRknMZ8PtDNBxWVX2aVGTQSmaE2nq6Ya8VkE,127330
216
216
  h2ogpte/rest_sync/api/document_ingestion_api.py,sha256=i7bLMjtFOvtr9zwgR2F-uXY1AhmW918axnm0T1vxU90,488230
217
217
  h2ogpte/rest_sync/api/documents_api.py,sha256=qRDBXrQaZWp_hGxg-7mqAFUMeeWd1EB2M_xIlzHh6rw,260474
@@ -324,7 +324,7 @@ h2ogpte/rest_sync/models/reset_and_share_with_groups_request.py,sha256=6IwfFIjAA
324
324
  h2ogpte/rest_sync/models/role_create_request.py,sha256=UayaEOpH_Qx8AYff5cFALodAmbTaO4YphBsMM2lHHFI,4476
325
325
  h2ogpte/rest_sync/models/role_info.py,sha256=gCcSiqjkux4zFt0cR9CQDaeWgSneVQJ11JgthdtQUms,4633
326
326
  h2ogpte/rest_sync/models/roles_reset_request.py,sha256=W5cKp897NVOwlWX-GR9OZ1THtqWDhjmCibadKZSa9i4,4409
327
- h2ogpte/rest_sync/models/s3_credentials.py,sha256=fAeFj3sXAcQq6hpPgs_A_PHRPaM6Dmu8D4Id7zMcFZs,4835
327
+ h2ogpte/rest_sync/models/s3_credentials.py,sha256=GS4bIxa8tc4E0pzVjemDYiWJjqXVrWfSN3dsqEUegtI,6304
328
328
  h2ogpte/rest_sync/models/search_collection_chunks_request.py,sha256=KfMNH2VvZYLahzrOVHpjfCmUpWIWV_YUWczjBuZ02O4,5129
329
329
  h2ogpte/rest_sync/models/self_test_result.py,sha256=LOiW5WOJSBKlG7KMZ2tOHfmSow0BbDXSBN8p9OlNNeA,5750
330
330
  h2ogpte/rest_sync/models/set_collection_size_limit_request.py,sha256=f8OGSc2uSRcwj7yByFWHj5A1eG_jPXajMHxZDjGO3DM,4501
@@ -361,8 +361,8 @@ h2ogpte/rest_sync/models/user_deletion_request.py,sha256=z7gD8XKOGwwg782TRzXJiiP
361
361
  h2ogpte/rest_sync/models/user_info.py,sha256=ef59Eh9k42JUY3X2RnCrwYR7sc_8lXT1vRLGoNz3uTU,4489
362
362
  h2ogpte/rest_sync/models/user_job_details.py,sha256=9cbhpgLMDpar-aTOaY5Ygud-8Kbi23cLNldTGab0Sd8,4984
363
363
  h2ogpte/rest_sync/models/user_permission.py,sha256=1k74E7s2kD2waSZ79KPlgTupVYEacTKWMqcKxv2972A,4856
364
- h2ogpte-1.6.44rc6.dist-info/METADATA,sha256=q-vXm3EGmmy8oyF83AhaQYJtMGKdogZgNLOuI5EAsGY,8615
365
- h2ogpte-1.6.44rc6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
366
- h2ogpte-1.6.44rc6.dist-info/entry_points.txt,sha256=BlaqX2SXJanrOGqNYwnzvCxHGNadM7RBI4pW4rVo5z4,54
367
- h2ogpte-1.6.44rc6.dist-info/top_level.txt,sha256=vXV4JnNwFWFAqTWyHrH-cGIQqbCcEDG9-BbyNn58JpM,8
368
- h2ogpte-1.6.44rc6.dist-info/RECORD,,
364
+ h2ogpte-1.6.44rc9.dist-info/METADATA,sha256=o8-5v3-pkp-Q_Xz1LaCxB7YAnfMvgEYsiFqbcyTO5Fs,8615
365
+ h2ogpte-1.6.44rc9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
366
+ h2ogpte-1.6.44rc9.dist-info/entry_points.txt,sha256=BlaqX2SXJanrOGqNYwnzvCxHGNadM7RBI4pW4rVo5z4,54
367
+ h2ogpte-1.6.44rc9.dist-info/top_level.txt,sha256=vXV4JnNwFWFAqTWyHrH-cGIQqbCcEDG9-BbyNn58JpM,8
368
+ h2ogpte-1.6.44rc9.dist-info/RECORD,,