relaxai 0.1.0__tar.gz → 0.17.0__tar.gz
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-0.17.0/.release-please-manifest.json +3 -0
- relaxai-0.17.0/CHANGELOG.md +136 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/PKG-INFO +43 -35
- {relaxai-0.1.0 → relaxai-0.17.0}/README.md +41 -33
- {relaxai-0.1.0 → relaxai-0.17.0}/SECURITY.md +1 -1
- relaxai-0.17.0/api.md +62 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/pyproject.toml +3 -3
- {relaxai-0.1.0 → relaxai-0.17.0}/src/relaxai/_base_client.py +4 -1
- {relaxai-0.1.0 → relaxai-0.17.0}/src/relaxai/_client.py +77 -40
- {relaxai-0.1.0 → relaxai-0.17.0}/src/relaxai/_files.py +4 -4
- {relaxai-0.1.0 → relaxai-0.17.0}/src/relaxai/_version.py +1 -1
- {relaxai-0.1.0 → relaxai-0.17.0}/src/relaxai/resources/__init__.py +0 -14
- {relaxai-0.1.0 → relaxai-0.17.0}/src/relaxai/resources/chat.py +38 -13
- {relaxai-0.1.0 → relaxai-0.17.0}/src/relaxai/resources/embeddings.py +18 -18
- {relaxai-0.1.0 → relaxai-0.17.0}/src/relaxai/resources/models.py +57 -57
- {relaxai-0.1.0 → relaxai-0.17.0}/src/relaxai/types/__init__.py +11 -6
- {relaxai-0.1.0 → relaxai-0.17.0}/src/relaxai/types/chat_completion_message.py +29 -3
- {relaxai-0.1.0 → relaxai-0.17.0}/src/relaxai/types/chat_completion_message_param.py +29 -4
- relaxai-0.1.0/src/relaxai/types/chat_create_completion_response.py → relaxai-0.17.0/src/relaxai/types/chat_completion_response.py +4 -4
- {relaxai-0.1.0 → relaxai-0.17.0}/src/relaxai/types/chat_create_completion_params.py +40 -8
- relaxai-0.1.0/src/relaxai/types/embedding_create_params.py → relaxai-0.17.0/src/relaxai/types/embedding_create_embedding_params.py +2 -2
- relaxai-0.1.0/src/relaxai/types/embedding_create_response.py → relaxai-0.17.0/src/relaxai/types/embedding_response.py +4 -4
- relaxai-0.1.0/src/relaxai/types/health_check_response.py → relaxai-0.17.0/src/relaxai/types/health_response.py +2 -2
- relaxai-0.1.0/src/relaxai/types/model_list_response.py → relaxai-0.17.0/src/relaxai/types/model_list.py +2 -2
- relaxai-0.17.0/src/relaxai/types/shared/__init__.py +5 -0
- relaxai-0.17.0/src/relaxai/types/shared/openai_completion_tokens_details.py +15 -0
- relaxai-0.17.0/src/relaxai/types/shared/openai_prompt_tokens_details.py +11 -0
- relaxai-0.17.0/src/relaxai/types/shared/openai_usage.py +19 -0
- relaxai-0.17.0/src/relaxai/types/stream_options_param.py +11 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/tests/api_resources/test_chat.py +87 -37
- relaxai-0.17.0/tests/api_resources/test_client.py +79 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/tests/api_resources/test_embeddings.py +33 -33
- {relaxai-0.1.0 → relaxai-0.17.0}/tests/api_resources/test_models.py +73 -73
- {relaxai-0.1.0 → relaxai-0.17.0}/tests/test_client.py +19 -37
- relaxai-0.1.0/.release-please-manifest.json +0 -3
- relaxai-0.1.0/CHANGELOG.md +0 -40
- relaxai-0.1.0/api.md +0 -55
- relaxai-0.1.0/src/relaxai/resources/health.py +0 -134
- relaxai-0.1.0/src/relaxai/types/usage.py +0 -33
- relaxai-0.1.0/tests/api_resources/test_health.py +0 -79
- {relaxai-0.1.0 → relaxai-0.17.0}/.gitignore +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/CONTRIBUTING.md +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/LICENSE +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/bin/check-release-environment +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/bin/publish-pypi +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/examples/.keep +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/mypy.ini +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/noxfile.py +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/release-please-config.json +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/requirements-dev.lock +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/requirements.lock +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/src/relaxai/__init__.py +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/src/relaxai/_compat.py +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/src/relaxai/_constants.py +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/src/relaxai/_exceptions.py +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/src/relaxai/_models.py +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/src/relaxai/_qs.py +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/src/relaxai/_resource.py +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/src/relaxai/_response.py +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/src/relaxai/_streaming.py +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/src/relaxai/_types.py +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/src/relaxai/_utils/__init__.py +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/src/relaxai/_utils/_logs.py +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/src/relaxai/_utils/_proxy.py +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/src/relaxai/_utils/_reflection.py +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/src/relaxai/_utils/_resources_proxy.py +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/src/relaxai/_utils/_streams.py +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/src/relaxai/_utils/_sync.py +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/src/relaxai/_utils/_transform.py +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/src/relaxai/_utils/_typing.py +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/src/relaxai/_utils/_utils.py +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/src/relaxai/lib/.keep +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/src/relaxai/py.typed +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/src/relaxai/types/content_filter_results.py +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/src/relaxai/types/function_call.py +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/src/relaxai/types/function_call_param.py +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/src/relaxai/types/function_definition_param.py +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/src/relaxai/types/model.py +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/tests/__init__.py +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/tests/api_resources/__init__.py +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/tests/conftest.py +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/tests/sample_file.txt +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/tests/test_deepcopy.py +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/tests/test_extract_files.py +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/tests/test_files.py +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/tests/test_models.py +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/tests/test_qs.py +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/tests/test_required_args.py +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/tests/test_response.py +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/tests/test_streaming.py +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/tests/test_transform.py +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/tests/test_utils/test_proxy.py +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/tests/test_utils/test_typing.py +0 -0
- {relaxai-0.1.0 → relaxai-0.17.0}/tests/utils.py +0 -0
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.17.0 (2025-08-26)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.16.0...v0.17.0](https://github.com/relax-ai/python-sdk/compare/v0.16.0...v0.17.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** update via SDK Studio ([e8708e9](https://github.com/relax-ai/python-sdk/commit/e8708e99ebb76318a9009606471bfbfb8f762ac4))
|
|
10
|
+
|
|
11
|
+
## 0.16.0 (2025-08-26)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v0.15.0...v0.16.0](https://github.com/relax-ai/python-sdk/compare/v0.15.0...v0.16.0)
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **api:** update via SDK Studio ([cdf054a](https://github.com/relax-ai/python-sdk/commit/cdf054a861f447ef6cdb26af3b93d99e34aac307))
|
|
18
|
+
* **api:** update via SDK Studio ([f6ed73b](https://github.com/relax-ai/python-sdk/commit/f6ed73b46ba3716a4d7fda707d9dcc6acb1e962b))
|
|
19
|
+
|
|
20
|
+
## 0.15.0 (2025-08-26)
|
|
21
|
+
|
|
22
|
+
Full Changelog: [v0.14.0...v0.15.0](https://github.com/relax-ai/python-sdk/compare/v0.14.0...v0.15.0)
|
|
23
|
+
|
|
24
|
+
### Features
|
|
25
|
+
|
|
26
|
+
* **api:** update via SDK Studio ([978b8c1](https://github.com/relax-ai/python-sdk/commit/978b8c14f5b522c5c2301ffb7b13ead2640773f1))
|
|
27
|
+
|
|
28
|
+
## 0.14.0 (2025-08-26)
|
|
29
|
+
|
|
30
|
+
Full Changelog: [v0.13.0...v0.14.0](https://github.com/relax-ai/python-sdk/compare/v0.13.0...v0.14.0)
|
|
31
|
+
|
|
32
|
+
### Features
|
|
33
|
+
|
|
34
|
+
* **api:** update via SDK Studio ([8908751](https://github.com/relax-ai/python-sdk/commit/8908751c9870e75139a00ce8a49578450b805941))
|
|
35
|
+
* **api:** update via SDK Studio ([14ec145](https://github.com/relax-ai/python-sdk/commit/14ec145db8a0ab1360fb3a085ca489d9ca8afeb1))
|
|
36
|
+
|
|
37
|
+
## 0.13.0 (2025-08-26)
|
|
38
|
+
|
|
39
|
+
Full Changelog: [v0.12.0...v0.13.0](https://github.com/relax-ai/python-sdk/compare/v0.12.0...v0.13.0)
|
|
40
|
+
|
|
41
|
+
### Features
|
|
42
|
+
|
|
43
|
+
* **api:** update via SDK Studio ([92fe5ae](https://github.com/relax-ai/python-sdk/commit/92fe5ae1ced1942f524f4233f7be7413b044b264))
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
### Chores
|
|
47
|
+
|
|
48
|
+
* **internal:** change ci workflow machines ([4f8c965](https://github.com/relax-ai/python-sdk/commit/4f8c9652a55ebefcd7a7a034a2eebeedba13f2cb))
|
|
49
|
+
* update github action ([82bdf02](https://github.com/relax-ai/python-sdk/commit/82bdf0209421625e4d4d01b371784b1e98c97d62))
|
|
50
|
+
|
|
51
|
+
## 0.12.0 (2025-08-21)
|
|
52
|
+
|
|
53
|
+
Full Changelog: [v0.11.0...v0.12.0](https://github.com/relax-ai/python-sdk/compare/v0.11.0...v0.12.0)
|
|
54
|
+
|
|
55
|
+
### Features
|
|
56
|
+
|
|
57
|
+
* **api:** update via SDK Studio ([11aae68](https://github.com/relax-ai/python-sdk/commit/11aae68a730b918abf5d9c8f0991ca923d15a5d7))
|
|
58
|
+
* **api:** update via SDK Studio ([53fd3c1](https://github.com/relax-ai/python-sdk/commit/53fd3c18d19447b5a2314af8c2626dcc83ab6176))
|
|
59
|
+
* clean up environment call outs ([fd52000](https://github.com/relax-ai/python-sdk/commit/fd52000dd6823e3f52759ffb32457b1b6bb777e8))
|
|
60
|
+
* **client:** support file upload requests ([e70c0ec](https://github.com/relax-ai/python-sdk/commit/e70c0ecbd97586746fcaa4618f8c7c254fe5edbb))
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
### Bug Fixes
|
|
64
|
+
|
|
65
|
+
* **ci:** correct conditional ([7b9dd73](https://github.com/relax-ai/python-sdk/commit/7b9dd73dec12d098f3908c46804fea6323991933))
|
|
66
|
+
* **client:** don't send Content-Type header on GET requests ([134d444](https://github.com/relax-ai/python-sdk/commit/134d444d1e46fa968b03c1d2c29a81a3f50260bc))
|
|
67
|
+
* **parsing:** correctly handle nested discriminated unions ([f3f2481](https://github.com/relax-ai/python-sdk/commit/f3f2481e3b294c4859dce817620beeda0750df70))
|
|
68
|
+
* **parsing:** ignore empty metadata ([5a69522](https://github.com/relax-ai/python-sdk/commit/5a695221f0607e7140856e41cc84057fed534cf5))
|
|
69
|
+
* **parsing:** parse extra field types ([058ebec](https://github.com/relax-ai/python-sdk/commit/058ebec52bdfbdd0fa5d094507ec0151954d7611))
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
### Chores
|
|
73
|
+
|
|
74
|
+
* **ci:** change upload type ([d0eac9e](https://github.com/relax-ai/python-sdk/commit/d0eac9e1c21f5af782d7b6b0e9d4e12a7ae1ba4b))
|
|
75
|
+
* **ci:** only run for pushes and fork pull requests ([2823330](https://github.com/relax-ai/python-sdk/commit/28233300e18b343582f000c7809c6d5f9e5c9dfd))
|
|
76
|
+
* **internal:** bump pinned h11 dep ([2fcd331](https://github.com/relax-ai/python-sdk/commit/2fcd331182be60fe3186a12bf076c0792312d340))
|
|
77
|
+
* **internal:** codegen related update ([cf132b1](https://github.com/relax-ai/python-sdk/commit/cf132b191e08d91e189d3dd910f020121511ec4b))
|
|
78
|
+
* **internal:** fix ruff target version ([98ebba8](https://github.com/relax-ai/python-sdk/commit/98ebba829120bb69d9c97a8c434748ee216427c4))
|
|
79
|
+
* **internal:** version bump ([0a019aa](https://github.com/relax-ai/python-sdk/commit/0a019aa4888b574cc3892e8a1ed188330c97f971))
|
|
80
|
+
* **package:** mark python 3.13 as supported ([75f9e16](https://github.com/relax-ai/python-sdk/commit/75f9e16cf24b3ce117503d87083ef95511230c95))
|
|
81
|
+
* **project:** add settings file for vscode ([d91c008](https://github.com/relax-ai/python-sdk/commit/d91c008238bb40bfe103413b61798695821f2e66))
|
|
82
|
+
* **readme:** fix version rendering on pypi ([ba4beb8](https://github.com/relax-ai/python-sdk/commit/ba4beb8326b69e8dc5e54e014620c35681e21114))
|
|
83
|
+
* sync repo ([0bb5fc8](https://github.com/relax-ai/python-sdk/commit/0bb5fc82969d958f999c864a47af4b95be8f41cf))
|
|
84
|
+
* update @stainless-api/prism-cli to v5.15.0 ([5e5155e](https://github.com/relax-ai/python-sdk/commit/5e5155e471ec22bd51e51c08272fef2281e9c523))
|
|
85
|
+
* update SDK settings ([682ca85](https://github.com/relax-ai/python-sdk/commit/682ca85bbaf7b9ed51f01f9c2090db8dc7890ce3))
|
|
86
|
+
* update SDK settings ([b6c7f5a](https://github.com/relax-ai/python-sdk/commit/b6c7f5aebefb986948527773a67b92fe2fb15954))
|
|
87
|
+
* update SDK settings ([fc9f194](https://github.com/relax-ai/python-sdk/commit/fc9f194e0d241fb70577baba8285b31f76677d19))
|
|
88
|
+
|
|
89
|
+
## 0.11.0 (2025-08-20)
|
|
90
|
+
|
|
91
|
+
Full Changelog: [v0.1.0...v0.11.0](https://github.com/bennorris123/python-sdk-test/compare/v0.1.0...v0.11.0)
|
|
92
|
+
|
|
93
|
+
### Chores
|
|
94
|
+
|
|
95
|
+
* sync repo ([8b4f938](https://github.com/bennorris123/python-sdk-test/commit/8b4f93863d6771931ceaa4441a43e4fd45300804))
|
|
96
|
+
* update SDK settings ([5e557e4](https://github.com/bennorris123/python-sdk-test/commit/5e557e44d1f50b8f26e94253d9ab6e0bf2941689))
|
|
97
|
+
* update SDK settings ([1d0944d](https://github.com/bennorris123/python-sdk-test/commit/1d0944db459fd31e320413b82ad110dcc7c52bd3))
|
|
98
|
+
|
|
99
|
+
## 0.1.0 (2025-07-25)
|
|
100
|
+
|
|
101
|
+
Full Changelog: [v0.0.1...v0.1.0](https://github.com/relax-ai/python-sdk/compare/v0.0.1...v0.1.0)
|
|
102
|
+
|
|
103
|
+
### Features
|
|
104
|
+
|
|
105
|
+
* **api:** update via SDK Studio ([53fd3c1](https://github.com/relax-ai/python-sdk/commit/53fd3c18d19447b5a2314af8c2626dcc83ab6176))
|
|
106
|
+
* clean up environment call outs ([fd52000](https://github.com/relax-ai/python-sdk/commit/fd52000dd6823e3f52759ffb32457b1b6bb777e8))
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
### Bug Fixes
|
|
110
|
+
|
|
111
|
+
* **ci:** correct conditional ([7b9dd73](https://github.com/relax-ai/python-sdk/commit/7b9dd73dec12d098f3908c46804fea6323991933))
|
|
112
|
+
* **client:** don't send Content-Type header on GET requests ([134d444](https://github.com/relax-ai/python-sdk/commit/134d444d1e46fa968b03c1d2c29a81a3f50260bc))
|
|
113
|
+
* **parsing:** correctly handle nested discriminated unions ([f3f2481](https://github.com/relax-ai/python-sdk/commit/f3f2481e3b294c4859dce817620beeda0750df70))
|
|
114
|
+
* **parsing:** ignore empty metadata ([5a69522](https://github.com/relax-ai/python-sdk/commit/5a695221f0607e7140856e41cc84057fed534cf5))
|
|
115
|
+
* **parsing:** parse extra field types ([058ebec](https://github.com/relax-ai/python-sdk/commit/058ebec52bdfbdd0fa5d094507ec0151954d7611))
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
### Chores
|
|
119
|
+
|
|
120
|
+
* **ci:** change upload type ([d0eac9e](https://github.com/relax-ai/python-sdk/commit/d0eac9e1c21f5af782d7b6b0e9d4e12a7ae1ba4b))
|
|
121
|
+
* **ci:** only run for pushes and fork pull requests ([2823330](https://github.com/relax-ai/python-sdk/commit/28233300e18b343582f000c7809c6d5f9e5c9dfd))
|
|
122
|
+
* **internal:** bump pinned h11 dep ([2fcd331](https://github.com/relax-ai/python-sdk/commit/2fcd331182be60fe3186a12bf076c0792312d340))
|
|
123
|
+
* **internal:** codegen related update ([cf132b1](https://github.com/relax-ai/python-sdk/commit/cf132b191e08d91e189d3dd910f020121511ec4b))
|
|
124
|
+
* **internal:** version bump ([0a019aa](https://github.com/relax-ai/python-sdk/commit/0a019aa4888b574cc3892e8a1ed188330c97f971))
|
|
125
|
+
* **package:** mark python 3.13 as supported ([75f9e16](https://github.com/relax-ai/python-sdk/commit/75f9e16cf24b3ce117503d87083ef95511230c95))
|
|
126
|
+
* **project:** add settings file for vscode ([d91c008](https://github.com/relax-ai/python-sdk/commit/d91c008238bb40bfe103413b61798695821f2e66))
|
|
127
|
+
* **readme:** fix version rendering on pypi ([ba4beb8](https://github.com/relax-ai/python-sdk/commit/ba4beb8326b69e8dc5e54e014620c35681e21114))
|
|
128
|
+
|
|
129
|
+
## 0.0.1 (2025-06-27)
|
|
130
|
+
|
|
131
|
+
Full Changelog: [v0.0.1-alpha.0...v0.0.1](https://github.com/relax-ai/python-sdk/compare/v0.0.1-alpha.0...v0.0.1)
|
|
132
|
+
|
|
133
|
+
### Chores
|
|
134
|
+
|
|
135
|
+
* update SDK settings ([b6c7f5a](https://github.com/relax-ai/python-sdk/commit/b6c7f5aebefb986948527773a67b92fe2fb15954))
|
|
136
|
+
* update SDK settings ([fc9f194](https://github.com/relax-ai/python-sdk/commit/fc9f194e0d241fb70577baba8285b31f76677d19))
|
|
@@ -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
|
|
|
@@ -32,16 +32,17 @@ client = Relaxai(
|
|
|
32
32
|
api_key=os.environ.get("RELAXAI_API_KEY"), # This is the default and can be omitted
|
|
33
33
|
)
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
chat_completion_response = client.chat.create_completion(
|
|
36
36
|
messages=[
|
|
37
37
|
{
|
|
38
|
-
"
|
|
39
|
-
"
|
|
38
|
+
"role": "user",
|
|
39
|
+
"content": "Hello, how are you?",
|
|
40
40
|
}
|
|
41
41
|
],
|
|
42
|
-
model="
|
|
42
|
+
model="Llama-4-Maverick-17B-128E",
|
|
43
|
+
max_tokens=100,
|
|
43
44
|
)
|
|
44
|
-
print(
|
|
45
|
+
print(chat_completion_response.choices)
|
|
45
46
|
```
|
|
46
47
|
|
|
47
48
|
While you can provide an `api_key` keyword argument,
|
|
@@ -64,16 +65,17 @@ client = AsyncRelaxai(
|
|
|
64
65
|
|
|
65
66
|
|
|
66
67
|
async def main() -> None:
|
|
67
|
-
|
|
68
|
+
chat_completion_response = await client.chat.create_completion(
|
|
68
69
|
messages=[
|
|
69
70
|
{
|
|
70
|
-
"
|
|
71
|
-
"
|
|
71
|
+
"role": "user",
|
|
72
|
+
"content": "Hello, how are you?",
|
|
72
73
|
}
|
|
73
74
|
],
|
|
74
|
-
model="
|
|
75
|
+
model="Llama-4-Maverick-17B-128E",
|
|
76
|
+
max_tokens=100,
|
|
75
77
|
)
|
|
76
|
-
print(
|
|
78
|
+
print(chat_completion_response.choices)
|
|
77
79
|
|
|
78
80
|
|
|
79
81
|
asyncio.run(main())
|
|
@@ -105,16 +107,17 @@ async def main() -> None:
|
|
|
105
107
|
api_key="My API Key",
|
|
106
108
|
http_client=DefaultAioHttpClient(),
|
|
107
109
|
) as client:
|
|
108
|
-
|
|
110
|
+
chat_completion_response = await client.chat.create_completion(
|
|
109
111
|
messages=[
|
|
110
112
|
{
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
+
"role": "user",
|
|
114
|
+
"content": "Hello, how are you?",
|
|
113
115
|
}
|
|
114
116
|
],
|
|
115
|
-
model="
|
|
117
|
+
model="Llama-4-Maverick-17B-128E",
|
|
118
|
+
max_tokens=100,
|
|
116
119
|
)
|
|
117
|
-
print(
|
|
120
|
+
print(chat_completion_response.choices)
|
|
118
121
|
|
|
119
122
|
|
|
120
123
|
asyncio.run(main())
|
|
@@ -138,10 +141,10 @@ from relaxai import Relaxai
|
|
|
138
141
|
|
|
139
142
|
client = Relaxai()
|
|
140
143
|
|
|
141
|
-
|
|
144
|
+
chat_completion_response = client.chat.create_completion(
|
|
142
145
|
messages=[
|
|
143
146
|
{
|
|
144
|
-
"
|
|
147
|
+
"content": "content",
|
|
145
148
|
"role": "role",
|
|
146
149
|
}
|
|
147
150
|
],
|
|
@@ -151,7 +154,7 @@ response = client.chat.create_completion(
|
|
|
151
154
|
"type": "type",
|
|
152
155
|
},
|
|
153
156
|
)
|
|
154
|
-
print(
|
|
157
|
+
print(chat_completion_response.prediction)
|
|
155
158
|
```
|
|
156
159
|
|
|
157
160
|
## Handling errors
|
|
@@ -173,11 +176,12 @@ try:
|
|
|
173
176
|
client.chat.create_completion(
|
|
174
177
|
messages=[
|
|
175
178
|
{
|
|
176
|
-
"
|
|
177
|
-
"
|
|
179
|
+
"role": "user",
|
|
180
|
+
"content": "Hello, how are you?",
|
|
178
181
|
}
|
|
179
182
|
],
|
|
180
|
-
model="
|
|
183
|
+
model="Llama-4-Maverick-17B-128E",
|
|
184
|
+
max_tokens=100,
|
|
181
185
|
)
|
|
182
186
|
except relaxai.APIConnectionError as e:
|
|
183
187
|
print("The server could not be reached")
|
|
@@ -224,11 +228,12 @@ client = Relaxai(
|
|
|
224
228
|
client.with_options(max_retries=5).chat.create_completion(
|
|
225
229
|
messages=[
|
|
226
230
|
{
|
|
227
|
-
"
|
|
228
|
-
"
|
|
231
|
+
"role": "user",
|
|
232
|
+
"content": "Hello, how are you?",
|
|
229
233
|
}
|
|
230
234
|
],
|
|
231
|
-
model="
|
|
235
|
+
model="Llama-4-Maverick-17B-128E",
|
|
236
|
+
max_tokens=100,
|
|
232
237
|
)
|
|
233
238
|
```
|
|
234
239
|
|
|
@@ -255,11 +260,12 @@ client = Relaxai(
|
|
|
255
260
|
client.with_options(timeout=5.0).chat.create_completion(
|
|
256
261
|
messages=[
|
|
257
262
|
{
|
|
258
|
-
"
|
|
259
|
-
"
|
|
263
|
+
"role": "user",
|
|
264
|
+
"content": "Hello, how are you?",
|
|
260
265
|
}
|
|
261
266
|
],
|
|
262
|
-
model="
|
|
267
|
+
model="Llama-4-Maverick-17B-128E",
|
|
268
|
+
max_tokens=100,
|
|
263
269
|
)
|
|
264
270
|
```
|
|
265
271
|
|
|
@@ -303,10 +309,11 @@ from relaxai import Relaxai
|
|
|
303
309
|
client = Relaxai()
|
|
304
310
|
response = client.chat.with_raw_response.create_completion(
|
|
305
311
|
messages=[{
|
|
306
|
-
"
|
|
307
|
-
"
|
|
312
|
+
"role": "user",
|
|
313
|
+
"content": "Hello, how are you?",
|
|
308
314
|
}],
|
|
309
|
-
model="
|
|
315
|
+
model="Llama-4-Maverick-17B-128E",
|
|
316
|
+
max_tokens=100,
|
|
310
317
|
)
|
|
311
318
|
print(response.headers.get('X-My-Header'))
|
|
312
319
|
|
|
@@ -328,11 +335,12 @@ To stream the response body, use `.with_streaming_response` instead, which requi
|
|
|
328
335
|
with client.chat.with_streaming_response.create_completion(
|
|
329
336
|
messages=[
|
|
330
337
|
{
|
|
331
|
-
"
|
|
332
|
-
"
|
|
338
|
+
"role": "user",
|
|
339
|
+
"content": "Hello, how are you?",
|
|
333
340
|
}
|
|
334
341
|
],
|
|
335
|
-
model="
|
|
342
|
+
model="Llama-4-Maverick-17B-128E",
|
|
343
|
+
max_tokens=100,
|
|
336
344
|
) as response:
|
|
337
345
|
print(response.headers.get("X-My-Header"))
|
|
338
346
|
|
|
@@ -20,7 +20,7 @@ or products provided by Relaxai, please follow the respective company's security
|
|
|
20
20
|
|
|
21
21
|
### Relaxai Terms and Policies
|
|
22
22
|
|
|
23
|
-
Please contact hello@
|
|
23
|
+
Please contact hello@relax.ai for any questions or concerns regarding the security of our services.
|
|
24
24
|
|
|
25
25
|
---
|
|
26
26
|
|
relaxai-0.17.0/api.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Shared Types
|
|
2
|
+
|
|
3
|
+
```python
|
|
4
|
+
from relaxai.types import OpenAICompletionTokensDetails, OpenAIPromptTokensDetails, OpenAIUsage
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
# Relaxai
|
|
8
|
+
|
|
9
|
+
Types:
|
|
10
|
+
|
|
11
|
+
```python
|
|
12
|
+
from relaxai.types import HealthResponse
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Methods:
|
|
16
|
+
|
|
17
|
+
- <code title="get /v1/health">client.<a href="./src/relaxai/_client.py">health</a>() -> str</code>
|
|
18
|
+
|
|
19
|
+
# Chat
|
|
20
|
+
|
|
21
|
+
Types:
|
|
22
|
+
|
|
23
|
+
```python
|
|
24
|
+
from relaxai.types import (
|
|
25
|
+
ChatCompletionMessage,
|
|
26
|
+
ChatCompletionRequest,
|
|
27
|
+
ChatCompletionResponse,
|
|
28
|
+
ContentFilterResults,
|
|
29
|
+
FunctionCall,
|
|
30
|
+
FunctionDefinition,
|
|
31
|
+
StreamOptions,
|
|
32
|
+
)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Methods:
|
|
36
|
+
|
|
37
|
+
- <code title="post /v1/chat/completions">client.chat.<a href="./src/relaxai/resources/chat.py">create_completion</a>(\*\*<a href="src/relaxai/types/chat_create_completion_params.py">params</a>) -> <a href="./src/relaxai/types/chat_completion_response.py">ChatCompletionResponse</a></code>
|
|
38
|
+
|
|
39
|
+
# Embeddings
|
|
40
|
+
|
|
41
|
+
Types:
|
|
42
|
+
|
|
43
|
+
```python
|
|
44
|
+
from relaxai.types import EmbeddingRequest, EmbeddingResponse
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Methods:
|
|
48
|
+
|
|
49
|
+
- <code title="post /v1/embeddings">client.embeddings.<a href="./src/relaxai/resources/embeddings.py">create_embedding</a>(\*\*<a href="src/relaxai/types/embedding_create_embedding_params.py">params</a>) -> <a href="./src/relaxai/types/embedding_response.py">EmbeddingResponse</a></code>
|
|
50
|
+
|
|
51
|
+
# Models
|
|
52
|
+
|
|
53
|
+
Types:
|
|
54
|
+
|
|
55
|
+
```python
|
|
56
|
+
from relaxai.types import Model, ModelList
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Methods:
|
|
60
|
+
|
|
61
|
+
- <code title="get /v1/models">client.models.<a href="./src/relaxai/resources/models.py">list_models</a>() -> <a href="./src/relaxai/types/model_list.py">ModelList</a></code>
|
|
62
|
+
- <code title="get /v1/models/{model}">client.models.<a href="./src/relaxai/resources/models.py">retrieve_model</a>(model) -> <a href="./src/relaxai/types/model.py">Model</a></code>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "relaxai"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.17.0"
|
|
4
4
|
description = "The official Python library for the relaxai API"
|
|
5
5
|
dynamic = ["readme"]
|
|
6
6
|
license = "Apache-2.0"
|
|
7
7
|
authors = [
|
|
8
|
-
{ name = "Relaxai", email = "hello@
|
|
8
|
+
{ name = "Relaxai", email = "hello@relax.ai" },
|
|
9
9
|
]
|
|
10
10
|
dependencies = [
|
|
11
11
|
"httpx>=0.23.0, <1",
|
|
@@ -159,7 +159,7 @@ reportPrivateUsage = false
|
|
|
159
159
|
[tool.ruff]
|
|
160
160
|
line-length = 120
|
|
161
161
|
output-format = "grouped"
|
|
162
|
-
target-version = "
|
|
162
|
+
target-version = "py38"
|
|
163
163
|
|
|
164
164
|
[tool.ruff.format]
|
|
165
165
|
docstring-code-format = true
|
|
@@ -532,7 +532,10 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
|
|
|
532
532
|
is_body_allowed = options.method.lower() != "get"
|
|
533
533
|
|
|
534
534
|
if is_body_allowed:
|
|
535
|
-
|
|
535
|
+
if isinstance(json_data, bytes):
|
|
536
|
+
kwargs["content"] = json_data
|
|
537
|
+
else:
|
|
538
|
+
kwargs["json"] = json_data if is_given(json_data) else None
|
|
536
539
|
kwargs["files"] = files
|
|
537
540
|
else:
|
|
538
541
|
headers.pop("Content-Type", None)
|