h2ogpte 1.6.43rc2__py3-none-any.whl → 1.6.43rc5__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.
@@ -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.43-dev2/python'
93
+ self.user_agent = 'OpenAPI-Generator/1.6.43-dev5/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.43-dev2".\
502
+ "SDK Package Version: 1.6.43-dev5".\
503
503
  format(env=sys.platform, pyversion=sys.version)
504
504
 
505
505
  def get_host_settings(self) -> List[HostSetting]:
@@ -46,6 +46,7 @@ from h2ogpte.rest_async.models.collection_create_request import CollectionCreate
46
46
  from h2ogpte.rest_async.models.collection_settings import CollectionSettings
47
47
  from h2ogpte.rest_async.models.collection_update_request import CollectionUpdateRequest
48
48
  from h2ogpte.rest_async.models.confirm_user_deletion_request import ConfirmUserDeletionRequest
49
+ from h2ogpte.rest_async.models.confluence_credentials import ConfluenceCredentials
49
50
  from h2ogpte.rest_async.models.count import Count
50
51
  from h2ogpte.rest_async.models.count_with_queue_details import CountWithQueueDetails
51
52
  from h2ogpte.rest_async.models.create_agent_key_request import CreateAgentKeyRequest
@@ -80,6 +81,7 @@ from h2ogpte.rest_async.models.guardrails_settings_create_request import Guardra
80
81
  from h2ogpte.rest_async.models.h2_ogptgpu_info import H2OGPTGPUInfo
81
82
  from h2ogpte.rest_async.models.h2_ogpt_system_info import H2OGPTSystemInfo
82
83
  from h2ogpte.rest_async.models.ingest_from_azure_blob_storage_body import IngestFromAzureBlobStorageBody
84
+ from h2ogpte.rest_async.models.ingest_from_confluence_body import IngestFromConfluenceBody
83
85
  from h2ogpte.rest_async.models.ingest_from_file_system_body import IngestFromFileSystemBody
84
86
  from h2ogpte.rest_async.models.ingest_from_gcs_body import IngestFromGcsBody
85
87
  from h2ogpte.rest_async.models.ingest_from_s3_body import IngestFromS3Body
