relaxai 0.1.0__py3-none-any.whl → 0.17.0__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.
Potentially problematic release.
This version of relaxai might be problematic. Click here for more details.
- relaxai/_base_client.py +4 -1
- relaxai/_client.py +77 -40
- relaxai/_files.py +4 -4
- relaxai/_version.py +1 -1
- relaxai/resources/__init__.py +0 -14
- relaxai/resources/chat.py +38 -13
- relaxai/resources/embeddings.py +18 -18
- relaxai/resources/models.py +57 -57
- relaxai/types/__init__.py +11 -6
- relaxai/types/chat_completion_message.py +29 -3
- relaxai/types/chat_completion_message_param.py +29 -4
- relaxai/types/{chat_create_completion_response.py → chat_completion_response.py} +4 -4
- relaxai/types/chat_create_completion_params.py +40 -8
- relaxai/types/{embedding_create_params.py → embedding_create_embedding_params.py} +2 -2
- relaxai/types/{embedding_create_response.py → embedding_response.py} +4 -4
- relaxai/types/{health_check_response.py → health_response.py} +2 -2
- relaxai/types/{model_list_response.py → model_list.py} +2 -2
- relaxai/types/shared/__init__.py +5 -0
- relaxai/types/shared/openai_completion_tokens_details.py +15 -0
- relaxai/types/shared/openai_prompt_tokens_details.py +11 -0
- relaxai/types/shared/openai_usage.py +19 -0
- relaxai/types/stream_options_param.py +11 -0
- {relaxai-0.1.0.dist-info → relaxai-0.17.0.dist-info}/METADATA +43 -35
- relaxai-0.17.0.dist-info/RECORD +53 -0
- relaxai/resources/health.py +0 -134
- relaxai/types/usage.py +0 -33
- relaxai-0.1.0.dist-info/RECORD +0 -50
- {relaxai-0.1.0.dist-info → relaxai-0.17.0.dist-info}/WHEEL +0 -0
- {relaxai-0.1.0.dist-info → relaxai-0.17.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: relaxai
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.17.0
|
|
4
4
|
Summary: The official Python library for the relaxai API
|
|
5
5
|
Project-URL: Homepage, https://github.com/relax-ai/python-sdk
|
|
6
6
|
Project-URL: Repository, https://github.com/relax-ai/python-sdk
|
|
7
|
-
Author-email: Relaxai <hello@
|
|
7
|
+
Author-email: Relaxai <hello@relax.ai>
|
|
8
8
|
License: Apache-2.0
|
|
9
9
|
Classifier: Intended Audience :: Developers
|
|
10
10
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
@@ -67,16 +67,17 @@ client = Relaxai(
|
|
|
67
67
|
api_key=os.environ.get("RELAXAI_API_KEY"), # This is the default and can be omitted
|
|
68
68
|
)
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
chat_completion_response = client.chat.create_completion(
|
|
71
71
|
messages=[
|
|
72
72
|
{
|
|
73
|
-
"
|
|
74
|
-
"
|
|
73
|
+
"role": "user",
|
|
74
|
+
"content": "Hello, how are you?",
|
|
75
75
|
}
|
|
76
76
|
],
|
|
77
|
-
model="
|
|
77
|
+
model="Llama-4-Maverick-17B-128E",
|
|
78
|
+
max_tokens=100,
|
|
78
79
|
)
|
|
79
|
-
print(
|
|
80
|
+
print(chat_completion_response.choices)
|
|
80
81
|
```
|
|
81
82
|
|
|
82
83
|
While you can provide an `api_key` keyword argument,
|
|
@@ -99,16 +100,17 @@ client = AsyncRelaxai(
|
|
|
99
100
|
|
|
100
101
|
|
|
101
102
|
async def main() -> None:
|
|
102
|
-
|
|
103
|
+
chat_completion_response = await client.chat.create_completion(
|
|
103
104
|
messages=[
|
|
104
105
|
{
|
|
105
|
-
"
|
|
106
|
-
"
|
|
106
|
+
"role": "user",
|
|
107
|
+
"content": "Hello, how are you?",
|
|
107
108
|
}
|
|
108
109
|
],
|
|
109
|
-
model="
|
|
110
|
+
model="Llama-4-Maverick-17B-128E",
|
|
111
|
+
max_tokens=100,
|
|
110
112
|
)
|
|
111
|
-
print(
|
|
113
|
+
print(chat_completion_response.choices)
|
|
112
114
|
|
|
113
115
|
|
|
114
116
|
asyncio.run(main())
|
|
@@ -140,16 +142,17 @@ async def main() -> None:
|
|
|
140
142
|
api_key="My API Key",
|
|
141
143
|
http_client=DefaultAioHttpClient(),
|
|
142
144
|
) as client:
|
|
143
|
-
|
|
145
|
+
chat_completion_response = await client.chat.create_completion(
|
|
144
146
|
messages=[
|
|
145
147
|
{
|
|
146
|
-
"
|
|
147
|
-
"
|
|
148
|
+
"role": "user",
|
|
149
|
+
"content": "Hello, how are you?",
|
|
148
150
|
}
|
|
149
151
|
],
|
|
150
|
-
model="
|
|
152
|
+
model="Llama-4-Maverick-17B-128E",
|
|
153
|
+
max_tokens=100,
|
|
151
154
|
)
|
|
152
|
-
print(
|
|
155
|
+
print(chat_completion_response.choices)
|
|
153
156
|
|
|
154
157
|
|
|
155
158
|
asyncio.run(main())
|
|
@@ -173,10 +176,10 @@ from relaxai import Relaxai
|
|
|
173
176
|
|
|
174
177
|
client = Relaxai()
|
|
175
178
|
|
|
176
|
-
|
|
179
|
+
chat_completion_response = client.chat.create_completion(
|
|
177
180
|
messages=[
|
|
178
181
|
{
|
|
179
|
-
"
|
|
182
|
+
"content": "content",
|
|
180
183
|
"role": "role",
|
|
181
184
|
}
|
|
182
185
|
],
|
|
@@ -186,7 +189,7 @@ response = client.chat.create_completion(
|
|
|
186
189
|
"type": "type",
|
|
187
190
|
},
|
|
188
191
|
)
|
|
189
|
-
print(
|
|
192
|
+
print(chat_completion_response.prediction)
|
|
190
193
|
```
|
|
191
194
|
|
|
192
195
|
## Handling errors
|
|
@@ -208,11 +211,12 @@ try:
|
|
|
208
211
|
client.chat.create_completion(
|
|
209
212
|
messages=[
|
|
210
213
|
{
|
|
211
|
-
"
|
|
212
|
-
"
|
|
214
|
+
"role": "user",
|
|
215
|
+
"content": "Hello, how are you?",
|
|
213
216
|
}
|
|
214
217
|
],
|
|
215
|
-
model="
|
|
218
|
+
model="Llama-4-Maverick-17B-128E",
|
|
219
|
+
max_tokens=100,
|
|
216
220
|
)
|
|
217
221
|
except relaxai.APIConnectionError as e:
|
|
218
222
|
print("The server could not be reached")
|
|
@@ -259,11 +263,12 @@ client = Relaxai(
|
|
|
259
263
|
client.with_options(max_retries=5).chat.create_completion(
|
|
260
264
|
messages=[
|
|
261
265
|
{
|
|
262
|
-
"
|
|
263
|
-
"
|
|
266
|
+
"role": "user",
|
|
267
|
+
"content": "Hello, how are you?",
|
|
264
268
|
}
|
|
265
269
|
],
|
|
266
|
-
model="
|
|
270
|
+
model="Llama-4-Maverick-17B-128E",
|
|
271
|
+
max_tokens=100,
|
|
267
272
|
)
|
|
268
273
|
```
|
|
269
274
|
|
|
@@ -290,11 +295,12 @@ client = Relaxai(
|
|
|
290
295
|
client.with_options(timeout=5.0).chat.create_completion(
|
|
291
296
|
messages=[
|
|
292
297
|
{
|
|
293
|
-
"
|
|
294
|
-
"
|
|
298
|
+
"role": "user",
|
|
299
|
+
"content": "Hello, how are you?",
|
|
295
300
|
}
|
|
296
301
|
],
|
|
297
|
-
model="
|
|
302
|
+
model="Llama-4-Maverick-17B-128E",
|
|
303
|
+
max_tokens=100,
|
|
298
304
|
)
|
|
299
305
|
```
|
|
300
306
|
|
|
@@ -338,10 +344,11 @@ from relaxai import Relaxai
|
|
|
338
344
|
client = Relaxai()
|
|
339
345
|
response = client.chat.with_raw_response.create_completion(
|
|
340
346
|
messages=[{
|
|
341
|
-
"
|
|
342
|
-
"
|
|
347
|
+
"role": "user",
|
|
348
|
+
"content": "Hello, how are you?",
|
|
343
349
|
}],
|
|
344
|
-
model="
|
|
350
|
+
model="Llama-4-Maverick-17B-128E",
|
|
351
|
+
max_tokens=100,
|
|
345
352
|
)
|
|
346
353
|
print(response.headers.get('X-My-Header'))
|
|
347
354
|
|
|
@@ -363,11 +370,12 @@ To stream the response body, use `.with_streaming_response` instead, which requi
|
|
|
363
370
|
with client.chat.with_streaming_response.create_completion(
|
|
364
371
|
messages=[
|
|
365
372
|
{
|
|
366
|
-
"
|
|
367
|
-
"
|
|
373
|
+
"role": "user",
|
|
374
|
+
"content": "Hello, how are you?",
|
|
368
375
|
}
|
|
369
376
|
],
|
|
370
|
-
model="
|
|
377
|
+
model="Llama-4-Maverick-17B-128E",
|
|
378
|
+
max_tokens=100,
|
|
371
379
|
) as response:
|
|
372
380
|
print(response.headers.get("X-My-Header"))
|
|
373
381
|
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
relaxai/__init__.py,sha256=jawpphZN3cZd39n6_t5JS-ypY59otlavNWnrP--HOHU,2587
|
|
2
|
+
relaxai/_base_client.py,sha256=XSTrjOWzbSPTZAECGywIeNj9dtHx3nUf9vUf5uEyxK8,67036
|
|
3
|
+
relaxai/_client.py,sha256=t4e0GFc6ooxAbPTlw4h4LxFfG3woednjoHScsKYyyIU,18179
|
|
4
|
+
relaxai/_compat.py,sha256=VWemUKbj6DDkQ-O4baSpHVLJafotzeXmCQGJugfVTIw,6580
|
|
5
|
+
relaxai/_constants.py,sha256=S14PFzyN9-I31wiV7SmIlL5Ga0MLHxdvegInGdXH7tM,462
|
|
6
|
+
relaxai/_exceptions.py,sha256=CPRCoUcv5nQ7_hkZu9WvAFxQM0Mf6_ZCGU8JPY81zpY,3222
|
|
7
|
+
relaxai/_files.py,sha256=KnEzGi_O756MvKyJ4fOCW_u3JhOeWPQ4RsmDvqihDQU,3545
|
|
8
|
+
relaxai/_models.py,sha256=KvjsMfb88XZlFUKVoOxr8OyDj47MhoH2OKqWNEbBhk4,30010
|
|
9
|
+
relaxai/_qs.py,sha256=AOkSz4rHtK4YI3ZU_kzea-zpwBUgEY8WniGmTPyEimc,4846
|
|
10
|
+
relaxai/_resource.py,sha256=v7qxjafEaUaEfecj54WhuhW2hupVzM8Os0EIHVRmbkc,1106
|
|
11
|
+
relaxai/_response.py,sha256=URFVS4ivxSoLsvosTN0Rc3f5vbBBb0DIB4Eh2XPGa_Q,28794
|
|
12
|
+
relaxai/_streaming.py,sha256=Nr4O_q1hh35alNVqo46KKf9ZTbRp-IoXjGFCCNJC1fA,10104
|
|
13
|
+
relaxai/_types.py,sha256=hzXV2igITH7hq2g4zoT8DOcWoTygjpuzRT2OUh1-V1w,6198
|
|
14
|
+
relaxai/_version.py,sha256=5ikGSyEPdlTvVZ6jGVja-HEVSucoe3D0WBX85F-c_jM,160
|
|
15
|
+
relaxai/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
|
+
relaxai/_utils/__init__.py,sha256=PNZ_QJuzZEgyYXqkO1HVhGkj5IU9bglVUcw7H-Knjzw,2062
|
|
17
|
+
relaxai/_utils/_logs.py,sha256=JN6s4kBek7yKmmZ_YwCsGFuRdVLEaxfgdkCgnJWcFN0,777
|
|
18
|
+
relaxai/_utils/_proxy.py,sha256=aglnj2yBTDyGX9Akk2crZHrl10oqRmceUy2Zp008XEs,1975
|
|
19
|
+
relaxai/_utils/_reflection.py,sha256=ZmGkIgT_PuwedyNBrrKGbxoWtkpytJNU1uU4QHnmEMU,1364
|
|
20
|
+
relaxai/_utils/_resources_proxy.py,sha256=9_EObM8JvNkCjrPt8cs1fv4Zitbzv6UQjJJA-GKm4Tw,594
|
|
21
|
+
relaxai/_utils/_streams.py,sha256=SMC90diFFecpEg_zgDRVbdR3hSEIgVVij4taD-noMLM,289
|
|
22
|
+
relaxai/_utils/_sync.py,sha256=TpGLrrhRNWTJtODNE6Fup3_k7zrWm1j2RlirzBwre-0,2862
|
|
23
|
+
relaxai/_utils/_transform.py,sha256=n7kskEWz6o__aoNvhFoGVyDoalNe6mJwp-g7BWkdj88,15617
|
|
24
|
+
relaxai/_utils/_typing.py,sha256=D0DbbNu8GnYQTSICnTSHDGsYXj8TcAKyhejb0XcnjtY,4602
|
|
25
|
+
relaxai/_utils/_utils.py,sha256=ts4CiiuNpFiGB6YMdkQRh2SZvYvsl7mAF-JWHCcLDf4,12312
|
|
26
|
+
relaxai/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
|
|
27
|
+
relaxai/resources/__init__.py,sha256=5FOvNOOZuqlSuikZSCGuw_hSbh_uxDu5n-ABdfAr-eQ,1478
|
|
28
|
+
relaxai/resources/chat.py,sha256=_X_3t8JuCCwXYZrnu_63tCgPhAZB8rYL5TnBaKjlhMU,13209
|
|
29
|
+
relaxai/resources/embeddings.py,sha256=V4yeTPCGwbaJC8xUndpVaqobq6KzvmeiV9TJuq5gSkU,7040
|
|
30
|
+
relaxai/resources/models.py,sha256=zID8M-GHv596jrwYKg22uvxH6Z79uGqwvF4krsO9-Z4,7856
|
|
31
|
+
relaxai/types/__init__.py,sha256=0pxpDpZGPpN1xX8gflH_elHCQOP_njSBGUSDPRRDNDo,1378
|
|
32
|
+
relaxai/types/chat_completion_message.py,sha256=t-dKQxWfqUr8UsX5Fs3NpN9YfRJ5oJvozfZtWn3JF8M,1544
|
|
33
|
+
relaxai/types/chat_completion_message_param.py,sha256=X4oAp6FQwue-SEibwr3KcxhJNQZiaiBhz2Q9mMHY5_M,1485
|
|
34
|
+
relaxai/types/chat_completion_response.py,sha256=II4PjVfW60aa9aX5mApsseDerQVieTlt9BLim2fY_RE,1564
|
|
35
|
+
relaxai/types/chat_create_completion_params.py,sha256=PVrcRwctJ1Gr4m1W1BwyczCMpHn-3Zw9YUbLwgpG12M,2664
|
|
36
|
+
relaxai/types/content_filter_results.py,sha256=vOaHu4jdGKVX4vqqCZohTYDsKDXlvfh57Ozb_95-c2U,999
|
|
37
|
+
relaxai/types/embedding_create_embedding_params.py,sha256=76aUOwC4LMjfMesJTjrjUh_FzVkDcRe_2rRzMTcdaag,399
|
|
38
|
+
relaxai/types/embedding_response.py,sha256=N7SS9DhAbG5kEWF6RxYc8gl_rUvY9c1mSoT8v4vwahA,549
|
|
39
|
+
relaxai/types/function_call.py,sha256=n_agCO6Vrh5YZH1SZ6GWOV4mk2IFPeHJA_WkZrPGPMw,277
|
|
40
|
+
relaxai/types/function_call_param.py,sha256=X-bQ7vMH7BKrAiweHRGY5fGzddPLkppUOa1R1T5etg0,281
|
|
41
|
+
relaxai/types/function_definition_param.py,sha256=HqGQTiwZ4vXGYgYC2iscc_THORFPSZ1qXxnXpAc-A_8,367
|
|
42
|
+
relaxai/types/health_response.py,sha256=1c2L7g4f7lqwcXgE3rHtGoWfWgZuLPUF8IcEpKzn-6k,190
|
|
43
|
+
relaxai/types/model.py,sha256=Du9lb9dn846N1fPrKtDsPSLczkqnzxVAJPb8GMqyVJ8,764
|
|
44
|
+
relaxai/types/model_list.py,sha256=9lvzYRTBYTVudP9_28Ai0lUfc82eXOmz0qZ_rwCzxIU,364
|
|
45
|
+
relaxai/types/stream_options_param.py,sha256=JEom-Fs3ORSTD86NTan-9ZjlKYfPEvSYXViUhOXPCb0,273
|
|
46
|
+
relaxai/types/shared/__init__.py,sha256=rVHWDutDMA_BYQSHahIzfwcaDAwE3zyBvTiPRI1lSFo,346
|
|
47
|
+
relaxai/types/shared/openai_completion_tokens_details.py,sha256=kjDBsTKvzhw-8UA3t7CQ6qvAo4Lmnup5VEFU2QzBynw,338
|
|
48
|
+
relaxai/types/shared/openai_prompt_tokens_details.py,sha256=wdPCsobx-VBw3MgfSCY4HXrGnMtw6YXiepKpXw1kZAE,253
|
|
49
|
+
relaxai/types/shared/openai_usage.py,sha256=W-mht7UXuWne_eFXCBXHpf2HEsjzfXo2jPXOdKNEdbQ,513
|
|
50
|
+
relaxai-0.17.0.dist-info/METADATA,sha256=-5j0U0gLKC-TtvJn9FIP511b7SAURQeKo7ojaIrc1G0,15520
|
|
51
|
+
relaxai-0.17.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
|
52
|
+
relaxai-0.17.0.dist-info/licenses/LICENSE,sha256=B0u5zBqmaNCfIZooH665f2J7yFqMmSjQxZtnJhCuID8,11337
|
|
53
|
+
relaxai-0.17.0.dist-info/RECORD,,
|
relaxai/resources/health.py
DELETED
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
import httpx
|
|
6
|
-
|
|
7
|
-
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
8
|
-
from .._compat import cached_property
|
|
9
|
-
from .._resource import SyncAPIResource, AsyncAPIResource
|
|
10
|
-
from .._response import (
|
|
11
|
-
to_raw_response_wrapper,
|
|
12
|
-
to_streamed_response_wrapper,
|
|
13
|
-
async_to_raw_response_wrapper,
|
|
14
|
-
async_to_streamed_response_wrapper,
|
|
15
|
-
)
|
|
16
|
-
from .._base_client import make_request_options
|
|
17
|
-
|
|
18
|
-
__all__ = ["HealthResource", "AsyncHealthResource"]
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
class HealthResource(SyncAPIResource):
|
|
22
|
-
@cached_property
|
|
23
|
-
def with_raw_response(self) -> HealthResourceWithRawResponse:
|
|
24
|
-
"""
|
|
25
|
-
This property can be used as a prefix for any HTTP method call to return
|
|
26
|
-
the raw response object instead of the parsed content.
|
|
27
|
-
|
|
28
|
-
For more information, see https://www.github.com/relax-ai/python-sdk#accessing-raw-response-data-eg-headers
|
|
29
|
-
"""
|
|
30
|
-
return HealthResourceWithRawResponse(self)
|
|
31
|
-
|
|
32
|
-
@cached_property
|
|
33
|
-
def with_streaming_response(self) -> HealthResourceWithStreamingResponse:
|
|
34
|
-
"""
|
|
35
|
-
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
36
|
-
|
|
37
|
-
For more information, see https://www.github.com/relax-ai/python-sdk#with_streaming_response
|
|
38
|
-
"""
|
|
39
|
-
return HealthResourceWithStreamingResponse(self)
|
|
40
|
-
|
|
41
|
-
def check(
|
|
42
|
-
self,
|
|
43
|
-
*,
|
|
44
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
45
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
46
|
-
extra_headers: Headers | None = None,
|
|
47
|
-
extra_query: Query | None = None,
|
|
48
|
-
extra_body: Body | None = None,
|
|
49
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
50
|
-
) -> str:
|
|
51
|
-
"""Check the health of the service."""
|
|
52
|
-
return self._get(
|
|
53
|
-
"/v1/health",
|
|
54
|
-
options=make_request_options(
|
|
55
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
56
|
-
),
|
|
57
|
-
cast_to=str,
|
|
58
|
-
)
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
class AsyncHealthResource(AsyncAPIResource):
|
|
62
|
-
@cached_property
|
|
63
|
-
def with_raw_response(self) -> AsyncHealthResourceWithRawResponse:
|
|
64
|
-
"""
|
|
65
|
-
This property can be used as a prefix for any HTTP method call to return
|
|
66
|
-
the raw response object instead of the parsed content.
|
|
67
|
-
|
|
68
|
-
For more information, see https://www.github.com/relax-ai/python-sdk#accessing-raw-response-data-eg-headers
|
|
69
|
-
"""
|
|
70
|
-
return AsyncHealthResourceWithRawResponse(self)
|
|
71
|
-
|
|
72
|
-
@cached_property
|
|
73
|
-
def with_streaming_response(self) -> AsyncHealthResourceWithStreamingResponse:
|
|
74
|
-
"""
|
|
75
|
-
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
76
|
-
|
|
77
|
-
For more information, see https://www.github.com/relax-ai/python-sdk#with_streaming_response
|
|
78
|
-
"""
|
|
79
|
-
return AsyncHealthResourceWithStreamingResponse(self)
|
|
80
|
-
|
|
81
|
-
async def check(
|
|
82
|
-
self,
|
|
83
|
-
*,
|
|
84
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
85
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
86
|
-
extra_headers: Headers | None = None,
|
|
87
|
-
extra_query: Query | None = None,
|
|
88
|
-
extra_body: Body | None = None,
|
|
89
|
-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
90
|
-
) -> str:
|
|
91
|
-
"""Check the health of the service."""
|
|
92
|
-
return await self._get(
|
|
93
|
-
"/v1/health",
|
|
94
|
-
options=make_request_options(
|
|
95
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
96
|
-
),
|
|
97
|
-
cast_to=str,
|
|
98
|
-
)
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
class HealthResourceWithRawResponse:
|
|
102
|
-
def __init__(self, health: HealthResource) -> None:
|
|
103
|
-
self._health = health
|
|
104
|
-
|
|
105
|
-
self.check = to_raw_response_wrapper(
|
|
106
|
-
health.check,
|
|
107
|
-
)
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
class AsyncHealthResourceWithRawResponse:
|
|
111
|
-
def __init__(self, health: AsyncHealthResource) -> None:
|
|
112
|
-
self._health = health
|
|
113
|
-
|
|
114
|
-
self.check = async_to_raw_response_wrapper(
|
|
115
|
-
health.check,
|
|
116
|
-
)
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
class HealthResourceWithStreamingResponse:
|
|
120
|
-
def __init__(self, health: HealthResource) -> None:
|
|
121
|
-
self._health = health
|
|
122
|
-
|
|
123
|
-
self.check = to_streamed_response_wrapper(
|
|
124
|
-
health.check,
|
|
125
|
-
)
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
class AsyncHealthResourceWithStreamingResponse:
|
|
129
|
-
def __init__(self, health: AsyncHealthResource) -> None:
|
|
130
|
-
self._health = health
|
|
131
|
-
|
|
132
|
-
self.check = async_to_streamed_response_wrapper(
|
|
133
|
-
health.check,
|
|
134
|
-
)
|
relaxai/types/usage.py
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
from .._models import BaseModel
|
|
4
|
-
|
|
5
|
-
__all__ = ["Usage", "CompletionTokensDetails", "PromptTokensDetails"]
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class CompletionTokensDetails(BaseModel):
|
|
9
|
-
accepted_prediction_tokens: int
|
|
10
|
-
|
|
11
|
-
audio_tokens: int
|
|
12
|
-
|
|
13
|
-
reasoning_tokens: int
|
|
14
|
-
|
|
15
|
-
rejected_prediction_tokens: int
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
class PromptTokensDetails(BaseModel):
|
|
19
|
-
audio_tokens: int
|
|
20
|
-
|
|
21
|
-
cached_tokens: int
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
class Usage(BaseModel):
|
|
25
|
-
completion_tokens: int
|
|
26
|
-
|
|
27
|
-
completion_tokens_details: CompletionTokensDetails
|
|
28
|
-
|
|
29
|
-
prompt_tokens: int
|
|
30
|
-
|
|
31
|
-
prompt_tokens_details: PromptTokensDetails
|
|
32
|
-
|
|
33
|
-
total_tokens: int
|
relaxai-0.1.0.dist-info/RECORD
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
relaxai/__init__.py,sha256=jawpphZN3cZd39n6_t5JS-ypY59otlavNWnrP--HOHU,2587
|
|
2
|
-
relaxai/_base_client.py,sha256=jQtwK70fFgN0seJMTCfg6E72__5mGwKeFFzm5lMDiyk,66923
|
|
3
|
-
relaxai/_client.py,sha256=29DIWccQ2r86_yEdq1tS5nYzhidCuLUNoZAQ9gvrFdA,17047
|
|
4
|
-
relaxai/_compat.py,sha256=VWemUKbj6DDkQ-O4baSpHVLJafotzeXmCQGJugfVTIw,6580
|
|
5
|
-
relaxai/_constants.py,sha256=S14PFzyN9-I31wiV7SmIlL5Ga0MLHxdvegInGdXH7tM,462
|
|
6
|
-
relaxai/_exceptions.py,sha256=CPRCoUcv5nQ7_hkZu9WvAFxQM0Mf6_ZCGU8JPY81zpY,3222
|
|
7
|
-
relaxai/_files.py,sha256=mf4dOgL4b0ryyZlbqLhggD3GVgDf6XxdGFAgce01ugE,3549
|
|
8
|
-
relaxai/_models.py,sha256=KvjsMfb88XZlFUKVoOxr8OyDj47MhoH2OKqWNEbBhk4,30010
|
|
9
|
-
relaxai/_qs.py,sha256=AOkSz4rHtK4YI3ZU_kzea-zpwBUgEY8WniGmTPyEimc,4846
|
|
10
|
-
relaxai/_resource.py,sha256=v7qxjafEaUaEfecj54WhuhW2hupVzM8Os0EIHVRmbkc,1106
|
|
11
|
-
relaxai/_response.py,sha256=URFVS4ivxSoLsvosTN0Rc3f5vbBBb0DIB4Eh2XPGa_Q,28794
|
|
12
|
-
relaxai/_streaming.py,sha256=Nr4O_q1hh35alNVqo46KKf9ZTbRp-IoXjGFCCNJC1fA,10104
|
|
13
|
-
relaxai/_types.py,sha256=hzXV2igITH7hq2g4zoT8DOcWoTygjpuzRT2OUh1-V1w,6198
|
|
14
|
-
relaxai/_version.py,sha256=4h1HBSt0dx8qYwUN2Ebji_vVmZgjJua0hDlUnoJVNmE,159
|
|
15
|
-
relaxai/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
|
-
relaxai/_utils/__init__.py,sha256=PNZ_QJuzZEgyYXqkO1HVhGkj5IU9bglVUcw7H-Knjzw,2062
|
|
17
|
-
relaxai/_utils/_logs.py,sha256=JN6s4kBek7yKmmZ_YwCsGFuRdVLEaxfgdkCgnJWcFN0,777
|
|
18
|
-
relaxai/_utils/_proxy.py,sha256=aglnj2yBTDyGX9Akk2crZHrl10oqRmceUy2Zp008XEs,1975
|
|
19
|
-
relaxai/_utils/_reflection.py,sha256=ZmGkIgT_PuwedyNBrrKGbxoWtkpytJNU1uU4QHnmEMU,1364
|
|
20
|
-
relaxai/_utils/_resources_proxy.py,sha256=9_EObM8JvNkCjrPt8cs1fv4Zitbzv6UQjJJA-GKm4Tw,594
|
|
21
|
-
relaxai/_utils/_streams.py,sha256=SMC90diFFecpEg_zgDRVbdR3hSEIgVVij4taD-noMLM,289
|
|
22
|
-
relaxai/_utils/_sync.py,sha256=TpGLrrhRNWTJtODNE6Fup3_k7zrWm1j2RlirzBwre-0,2862
|
|
23
|
-
relaxai/_utils/_transform.py,sha256=n7kskEWz6o__aoNvhFoGVyDoalNe6mJwp-g7BWkdj88,15617
|
|
24
|
-
relaxai/_utils/_typing.py,sha256=D0DbbNu8GnYQTSICnTSHDGsYXj8TcAKyhejb0XcnjtY,4602
|
|
25
|
-
relaxai/_utils/_utils.py,sha256=ts4CiiuNpFiGB6YMdkQRh2SZvYvsl7mAF-JWHCcLDf4,12312
|
|
26
|
-
relaxai/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
|
|
27
|
-
relaxai/resources/__init__.py,sha256=iXDN-kkHrROvAkOUiXDtVoAiRL1HN1EI81guF9i50Qs,1928
|
|
28
|
-
relaxai/resources/chat.py,sha256=yHDf-wGgcxg09tOvknvTWBbZJ8NdPLH675Gtw0pjB6M,12032
|
|
29
|
-
relaxai/resources/embeddings.py,sha256=aOaXQ_FBaDMOjYRX-DTz5_swDHe-UC75Gu-xupKmMtU,6929
|
|
30
|
-
relaxai/resources/health.py,sha256=fitWsb_aSpWLfhUjTeKy4qGbEKZGW74DWeIljPibb8I,4749
|
|
31
|
-
relaxai/resources/models.py,sha256=7osSj1mo_uZD1AVZzqMCUKA_4UUu6DsVwdeZ3BE1gwo,7775
|
|
32
|
-
relaxai/types/__init__.py,sha256=DEebMov45PQuP_MWBojMGygclVIHTxJsA0wquu5GklA,1204
|
|
33
|
-
relaxai/types/chat_completion_message.py,sha256=62FWhEZcz6B9YRb22h6Wze5VJL3uSs1PuAowgpQUDTQ,1128
|
|
34
|
-
relaxai/types/chat_completion_message_param.py,sha256=u5jQ52sy3nboKBGeO9qhtwRCopsQlIm1iP02l5wVGJ8,1086
|
|
35
|
-
relaxai/types/chat_create_completion_params.py,sha256=HErJzeT8_EuM6hW5edfWdMbsZG9cB0TXWxY_4Rr9870,1833
|
|
36
|
-
relaxai/types/chat_create_completion_response.py,sha256=qkwHNJCzeL_B-78bnYmIFAahBDLplvQNaT437nsQPHo,1550
|
|
37
|
-
relaxai/types/content_filter_results.py,sha256=vOaHu4jdGKVX4vqqCZohTYDsKDXlvfh57Ozb_95-c2U,999
|
|
38
|
-
relaxai/types/embedding_create_params.py,sha256=GohmpGhT2WkXr0EY-oMlXHFrv4avYeyLGWmwuHclwuk,381
|
|
39
|
-
relaxai/types/embedding_create_response.py,sha256=R5bMlsA78dXNWmcTM79qpHj7oMdxI8c4FFVTJup4lpk,535
|
|
40
|
-
relaxai/types/function_call.py,sha256=n_agCO6Vrh5YZH1SZ6GWOV4mk2IFPeHJA_WkZrPGPMw,277
|
|
41
|
-
relaxai/types/function_call_param.py,sha256=X-bQ7vMH7BKrAiweHRGY5fGzddPLkppUOa1R1T5etg0,281
|
|
42
|
-
relaxai/types/function_definition_param.py,sha256=HqGQTiwZ4vXGYgYC2iscc_THORFPSZ1qXxnXpAc-A_8,367
|
|
43
|
-
relaxai/types/health_check_response.py,sha256=6Zn5YYHCQf2RgMjDlf39mtiTPqfaBfC9Vv599U_rKCI,200
|
|
44
|
-
relaxai/types/model.py,sha256=Du9lb9dn846N1fPrKtDsPSLczkqnzxVAJPb8GMqyVJ8,764
|
|
45
|
-
relaxai/types/model_list_response.py,sha256=zGGRmJLFa5AQ5R2P75E6Qh5wUjtolqcMkXXJTzzy9nA,380
|
|
46
|
-
relaxai/types/usage.py,sha256=5KaiAggU1xFXDajFkIbHII-RarAiAsJE-4ECBs-AJZg,647
|
|
47
|
-
relaxai-0.1.0.dist-info/METADATA,sha256=kNnG6W_r3tEBG4oBrF5dseHcGBOAICu7tYMLpBOAnYQ,14954
|
|
48
|
-
relaxai-0.1.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
|
49
|
-
relaxai-0.1.0.dist-info/licenses/LICENSE,sha256=B0u5zBqmaNCfIZooH665f2J7yFqMmSjQxZtnJhCuID8,11337
|
|
50
|
-
relaxai-0.1.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|