h2ogpte 1.6.41rc4__py3-none-any.whl → 1.6.42__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 +1 -1
- h2ogpte/h2ogpte_async.py +1 -1
- h2ogpte/h2ogpte_sync_base.py +1 -0
- h2ogpte/rest_async/__init__.py +1 -1
- h2ogpte/rest_async/api_client.py +1 -1
- h2ogpte/rest_async/configuration.py +1 -1
- h2ogpte/rest_sync/__init__.py +1 -1
- h2ogpte/rest_sync/api_client.py +1 -1
- h2ogpte/rest_sync/configuration.py +1 -1
- h2ogpte/session.py +1 -0
- h2ogpte/session_async.py +1 -0
- {h2ogpte-1.6.41rc4.dist-info → h2ogpte-1.6.42.dist-info}/METADATA +47 -1
- {h2ogpte-1.6.41rc4.dist-info → h2ogpte-1.6.42.dist-info}/RECORD +15 -15
- {h2ogpte-1.6.41rc4.dist-info → h2ogpte-1.6.42.dist-info}/WHEEL +0 -0
- {h2ogpte-1.6.41rc4.dist-info → h2ogpte-1.6.42.dist-info}/top_level.txt +0 -0
h2ogpte/__init__.py
CHANGED
h2ogpte/h2ogpte_async.py
CHANGED
|
@@ -6898,7 +6898,7 @@ class H2OGPTEAsync:
|
|
|
6898
6898
|
from h2ogpte import __version__ as client_version
|
|
6899
6899
|
|
|
6900
6900
|
server_version = (await self.get_meta()).version
|
|
6901
|
-
server_version = server_version.lstrip("v")
|
|
6901
|
+
server_version = server_version.lstrip("v").replace("-dev", "rc")
|
|
6902
6902
|
|
|
6903
6903
|
if server_version != client_version:
|
|
6904
6904
|
msg = (
|
h2ogpte/h2ogpte_sync_base.py
CHANGED
|
@@ -149,6 +149,7 @@ class H2OGPTESyncBase:
|
|
|
149
149
|
if server_version[0] == "v":
|
|
150
150
|
server_version = server_version[1:]
|
|
151
151
|
|
|
152
|
+
server_version = server_version.replace("-dev", "rc")
|
|
152
153
|
if server_version != client_version:
|
|
153
154
|
msg = (
|
|
154
155
|
f"Warning: Server version {server_version} doesn't match client "
|
h2ogpte/rest_async/__init__.py
CHANGED
h2ogpte/rest_async/api_client.py
CHANGED
|
@@ -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.
|
|
93
|
+
self.user_agent = 'OpenAPI-Generator/1.6.42/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.
|
|
502
|
+
"SDK Package Version: 1.6.42".\
|
|
503
503
|
format(env=sys.platform, pyversion=sys.version)
|
|
504
504
|
|
|
505
505
|
def get_host_settings(self) -> List[HostSetting]:
|
h2ogpte/rest_sync/__init__.py
CHANGED
h2ogpte/rest_sync/api_client.py
CHANGED
|
@@ -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.
|
|
93
|
+
self.user_agent = 'OpenAPI-Generator/1.6.42/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.
|
|
506
|
+
"SDK Package Version: 1.6.42".\
|
|
507
507
|
format(env=sys.platform, pyversion=sys.version)
|
|
508
508
|
|
|
509
509
|
def get_host_settings(self) -> List[HostSetting]:
|
h2ogpte/session.py
CHANGED
|
@@ -275,6 +275,7 @@ class Session:
|
|
|
275
275
|
agent_original_files (List[str], default: None) — List of file paths for agent to process.
|
|
276
276
|
agent_timeout (int, default: None) — Timeout in seconds for each agent turn.
|
|
277
277
|
agent_total_timeout (int, default: 3600) — Total timeout in seconds for all agent processing.
|
|
278
|
+
agent_min_time (int, default: 0) — Minimum time in seconds for all agent processing.
|
|
278
279
|
agent_code_writer_system_message (str, default: None) — System message for agent code writer.
|
|
279
280
|
agent_num_executable_code_blocks_limit (int, default: 1) — Maximum number of executable code blocks.
|
|
280
281
|
agent_system_site_packages (bool, default: True) — Whether agent has access to system site packages.
|
h2ogpte/session_async.py
CHANGED
|
@@ -186,6 +186,7 @@ class SessionAsync:
|
|
|
186
186
|
agent_original_files (List[str], default: None) — List of file paths for agent to process.
|
|
187
187
|
agent_timeout (int, default: None) — Timeout in seconds for each agent turn.
|
|
188
188
|
agent_total_timeout (int, default: 3600) — Total timeout in seconds for all agent processing.
|
|
189
|
+
agent_min_time (int, default: 0) — Minimum time in seconds for all agent processing.
|
|
189
190
|
agent_code_writer_system_message (str, default: None) — System message for agent code writer.
|
|
190
191
|
agent_num_executable_code_blocks_limit (int, default: 1) — Maximum number of executable code blocks.
|
|
191
192
|
agent_system_site_packages (bool, default: True) — Whether agent has access to system site packages.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: h2ogpte
|
|
3
|
-
Version: 1.6.
|
|
3
|
+
Version: 1.6.42
|
|
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
|
|
@@ -229,3 +229,49 @@ for doc in documents:
|
|
|
229
229
|
)
|
|
230
230
|
print(summary.content)
|
|
231
231
|
```
|
|
232
|
+
|
|
233
|
+
### OpenAI-compatible API
|
|
234
|
+
|
|
235
|
+
H2OGPTe provides an API that enables communication with underlying LLMs via openai clients.
|
|
236
|
+
|
|
237
|
+
Example:
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
pip install openai
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
```py
|
|
244
|
+
# Create OpenAI client
|
|
245
|
+
from openai import OpenAI
|
|
246
|
+
client = OpenAI(
|
|
247
|
+
api_key='sk-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
|
248
|
+
base_url="https://h2ogpte.genai.h2o.ai/openai_api/v1"
|
|
249
|
+
)
|
|
250
|
+
|
|
251
|
+
# List available models
|
|
252
|
+
models = client.models.list()
|
|
253
|
+
for m in models:
|
|
254
|
+
print(m.id)
|
|
255
|
+
|
|
256
|
+
# Create chat completion
|
|
257
|
+
response = client.chat.completions.create(
|
|
258
|
+
model="auto",
|
|
259
|
+
messages=[
|
|
260
|
+
{
|
|
261
|
+
"role": "user",
|
|
262
|
+
"content": "What color is the sky?",
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"role": "assistant",
|
|
266
|
+
"content": "pink",
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"role": "user",
|
|
270
|
+
"content": "What was the answer, again?",
|
|
271
|
+
},
|
|
272
|
+
],
|
|
273
|
+
)
|
|
274
|
+
print(response)
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
See [docs](https://docs.h2o.ai/enterprise-h2ogpte/rest-api#openai-compatible-rest-api) for more details.
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
h2ogpte/__init__.py,sha256=
|
|
1
|
+
h2ogpte/__init__.py,sha256=fdWo4p8S_1IS0AdboFoA7p4OONmctc04UIHwbbtOKa0,1521
|
|
2
2
|
h2ogpte/connectors.py,sha256=nKUK6rWeFoI4VTonh4xvAfLMHFqeYgVgSydRTYUzTZg,7728
|
|
3
3
|
h2ogpte/errors.py,sha256=XgLdfJO1fZ9Bf9rhUKpnvRzzvkNyan3Oc6WzGS6hCUA,1248
|
|
4
4
|
h2ogpte/h2ogpte.py,sha256=DaEAEH4w8czmEXEfttvqZkKIzsPFCkBTHJ4fGA2fIPk,282677
|
|
5
|
-
h2ogpte/h2ogpte_async.py,sha256=
|
|
6
|
-
h2ogpte/h2ogpte_sync_base.py,sha256=
|
|
7
|
-
h2ogpte/session.py,sha256=
|
|
8
|
-
h2ogpte/session_async.py,sha256=
|
|
5
|
+
h2ogpte/h2ogpte_async.py,sha256=vPXzdTWmY59C1Ae6euOFmpoz-T-kXYIIfukznzLN9Y4,302178
|
|
6
|
+
h2ogpte/h2ogpte_sync_base.py,sha256=RJSt_2CSyhKr0bahrso__KjQ_8rTvhTWGiwj1Z-wWs8,15141
|
|
7
|
+
h2ogpte/session.py,sha256=tvj7agUM_oHjSz09Gpd4iHdXABzTdq_T2i6faw843z8,30705
|
|
8
|
+
h2ogpte/session_async.py,sha256=qXWpfNF-gV8HkJ3rpSsFvmOwsB9VfINgq9ziO_C2Az4,28984
|
|
9
9
|
h2ogpte/shared_client.py,sha256=Zh24myL--5JDdrKoJPW4aeprHX6a_oB9o461Ho3hnU8,14691
|
|
10
10
|
h2ogpte/types.py,sha256=co2G3AjIj_QR4gLH9HZP96Lakg10b_kg1_73LTv1HrY,14896
|
|
11
11
|
h2ogpte/utils.py,sha256=Z9n57xxPu0KtsCzkJ9V_VgTW--oG_aXTLBgmXDWSdnM,3201
|
|
12
|
-
h2ogpte/rest_async/__init__.py,sha256=
|
|
13
|
-
h2ogpte/rest_async/api_client.py,sha256=
|
|
12
|
+
h2ogpte/rest_async/__init__.py,sha256=LapEz1V1aY3ZNytOT7TlNEkdtM21m8XEaD6-2QMtwL8,14785
|
|
13
|
+
h2ogpte/rest_async/api_client.py,sha256=AWn7PGRP79QSNW6YSToBwv25mIi4Z3HPbGLwSgvFB4U,29505
|
|
14
14
|
h2ogpte/rest_async/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
|
|
15
|
-
h2ogpte/rest_async/configuration.py,sha256=
|
|
15
|
+
h2ogpte/rest_async/configuration.py,sha256=fWEgInzrsXKiVeZCeUFdUfG7V3sbrTnntIq7TCi7HCM,19562
|
|
16
16
|
h2ogpte/rest_async/exceptions.py,sha256=aSDc-0lURtyQjf5HGa7_Ta0nATxKxfHW3huDA2Zdj6o,8370
|
|
17
17
|
h2ogpte/rest_async/rest.py,sha256=mdjDwzJ1kiaYtONUfDRqKsRPw5-tG6eyZV2P1yBuwRo,9147
|
|
18
18
|
h2ogpte/rest_async/api/__init__.py,sha256=R_x57GGyaSgxZyrJOyOt551TodbRSQf3T7VrraQc-84,973
|
|
@@ -164,10 +164,10 @@ h2ogpte/rest_async/models/user_deletion_request.py,sha256=z7gD8XKOGwwg782TRzXJii
|
|
|
164
164
|
h2ogpte/rest_async/models/user_info.py,sha256=ef59Eh9k42JUY3X2RnCrwYR7sc_8lXT1vRLGoNz3uTU,4489
|
|
165
165
|
h2ogpte/rest_async/models/user_job_details.py,sha256=kzu8fLxVsRMgnyt6dLr0VWjlIoE3i1VRpGR9nDxFyk4,4985
|
|
166
166
|
h2ogpte/rest_async/models/user_permission.py,sha256=9ffijaF3U3SYz_T_kcqHPJUfIZFkpCH0vBGboPjsg2o,4646
|
|
167
|
-
h2ogpte/rest_sync/__init__.py,sha256=
|
|
168
|
-
h2ogpte/rest_sync/api_client.py,sha256=
|
|
167
|
+
h2ogpte/rest_sync/__init__.py,sha256=i-7jr_QEbKaBjxrgTNUuFNaYeuNaWJM4m1ytHWuJAlg,14629
|
|
168
|
+
h2ogpte/rest_sync/api_client.py,sha256=QbPsET1URowFqdLpf1DZgupofWeTNrKJ-shLZRkMSv8,29392
|
|
169
169
|
h2ogpte/rest_sync/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
|
|
170
|
-
h2ogpte/rest_sync/configuration.py,sha256=
|
|
170
|
+
h2ogpte/rest_sync/configuration.py,sha256=nsvn6l00TFa6bbWRmmbHJKRYu2E-M4gzXDdY7_HS7_U,19845
|
|
171
171
|
h2ogpte/rest_sync/exceptions.py,sha256=aSDc-0lURtyQjf5HGa7_Ta0nATxKxfHW3huDA2Zdj6o,8370
|
|
172
172
|
h2ogpte/rest_sync/rest.py,sha256=evRzviTYC_fsrpTtFlGvruXmquH9C0jDn-oQrGrE5A0,11314
|
|
173
173
|
h2ogpte/rest_sync/api/__init__.py,sha256=ZuLQQtyiXnP5UOwTlIOYLGLQq1BG_0PEkzC9s698vjM,958
|
|
@@ -319,7 +319,7 @@ h2ogpte/rest_sync/models/user_deletion_request.py,sha256=z7gD8XKOGwwg782TRzXJiiP
|
|
|
319
319
|
h2ogpte/rest_sync/models/user_info.py,sha256=ef59Eh9k42JUY3X2RnCrwYR7sc_8lXT1vRLGoNz3uTU,4489
|
|
320
320
|
h2ogpte/rest_sync/models/user_job_details.py,sha256=9cbhpgLMDpar-aTOaY5Ygud-8Kbi23cLNldTGab0Sd8,4984
|
|
321
321
|
h2ogpte/rest_sync/models/user_permission.py,sha256=9ffijaF3U3SYz_T_kcqHPJUfIZFkpCH0vBGboPjsg2o,4646
|
|
322
|
-
h2ogpte-1.6.
|
|
323
|
-
h2ogpte-1.6.
|
|
324
|
-
h2ogpte-1.6.
|
|
325
|
-
h2ogpte-1.6.
|
|
322
|
+
h2ogpte-1.6.42.dist-info/METADATA,sha256=ZUKwjwRGkrQHuc4mX3MI2lG57zL12_8akvNtoKWT6-I,8491
|
|
323
|
+
h2ogpte-1.6.42.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
324
|
+
h2ogpte-1.6.42.dist-info/top_level.txt,sha256=vXV4JnNwFWFAqTWyHrH-cGIQqbCcEDG9-BbyNn58JpM,8
|
|
325
|
+
h2ogpte-1.6.42.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|