@@ -0,0 +1,89 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ h2oGPTe REST API
5
+
6
+ # Overview Users can easily interact with the h2oGPTe API through its REST API, allowing HTTP requests from any programming language. ## Authorization: Getting an API key Sign up/in at Enterprise h2oGPTe and generate one of the following two types of API keys: - **Global API key**: If a Collection is not specified when creating a new API Key, that key is considered to be a global API Key. Use global API Keys to grant full user impersonation and system-wide access to all of your work. Anyone with access to one of your global API Keys can create, delete, or interact with any of your past, current, and future Collections, Documents, Chats, and settings. - **Collection-specific API key**: Use Collection-specific API Keys to grant external access to only Chat with a specified Collection and make related API calls to it. Collection-specific API keys do not allow other API calls, such as creation, deletion, or access to other Collections or Chats. Access Enterprise h2oGPTe through your [H2O Generative AI](https://genai.h2o.ai/appstore) app store account, available with a freemium tier. ## Authorization: Using an API key All h2oGPTe REST API requests must include an API Key in the \"Authorization\" HTTP header, formatted as follows: ``` Authorization: Bearer sk-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ``` ```sh curl -X 'POST' \\ 'https://h2ogpte.genai.h2o.ai/api/v1/collections' \\ -H 'accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'Authorization: Bearer sk-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \\ -d '{ \"name\": \"The name of my Collection\", \"description\": \"The description of my Collection\", \"embedding_model\": \"BAAI/bge-large-en-v1.5\" }' ``` ## Interactive h2oGPTe API testing This page only showcases the h2oGPTe REST API; you can test it directly in the [Swagger UI](https://h2ogpte.genai.h2o.ai/swagger-ui/). Ensure that you are logged into your Enterprise h2oGPTe account.
7
+
8
+ The version of the OpenAPI document: v1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
21
+ from typing import Any, ClassVar, Dict, List
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class ConfluenceCredentials(BaseModel):
26
+ """
27
+ The object with Confluence credentials.
28
+ """ # noqa: E501
29
+ username: StrictStr = Field(description="Name or email of the user.")
30
+ password: StrictStr = Field(description="Password or API token.")
31
+ __properties: ClassVar[List[str]] = ["username", "password"]
32
+
33
+ model_config = ConfigDict(
34
+ populate_by_name=True,
35
+ validate_assignment=True,
36
+ protected_namespaces=(),
37
+ )
38
+
39
+
40
+ def to_str(self) -> str:
41
+ """Returns the string representation of the model using alias"""
42
+ return pprint.pformat(self.model_dump(by_alias=True))
43
+
44
+ def to_json(self) -> str:
45
+ """Returns the JSON representation of the model using alias"""
46
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
47
+ return json.dumps(self.to_dict())
48
+
49
+ @classmethod
50
+ def from_json(cls, json_str: str) -> Optional[Self]:
51
+ """Create an instance of ConfluenceCredentials from a JSON string"""
52
+ return cls.from_dict(json.loads(json_str))
53
+
54
+ def to_dict(self) -> Dict[str, Any]:
55
+ """Return the dictionary representation of the model using alias.
56
+
57
+ This has the following differences from calling pydantic's
58
+ `self.model_dump(by_alias=True)`:
59
+
60
+ * `None` is only added to the output dict for nullable fields that
61
+ were set at model initialization. Other fields with value `None`
62
+ are ignored.
63
+ """
64
+ excluded_fields: Set[str] = set([
65
+ ])
66
+
67
+ _dict = self.model_dump(
68
+ by_alias=True,
69
+ exclude=excluded_fields,
70
+ exclude_none=True,
71
+ )
72
+ return _dict
73
+
74
+ @classmethod
75
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
76
+ """Create an instance of ConfluenceCredentials from a dict"""
77
+ if obj is None:
78
+ return None
79
+
80
+ if not isinstance(obj, dict):
81
+ return cls.model_validate(obj)
82
+
83
+ _obj = cls.model_validate({
84
+ "username": obj.get("username"),
85
+ "password": obj.get("password")
86
+ })
87
+ return _obj
88
+
89
+
@@ -0,0 +1,97 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ h2oGPTe REST API
5
+
6
+ # Overview Users can easily interact with the h2oGPTe API through its REST API, allowing HTTP requests from any programming language. ## Authorization: Getting an API key Sign up/in at Enterprise h2oGPTe and generate one of the following two types of API keys: - **Global API key**: If a Collection is not specified when creating a new API Key, that key is considered to be a global API Key. Use global API Keys to grant full user impersonation and system-wide access to all of your work. Anyone with access to one of your global API Keys can create, delete, or interact with any of your past, current, and future Collections, Documents, Chats, and settings. - **Collection-specific API key**: Use Collection-specific API Keys to grant external access to only Chat with a specified Collection and make related API calls to it. Collection-specific API keys do not allow other API calls, such as creation, deletion, or access to other Collections or Chats. Access Enterprise h2oGPTe through your [H2O Generative AI](https://genai.h2o.ai/appstore) app store account, available with a freemium tier. ## Authorization: Using an API key All h2oGPTe REST API requests must include an API Key in the \"Authorization\" HTTP header, formatted as follows: ``` Authorization: Bearer sk-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ``` ```sh curl -X 'POST' \\ 'https://h2ogpte.genai.h2o.ai/api/v1/collections' \\ -H 'accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'Authorization: Bearer sk-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \\ -d '{ \"name\": \"The name of my Collection\", \"description\": \"The description of my Collection\", \"embedding_model\": \"BAAI/bge-large-en-v1.5\" }' ``` ## Interactive h2oGPTe API testing This page only showcases the h2oGPTe REST API; you can test it directly in the [Swagger UI](https://h2ogpte.genai.h2o.ai/swagger-ui/). Ensure that you are logged into your Enterprise h2oGPTe account.
7
+
8
+ The version of the OpenAPI document: v1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from h2ogpte.rest_async.models.confluence_credentials import ConfluenceCredentials
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class IngestFromConfluenceBody(BaseModel):
27
+ """
28
+ IngestFromConfluenceBody
29
+ """ # noqa: E501
30
+ base_url: StrictStr = Field(description="Base url of the confluence instance.")
31
+ page_ids: List[StrictStr] = Field(description="Ids of pages to be ingested.")
32
+ credentials: ConfluenceCredentials
33
+ metadata: Optional[Dict[str, Any]] = Field(default=None, description="Metadata for the documents.")
34
+ __properties: ClassVar[List[str]] = ["base_url", "page_ids", "credentials", "metadata"]
35
+
36
+ model_config = ConfigDict(
37
+ populate_by_name=True,
38
+ validate_assignment=True,
39
+ protected_namespaces=(),
40
+ )
41
+
42
+
43
+ def to_str(self) -> str:
44
+ """Returns the string representation of the model using alias"""
45
+ return pprint.pformat(self.model_dump(by_alias=True))
46
+
47
+ def to_json(self) -> str:
48
+ """Returns the JSON representation of the model using alias"""
49
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
50
+ return json.dumps(self.to_dict())
51
+
52
+ @classmethod
53
+ def from_json(cls, json_str: str) -> Optional[Self]:
54
+ """Create an instance of IngestFromConfluenceBody from a JSON string"""
55
+ return cls.from_dict(json.loads(json_str))
56
+
57
+ def to_dict(self) -> Dict[str, Any]:
58
+ """Return the dictionary representation of the model using alias.
59
+
60
+ This has the following differences from calling pydantic's
61
+ `self.model_dump(by_alias=True)`:
62
+
63
+ * `None` is only added to the output dict for nullable fields that
64
+ were set at model initialization. Other fields with value `None`
65
+ are ignored.
66
+ """
67
+ excluded_fields: Set[str] = set([
68
+ ])
69
+
70
+ _dict = self.model_dump(
71
+ by_alias=True,
72
+ exclude=excluded_fields,
73
+ exclude_none=True,
74
+ )
75
+ # override the default output from pydantic by calling `to_dict()` of credentials
76
+ if self.credentials:
77
+ _dict['credentials'] = self.credentials.to_dict()
78
+ return _dict
79
+
80
+ @classmethod
81
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
82
+ """Create an instance of IngestFromConfluenceBody from a dict"""
83
+ if obj is None:
84
+ return None
85
+
86
+ if not isinstance(obj, dict):
87
+ return cls.model_validate(obj)
88
+
89
+ _obj = cls.model_validate({
90
+ "base_url": obj.get("base_url"),
91
+ "page_ids": obj.get("page_ids"),
92
+ "credentials": ConfluenceCredentials.from_dict(obj["credentials"]) if obj.get("credentials") is not None else None,
93
+ "metadata": obj.get("metadata")
94
+ })
95
+ return _obj
96
+
97
+
@@ -14,7 +14,7 @@
14
14
  """ # noqa: E501
15
15
 
16
16
 
17
- __version__ = "1.6.43-dev2"
17
+ __version__ = "1.6.43-dev5"
18
18
 
19
19
  # import apis into sdk package
20
20
  from h2ogpte.rest_sync.api.api_keys_api import APIKeysApi
@@ -77,6 +77,7 @@ from h2ogpte.rest_sync.models.collection_create_request import CollectionCreateR
77
77
  from h2ogpte.rest_sync.models.collection_settings import CollectionSettings
78
78
  from h2ogpte.rest_sync.models.collection_update_request import CollectionUpdateRequest
79
79
  from h2ogpte.rest_sync.models.confirm_user_deletion_request import ConfirmUserDeletionRequest
80
+ from h2ogpte.rest_sync.models.confluence_credentials import ConfluenceCredentials
80
81
  from h2ogpte.rest_sync.models.count import Count
81
82
  from h2ogpte.rest_sync.models.count_with_queue_details import CountWithQueueDetails
82
83
  from h2ogpte.rest_sync.models.create_agent_key_request import CreateAgentKeyRequest
@@ -111,6 +112,7 @@ from h2ogpte.rest_sync.models.guardrails_settings_create_request import Guardrai
111
112
  from h2ogpte.rest_sync.models.h2_ogptgpu_info import H2OGPTGPUInfo
112
113
  from h2ogpte.rest_sync.models.h2_ogpt_system_info import H2OGPTSystemInfo
113
114
  from h2ogpte.rest_sync.models.ingest_from_azure_blob_storage_body import IngestFromAzureBlobStorageBody
115
+ from h2ogpte.rest_sync.models.ingest_from_confluence_body import IngestFromConfluenceBody
114
116
  from h2ogpte.rest_sync.models.ingest_from_file_system_body import IngestFromFileSystemBody
115
117
  from h2ogpte.rest_sync.models.ingest_from_gcs_body import IngestFromGcsBody
116
118
  from h2ogpte.rest_sync.models.ingest_from_s3_body import IngestFromS3Body