h2ogpte 1.6.43rc9__py3-none-any.whl → 1.6.44rc2__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.43rc9"
6
+ __version__ = "1.6.44rc2"
7
7
 
8
8
  __all__ = [
9
9
  "H2OGPTE",
h2ogpte/h2ogpte.py CHANGED
@@ -6927,6 +6927,37 @@ class H2OGPTE(H2OGPTESyncBase):
6927
6927
  )
6928
6928
 
6929
6929
  def add_agent_key(self, agent_keys: List[dict]) -> List[dict]:
6930
+ """Create one or more agent keys for use with agent tools.
6931
+
6932
+ Processes a list of agent key configurations and creates each key.
6933
+ Continues processing remaining keys if individual key creation fails.
6934
+
6935
+ Args:
6936
+ agent_keys: List of key configuration dictionaries.
6937
+
6938
+ Expected structure::
6939
+
6940
+ [
6941
+ {
6942
+ "name": str,
6943
+ # Display name for the key
6944
+
6945
+ "value": str,
6946
+ # The actual key/token value
6947
+
6948
+ "key_type": str,
6949
+ # Type of key ("private" or "shared")
6950
+
6951
+ "description": str,
6952
+ # (Optional) Description of the key's purpose
6953
+ }
6954
+ ]
6955
+
6956
+ Returns:
6957
+ List[dict]: List of created key results. Each successful creation
6958
+ returns {"agent_key_id": str}. Failed creations are logged but
6959
+ don't appear in results.
6960
+ """
6930
6961
  result = []
6931
6962
  header = self._get_auth_header()
6932
6963
  with self._RESTClient(self) as rest_client:
@@ -6993,6 +7024,29 @@ class H2OGPTE(H2OGPTESyncBase):
6993
7024
  def assign_agent_key_for_tool(
6994
7025
  self, tool_dict_list: List[dict]
6995
7026
  ) -> Optional[List[Tuple]]:
7027
+ """Assign agent keys to tools by creating associations between them.
7028
+
7029
+ Args:
7030
+ tool_dict_list: List of dictionaries containing tool association data.
7031
+ Each dictionary should have a "tool_dict" key with the association
7032
+ configuration data for creating agent tool key associations.
7033
+
7034
+ Expected tool_dict structure::
7035
+
7036
+ {
7037
+ "tool": str, # Name of the tool (for example, "test_tool").
7038
+ "keys": list[dict], # List of key definitions. Each item is a dictionary with:
7039
+ # - "name": str
7040
+ # Environment variable name (for example, "TEST_KEY").
7041
+ # - "key_id": Any
7042
+ # Identifier assigned to the key (for example, agent_key_id).
7043
+ }
7044
+
7045
+ Returns:
7046
+ Optional[List[Tuple]]: List of tuples containing association details.
7047
+ Each tuple contains (associate_id, tool, key_name, key_id, user_id).
7048
+ Returns None if no associations were created.
7049
+ """
6996
7050
  result = []
6997
7051
  header = self._get_auth_header()
6998
7052
  with self._RESTClient(self) as rest_client:
h2ogpte/h2ogpte_async.py CHANGED
@@ -7184,6 +7184,37 @@ class H2OGPTEAsync:
7184
7184
  )
7185
7185
 
7186
7186
  async def add_agent_key(self, agent_keys: List[dict]) -> List[dict]:
7187
+ """Create one or more agent keys for use with agent tools.
7188
+
7189
+ Processes a list of agent key configurations and creates each key.
7190
+ Continues processing remaining keys if individual key creation fails.
7191
+
7192
+ Args:
7193
+ agent_keys: List of key configuration dictionaries.
7194
+
7195
+ Expected structure::
7196
+
7197
+ [
7198
+ {
7199
+ "name": str,
7200
+ # Display name for the key
7201
+
7202
+ "value": str,
7203
+ # The actual key/token value
7204
+
7205
+ "key_type": str,
7206
+ # Type of key ("private" or "shared")
7207
+
7208
+ "description": str,
7209
+ # (Optional) Description of the key's purpose
7210
+ }
7211
+ ]
7212
+
7213
+ Returns:
7214
+ List[dict]: List of created key results. Each successful creation
7215
+ returns {"agent_key_id": str}. Failed creations are logged but
7216
+ don't appear in results.
7217
+ """
7187
7218
  result = []
