h2ogpte 1.6.38rc3__py3-none-any.whl → 1.6.40rc1__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 (35) hide show
  1. h2ogpte/__init__.py +1 -1
  2. h2ogpte/h2ogpte.py +122 -0
  3. h2ogpte/h2ogpte_async.py +123 -0
  4. h2ogpte/rest_async/__init__.py +8 -1
  5. h2ogpte/rest_async/api/agents_api.py +1181 -22
  6. h2ogpte/rest_async/api/permissions_api.py +550 -2
  7. h2ogpte/rest_async/api_client.py +1 -1
  8. h2ogpte/rest_async/configuration.py +1 -1
  9. h2ogpte/rest_async/models/__init__.py +7 -0
  10. h2ogpte/rest_async/models/add_custom_agent_tool201_response_inner.py +87 -0
  11. h2ogpte/rest_async/models/confirm_user_deletion_request.py +87 -0
  12. h2ogpte/rest_async/models/create_agent_tool_request.py +103 -0
  13. h2ogpte/rest_async/models/list_custom_agent_tools200_response_inner.py +95 -0
  14. h2ogpte/rest_async/models/prompt_template.py +3 -1
  15. h2ogpte/rest_async/models/update_custom_agent_tool200_response.py +87 -0
  16. h2ogpte/rest_async/models/update_custom_agent_tool_request.py +87 -0
  17. h2ogpte/rest_async/models/user_deletion_request.py +87 -0
  18. h2ogpte/rest_sync/__init__.py +8 -1
  19. h2ogpte/rest_sync/api/agents_api.py +1181 -22
  20. h2ogpte/rest_sync/api/permissions_api.py +550 -2
  21. h2ogpte/rest_sync/api_client.py +1 -1
  22. h2ogpte/rest_sync/configuration.py +1 -1
  23. h2ogpte/rest_sync/models/__init__.py +7 -0
  24. h2ogpte/rest_sync/models/add_custom_agent_tool201_response_inner.py +87 -0
  25. h2ogpte/rest_sync/models/confirm_user_deletion_request.py +87 -0
  26. h2ogpte/rest_sync/models/create_agent_tool_request.py +103 -0
  27. h2ogpte/rest_sync/models/list_custom_agent_tools200_response_inner.py +95 -0
  28. h2ogpte/rest_sync/models/prompt_template.py +3 -1
  29. h2ogpte/rest_sync/models/update_custom_agent_tool200_response.py +87 -0
  30. h2ogpte/rest_sync/models/update_custom_agent_tool_request.py +87 -0
  31. h2ogpte/rest_sync/models/user_deletion_request.py +87 -0
  32. {h2ogpte-1.6.38rc3.dist-info → h2ogpte-1.6.40rc1.dist-info}/METADATA +1 -1
  33. {h2ogpte-1.6.38rc3.dist-info → h2ogpte-1.6.40rc1.dist-info}/RECORD +35 -21
  34. {h2ogpte-1.6.38rc3.dist-info → h2ogpte-1.6.40rc1.dist-info}/WHEEL +0 -0
  35. {h2ogpte-1.6.38rc3.dist-info → h2ogpte-1.6.40rc1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,87 @@
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 UserDeletionRequest(BaseModel):
26
+ """
27
+ UserDeletionRequest
28
+ """ # noqa: E501
29
+ delete_id: StrictStr = Field(description="Unique identifier for the deletion request. Must be used within 5 minutes to confirm deletion.")
30
+ __properties: ClassVar[List[str]] = ["delete_id"]
31
+
32
+ model_config = ConfigDict(
33
+ populate_by_name=True,
34
+ validate_assignment=True,
35
+ protected_namespaces=(),
36
+ )
37
+
38
+
39
+ def to_str(self) -> str:
40
+ """Returns the string representation of the model using alias"""
41
+ return pprint.pformat(self.model_dump(by_alias=True))
42
+
43
+ def to_json(self) -> str:
44
+ """Returns the JSON representation of the model using alias"""
45
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
46
+ return json.dumps(self.to_dict())
47
+
48
+ @classmethod
49
+ def from_json(cls, json_str: str) -> Optional[Self]:
50
+ """Create an instance of UserDeletionRequest from a JSON string"""
51
+ return cls.from_dict(json.loads(json_str))
52
+
53
+ def to_dict(self) -> Dict[str, Any]:
54
+ """Return the dictionary representation of the model using alias.
55
+
56
+ This has the following differences from calling pydantic's
57
+ `self.model_dump(by_alias=True)`:
58
+
59
+ * `None` is only added to the output dict for nullable fields that
60
+ were set at model initialization. Other fields with value `None`
61
+ are ignored.
62
+ """
63
+ excluded_fields: Set[str] = set([
64
+ ])
65
+
66
+ _dict = self.model_dump(
67
+ by_alias=True,
68
+ exclude=excluded_fields,
69
+ exclude_none=True,
70
+ )
71
+ return _dict
72
+
73
+ @classmethod
74
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
75
+ """Create an instance of UserDeletionRequest from a dict"""
76
+ if obj is None:
77
+ return None
78
+
79
+ if not isinstance(obj, dict):
80
+ return cls.model_validate(obj)
81
+
82
+ _obj = cls.model_validate({
83
+ "delete_id": obj.get("delete_id")
84
+ })
85
+ return _obj
86
+
87
+
@@ -14,7 +14,7 @@
14
14
  """ # noqa: E501
15
15
 
16
16
 
17
- __version__ = "1.6.38-dev3"
17
+ __version__ = "1.6.40-dev1"
18
18
 
19
19
  # import apis into sdk package
20
20
  from h2ogpte.rest_sync.api.api_keys_api import APIKeysApi
@@ -48,6 +48,7 @@ from h2ogpte.rest_sync.models.api_key_create_request import APIKeyCreateRequest
48
48
  from h2ogpte.rest_sync.models.api_key_info import APIKeyInfo
49
49
  from h2ogpte.rest_sync.models.api_key_result import APIKeyResult
50
50
  from h2ogpte.rest_sync.models.api_key_update_expiry_request import APIKeyUpdateExpiryRequest
51
+ from h2ogpte.rest_sync.models.add_custom_agent_tool201_response_inner import AddCustomAgentTool201ResponseInner
51
52
  from h2ogpte.rest_sync.models.agent_key import AgentKey
52
53
  from h2ogpte.rest_sync.models.agent_server_directory_file_stats import AgentServerDirectoryFileStats
53
54
  from h2ogpte.rest_sync.models.agent_server_directory_stats import AgentServerDirectoryStats
@@ -74,10 +75,12 @@ from h2ogpte.rest_sync.models.collection_change_request import CollectionChangeR
74
75
  from h2ogpte.rest_sync.models.collection_create_request import CollectionCreateRequest
75
76
  from h2ogpte.rest_sync.models.collection_settings import CollectionSettings
76
77
  from h2ogpte.rest_sync.models.collection_update_request import CollectionUpdateRequest
78
+ from h2ogpte.rest_sync.models.confirm_user_deletion_request import ConfirmUserDeletionRequest
77
79
  from h2ogpte.rest_sync.models.count import Count
78
80
  from h2ogpte.rest_sync.models.count_with_queue_details import CountWithQueueDetails
79
81
  from h2ogpte.rest_sync.models.create_agent_key_request import CreateAgentKeyRequest
80
82
  from h2ogpte.rest_sync.models.create_agent_tool_key_associations_request import CreateAgentToolKeyAssociationsRequest
83
+ from h2ogpte.rest_sync.models.create_agent_tool_request import CreateAgentToolRequest
81
84
  from h2ogpte.rest_sync.models.create_import_collection_to_collection_job_request import CreateImportCollectionToCollectionJobRequest
82
85
  from h2ogpte.rest_sync.models.create_insert_document_to_collection_job_request import CreateInsertDocumentToCollectionJobRequest
83
86
  from h2ogpte.rest_sync.models.create_secret201_response import CreateSecret201Response
@@ -112,6 +115,7 @@ from h2ogpte.rest_sync.models.ingest_upload_body import IngestUploadBody
112
115
  from h2ogpte.rest_sync.models.job_details import JobDetails
113
116
  from h2ogpte.rest_sync.models.job_details_status import JobDetailsStatus
114
117
  from h2ogpte.rest_sync.models.key_association import KeyAssociation
118
+ from h2ogpte.rest_sync.models.list_custom_agent_tools200_response_inner import ListCustomAgentTools200ResponseInner
115
119
  from h2ogpte.rest_sync.models.match_collection_chunks_request import MatchCollectionChunksRequest
116
120
  from h2ogpte.rest_sync.models.message_vote_update_request import MessageVoteUpdateRequest
117
121
  from h2ogpte.rest_sync.models.model import Model
@@ -154,6 +158,8 @@ from h2ogpte.rest_sync.models.update_agent_tool_preference_request import Update
154
158
  from h2ogpte.rest_sync.models.update_collection_expiry_date_request import UpdateCollectionExpiryDateRequest
155
159
  from h2ogpte.rest_sync.models.update_collection_inactivity_interval_request import UpdateCollectionInactivityIntervalRequest
156
160
  from h2ogpte.rest_sync.models.update_collection_privacy_request import UpdateCollectionPrivacyRequest
161
+ from h2ogpte.rest_sync.models.update_custom_agent_tool200_response import UpdateCustomAgentTool200Response
162
+ from h2ogpte.rest_sync.models.update_custom_agent_tool_request import UpdateCustomAgentToolRequest
157
163
  from h2ogpte.rest_sync.models.update_default_prompt_template_visibility_request import UpdateDefaultPromptTemplateVisibilityRequest
158
164
  from h2ogpte.rest_sync.models.update_prompt_template_privacy_request import UpdatePromptTemplatePrivacyRequest
159
165
  from h2ogpte.rest_sync.models.update_qa_feedback_request import UpdateQAFeedbackRequest
@@ -164,6 +170,7 @@ from h2ogpte.rest_sync.models.usage_stats_per_model import UsageStatsPerModel
164
170
  from h2ogpte.rest_sync.models.usage_stats_per_model_and_user import UsageStatsPerModelAndUser
165
171
  from h2ogpte.rest_sync.models.usage_stats_per_user import UsageStatsPerUser
166
172
  from h2ogpte.rest_sync.models.user_configuration_item import UserConfigurationItem
173
+ from h2ogpte.rest_sync.models.user_deletion_request import UserDeletionRequest
167
174
  from h2ogpte.rest_sync.models.user_info import UserInfo
168
175
  from h2ogpte.rest_sync.models.user_job_details import UserJobDetails
169
176
  from h2ogpte.rest_sync.models.user_permission import UserPermission