relaxai 0.1.0__py3-none-any.whl → 0.2.1__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/_models.py +1 -1
- relaxai/_version.py +1 -1
- relaxai/resources/__init__.py +0 -14
- relaxai/resources/chat.py +46 -21
- 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 +62 -10
- 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/function_definition_param.py +6 -2
- 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.2.1.dist-info}/METADATA +44 -39
- relaxai-0.2.1.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.2.1.dist-info}/WHEEL +0 -0
- {relaxai-0.1.0.dist-info → relaxai-0.2.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: relaxai
|
|
3
|
-
Version: 0.1
|
|
3
|
+
Version: 0.2.1
|
|
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,20 +176,17 @@ 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
|
],
|
|
183
186
|
model="model",
|
|
184
|
-
|
|
185
|
-
"content": "content",
|
|
186
|
-
"type": "type",
|
|
187
|
-
},
|
|
187
|
+
chat_template_kwargs={},
|
|
188
188
|
)
|
|
189
|
-
print(
|
|
189
|
+
print(chat_completion_response.chat_template_kwargs)
|
|
190
190
|
```
|
|
191
191
|
|
|
192
192
|
## Handling errors
|
|
@@ -208,11 +208,12 @@ try:
|
|
|
208
208
|
client.chat.create_completion(
|
|
209
209
|
messages=[
|
|
210
210
|
{
|
|
211
|
-
"
|
|
212
|
-
"
|
|
211
|
+
"role": "user",
|
|
212
|
+
"content": "Hello, how are you?",
|
|
213
213
|
}
|
|
214
214
|
],
|
|
215
|
-
model="
|
|
215
|
+
model="Llama-4-Maverick-17B-128E",
|
|
216
|
+
max_tokens=100,
|
|
216
217
|
)
|
|
217
218
|
except relaxai.APIConnectionError as e:
|
|
218
219
|
print("The server could not be reached")
|
|
@@ -259,11 +260,12 @@ client = Relaxai(
|
|
|
259
260
|
client.with_options(max_retries=5).chat.create_completion(
|
|
260
261
|
messages=[
|
|
261
262
|
{
|
|
262
|
-
"
|
|
263
|
-
"
|
|
263
|
+
"role": "user",
|
|
264
|
+
"content": "Hello, how are you?",
|
|
264
265
|
}
|
|
265
266
|
],
|
|
266
|
-
model="
|
|
267
|
+
model="Llama-4-Maverick-17B-128E",
|
|
268
|
+
max_tokens=100,
|
|
267
269
|
)
|
|
268
270
|
```
|
|
269
271
|
|
|
@@ -290,11 +292,12 @@ client = Relaxai(
|
|
|
290
292
|
client.with_options(timeout=5.0).chat.create_completion(
|
|
291
293
|
messages=[
|
|
292
294
|
{
|
|
293
|
-
"
|
|
294
|
-
"
|
|
295
|
+
"role": "user",
|
|
296
|
+
"content": "Hello, how are you?",
|
|
295
297
|
}
|
|
296
298
|
],
|
|
297
|
-
model="
|
|
299
|
+
model="Llama-4-Maverick-17B-128E",
|
|
300
|
+
max_tokens=100,
|
|
298
301
|
)
|
|
299
302
|
```
|
|
300
303
|
|
|
@@ -338,10 +341,11 @@ from relaxai import Relaxai
|
|
|
338
341
|
client = Relaxai()
|
|
339
342
|
response = client.chat.with_raw_response.create_completion(
|
|
340
343
|
messages=[{
|
|
341
|
-
"
|
|
342
|
-
"
|
|
344
|
+
"role": "user",
|
|
345
|
+
"content": "Hello, how are you?",
|
|
343
346
|
}],
|
|
344
|
-
model="
|
|
347
|
+
model="Llama-4-Maverick-17B-128E",
|
|
348
|
+
max_tokens=100,
|
|
345
349
|
)
|
|
346
350
|
print(response.headers.get('X-My-Header'))
|
|
347
351
|
|
|
@@ -363,11 +367,12 @@ To stream the response body, use `.with_streaming_response` instead, which requi
|
|
|
363
367
|
with client.chat.with_streaming_response.create_completion(
|
|
364
368
|
messages=[
|
|
365
369
|
{
|
|
366
|
-
"
|
|
367
|
-
"
|
|
370
|
+
"role": "user",
|
|
371
|
+
"content": "Hello, how are you?",
|
|
368
372
|
}
|
|
369
373
|
],
|
|
370
|
-
model="
|
|
374
|
+
model="Llama-4-Maverick-17B-128E",
|
|
375
|
+
max_tokens=100,
|
|
371
376
|
) as response:
|
|
372
377
|
print(response.headers.get("X-My-Header"))
|
|
373
378
|
|
|
@@ -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=6rDtUmk6jhjGN1q96CUICYfBunNXNhhEk_AqztTm3uE,30012
|
|
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=W5Y49_wJqFbQ5Yn6umNMFdLYXnE_MLtQ1xV5PVLuJSs,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=5FOvNOOZuqlSuikZSCGuw_hSbh_uxDu5n-ABdfAr-eQ,1478
|
|
28
|
+
relaxai/resources/chat.py,sha256=rzG_U3jolLfArwLOVz0zu7nOD6c13MDNra1BFwRJDlU,13515
|
|
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=eJk0Pvtk8AkbyPoDQVxuE4b5VD7lN3Xu3vE32wjU5ps,3015
|
|
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=t1P6B-6DqaBnFNEGM_8lQoQtA_hqDdiUwf7D3EXILs8,438
|
|
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.2.1.dist-info/METADATA,sha256=YhJ8nUNNGf9BaixRVkM4elxXi3LHnUe1re2SPSpvL7k,15480
|
|
51
|
+
relaxai-0.2.1.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
|
52
|
+
relaxai-0.2.1.dist-info/licenses/LICENSE,sha256=B0u5zBqmaNCfIZooH665f2J7yFqMmSjQxZtnJhCuID8,11337
|
|
53
|
+
relaxai-0.2.1.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
|