7188
7219
  header = await self._get_auth_header()
7189
7220
  async with self._RESTClient(self) as rest_client:
@@ -7250,6 +7281,29 @@ class H2OGPTEAsync:
7250
7281
  async def assign_agent_key_for_tool(
7251
7282
  self, tool_dict_list: List[dict]
7252
7283
  ) -> Optional[List[Tuple]]:
7284
+ """Assign agent keys to tools by creating associations between them.
7285
+
7286
+ Args:
7287
+ tool_dict_list: List of dictionaries containing tool association data.
7288
+ Each dictionary should have a "tool_dict" key with the association
7289
+ configuration data for creating agent tool key associations.
7290
+
7291
+ Expected tool_dict structure::
7292
+
7293
+ {
7294
+ "tool": str, # Name of the tool (for example, "test_tool").
7295
+ "keys": list[dict], # List of key definitions. Each item is a dictionary with:
7296
+ # - "name": str
7297
+ # Environment variable name (for example, "TEST_KEY").
7298
+ # - "key_id": Any
7299
+ # Identifier assigned to the key (for example, agent_key_id).
7300
+ }
7301
+
7302
+ Returns:
7303
+ Optional[List[Tuple]]: List of tuples containing association details.
7304
+ Each tuple contains (associate_id, tool, key_name, key_id, user_id).
7305
+ Returns None if no associations were created.
7306
+ """
7253
7307
  result = []
7254
7308
  header = await self._get_auth_header()
7255
7309
  async with self._RESTClient(self) as rest_client:
@@ -14,7 +14,7 @@
14
14
  """ # noqa: E501
15
15
 
16
16
 
17
- __version__ = "1.6.43-dev9"
17
+ __version__ = "1.6.44-dev2"
18
18
 
19
19
  # import apis into sdk package
20
20
  from h2ogpte.rest_async.api.api_keys_api import APIKeysApi
@@ -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-dev9/python'
93
+ self.user_agent = 'OpenAPI-Generator/1.6.44-dev2/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-dev9".\
502
+ "SDK Package Version: 1.6.44-dev2".\
503
503
  format(env=sys.platform, pyversion=sys.version)
504
504
 
505
505
  def get_host_settings(self) -> List[HostSetting]:
@@ -14,7 +14,7 @@
14
14
  """ # noqa: E501
15
15
 
16
16
 
17
- __version__ = "1.6.43-dev9"
17
+ __version__ = "1.6.44-dev2"
18
18
 
19
19
  # import apis into sdk package
20
20
  from h2ogpte.rest_sync.api.api_keys_api import APIKeysApi
@@ -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-dev9/python'
93
+ self.user_agent = 'OpenAPI-Generator/1.6.44-dev2/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.43-dev9".\
506
+ "SDK Package Version: 1.6.44-dev2".\
507
507
  format(env=sys.platform, pyversion=sys.version)
508
508
 
509
509
  def get_host_settings(self) -> List[HostSetting]:
h2ogpte/session.py CHANGED
@@ -149,6 +149,7 @@ class Session:
149
149
  ssl_context=ssl_context,
150
150
  open_timeout=self._open_timeout,
151
151
  close_timeout=self._close_timeout,
152
+ max_size=5 * 1024 * 1024, # 5 MB limit for large responses
152
153
  )
153
154
  return self._connection
154
155
  except (ConnectionClosedError, InvalidURI, InvalidHandshake) as e:
h2ogpte/session_async.py CHANGED
@@ -478,6 +478,7 @@ class SessionAsync:
478
478
  open_timeout=self._open_timeout,
479
479
  close_timeout=self._close_timeout,
480
480
  ssl=ssl_context,
481
+ max_size=5 * 1024 * 1024, # 5 MB limit for large responses
481
482
  )
482
483
  return self._websocket
483
484
  except (ConnectionClosedError, InvalidURI, InvalidHandshake) as e:
h2ogpte/types.py CHANGED
@@ -123,6 +123,8 @@ class ChatMessageFull(BaseModel):
123
123
  type_list: Optional[List[ChatMessageMeta]] = []
124
124
  has_references: bool
125
125
  total_references: int
126
+ collection_id: Optional[str] = None
127
+ collection_name: Optional[str] = None
126
128
  error: Optional[str] = None
127
129
 
128
130
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: h2ogpte
3
- Version: 1.6.43rc9
3
+ Version: 1.6.44rc2
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,13 +1,13 @@
1
- h2ogpte/__init__.py,sha256=j_E2gXwZIGy4HT31L3Z-hEB3wMFdCmCQiHS8N6__ePA,1524
1
+ h2ogpte/__init__.py,sha256=41dhYDoY-nWEyPAY5eTqGt0RzE7T7bIpzr__XAnWyuI,1524
2
2
  h2ogpte/connectors.py,sha256=vkILsfW-tsLUn6KB6zgu_kjps4NMGgJpZ3OOaIjji04,8057
3
3
  h2ogpte/errors.py,sha256=XgLdfJO1fZ9Bf9rhUKpnvRzzvkNyan3Oc6WzGS6hCUA,1248
4
- h2ogpte/h2ogpte.py,sha256=DQC3Y1Lb9oef51hLK065g6-TSKQ7qiSICUYTwG7DCow,305935
5
- h2ogpte/h2ogpte_async.py,sha256=tzWqm9H92Jg01Ut3PdtbRUpysxbsa7uJS-9pplzbRXA,325832
4
+ h2ogpte/h2ogpte.py,sha256=qUGUWHllcS-yYYIoR1TKW_8AuIOLqxWQ1aEfbYzAPPw,308265
5
+ h2ogpte/h2ogpte_async.py,sha256=f2LQUXhuW7UjqQJ6kwgB0fF1XhQyW5sGem5xOU_IY3Q,328162
6
6
  h2ogpte/h2ogpte_sync_base.py,sha256=ftsVzpMqEsyi0UACMI-7H_EIYEx9JEdEUImbyjWy_Hc,15285
7
- h2ogpte/session.py,sha256=skOQa5XmCwdH1k7XdzKmc6jlwn9zcih-RVbAXnrwJ4g,32528
8
- h2ogpte/session_async.py,sha256=-V4rRh1diu5JD8IV9NYIKT_OGo7w-iYyHSnODygOp54,31274
7
+ h2ogpte/session.py,sha256=BqJg3mWVeyz_ZLUJC_olzZzeLnRSaJwCH1NkXXfhg54,32608
8
+ h2ogpte/session_async.py,sha256=UzNijTn3kZjAUYl_Jn5Oji4QrPTOpdX9KKByTmhLlK8,31354
9
9
  h2ogpte/shared_client.py,sha256=Zh24myL--5JDdrKoJPW4aeprHX6a_oB9o461Ho3hnU8,14691
10
- h2ogpte/types.py,sha256=umPY5ymhpLBxfLSqKY5cTDhmPxeDRIw_GT-yyXY3yng,15226
10
+ h2ogpte/types.py,sha256=IRpRYrwKAGxiET3T-15R1heCRzpF0PXHwClC31GOuzM,15308
11
11
  h2ogpte/utils.py,sha256=Z9n57xxPu0KtsCzkJ9V_VgTW--oG_aXTLBgmXDWSdnM,3201
12
12
  h2ogpte/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
13
  h2ogpte/cli/main.py,sha256=Upf3t_5m1RqLh1jKGB6Gbyp3n9sujVny7sY-qxh2PYo,2722
@@ -41,10 +41,10 @@ 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=pn91KQsrprFtMAZkD6u57t_atCeEuuHOfYcyBfO79MM,15203
45
- h2ogpte/rest_async/api_client.py,sha256=JOX7s12FP_qMr7tr2C093tvXrIROkuyCdA2jDagxVbU,29510
44
+ h2ogpte/rest_async/__init__.py,sha256=TvbG7vh_bWZ1DXrKsyNXLdA7ko8Ma2mbt98XKZE10RQ,15203
45
+ h2ogpte/rest_async/api_client.py,sha256=9weDOIQYDGenS3a7Hz09cwEnX4y8iD1Bmy0dW1Y_iFg,29510
46
46
  h2ogpte/rest_async/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
47
- h2ogpte/rest_async/configuration.py,sha256=0I0JtgDTl63q0EfEpSbAz7vMi0gHHVnmMXQna6so56E,19567
47
+ h2ogpte/rest_async/configuration.py,sha256=TP67x9i9MlSQHOhFWjIGbvgwV_suJnOr-r9NEEC70Lg,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
@@ -201,10 +201,10 @@ 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=9ffijaF3U3SYz_T_kcqHPJUfIZFkpCH0vBGboPjsg2o,4646
204
- h2ogpte/rest_sync/__init__.py,sha256=qHr8xGePQrfAz4fdPfhKqt7J2kMIU59I49Bve36tfog,15042
205
- h2ogpte/rest_sync/api_client.py,sha256=gHhM3KKT9qZmCOdeR2ZQIJ7YDXmnG3PwbWAfekYGX-A,29397
204
+ h2ogpte/rest_sync/__init__.py,sha256=tZObsHV1yFgX_Q1x3VvUWH2pxXRHIr7rY0XSuri7hGw,15042
205
+ h2ogpte/rest_sync/api_client.py,sha256=2wYQyyFN94Kcuged62M8yZJwSJwyVVQhorpgCGF85KE,29397
206
206
  h2ogpte/rest_sync/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
207
- h2ogpte/rest_sync/configuration.py,sha256=iztT8c9fqaUpXeilq3GHQl99WqCATvUv4oQpf7kOleg,19850
207
+ h2ogpte/rest_sync/configuration.py,sha256=3nixVjOO5LmNhl-jNGn99ex8MksePUsNZhlAyBY3xxw,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
@@ -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=9ffijaF3U3SYz_T_kcqHPJUfIZFkpCH0vBGboPjsg2o,4646
364
- h2ogpte-1.6.43rc9.dist-info/METADATA,sha256=5ebWY4JvX7TTv6Lnt16lshefF8oout7gdWRECge83pw,8615
365
- h2ogpte-1.6.43rc9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
366
- h2ogpte-1.6.43rc9.dist-info/entry_points.txt,sha256=BlaqX2SXJanrOGqNYwnzvCxHGNadM7RBI4pW4rVo5z4,54
367
- h2ogpte-1.6.43rc9.dist-info/top_level.txt,sha256=vXV4JnNwFWFAqTWyHrH-cGIQqbCcEDG9-BbyNn58JpM,8
368
- h2ogpte-1.6.43rc9.dist-info/RECORD,,
364
+ h2ogpte-1.6.44rc2.dist-info/METADATA,sha256=qs4of6FD7lu3W-hS-ZgnlsCReV6WjInTBuX8YNqnbAQ,8615
365
+ h2ogpte-1.6.44rc2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
366
+ h2ogpte-1.6.44rc2.dist-info/entry_points.txt,sha256=BlaqX2SXJanrOGqNYwnzvCxHGNadM7RBI4pW4rVo5z4,54
367
+ h2ogpte-1.6.44rc2.dist-info/top_level.txt,sha256=vXV4JnNwFWFAqTWyHrH-cGIQqbCcEDG9-BbyNn58JpM,8
368
+ h2ogpte-1.6.44rc2.dist-info/RECORD,,