relaxai 0.0.1__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.0.1 → relaxai-0.17.0}/.gitignore +0 -1
- relaxai-0.17.0/.release-please-manifest.json +3 -0
- relaxai-0.17.0/CHANGELOG.md +136 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/PKG-INFO +48 -39
- {relaxai-0.0.1 → relaxai-0.17.0}/README.md +44 -36
- {relaxai-0.0.1 → relaxai-0.17.0}/SECURITY.md +1 -1
- relaxai-0.17.0/api.md +62 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/pyproject.toml +5 -4
- {relaxai-0.0.1 → relaxai-0.17.0}/requirements-dev.lock +3 -3
- {relaxai-0.0.1 → relaxai-0.17.0}/requirements.lock +3 -3
- {relaxai-0.0.1 → relaxai-0.17.0}/src/relaxai/_base_client.py +12 -2
- {relaxai-0.0.1 → relaxai-0.17.0}/src/relaxai/_client.py +77 -40
- {relaxai-0.0.1 → relaxai-0.17.0}/src/relaxai/_files.py +4 -4
- {relaxai-0.0.1 → relaxai-0.17.0}/src/relaxai/_models.py +31 -7
- {relaxai-0.0.1 → relaxai-0.17.0}/src/relaxai/_version.py +1 -1
- {relaxai-0.0.1 → relaxai-0.17.0}/src/relaxai/resources/__init__.py +0 -14
- {relaxai-0.0.1 → relaxai-0.17.0}/src/relaxai/resources/chat.py +38 -13
- {relaxai-0.0.1 → relaxai-0.17.0}/src/relaxai/resources/embeddings.py +18 -18
- {relaxai-0.0.1 → relaxai-0.17.0}/src/relaxai/resources/models.py +57 -57
- {relaxai-0.0.1 → relaxai-0.17.0}/src/relaxai/types/__init__.py +11 -6
- {relaxai-0.0.1 → relaxai-0.17.0}/src/relaxai/types/chat_completion_message.py +29 -3
- {relaxai-0.0.1 → relaxai-0.17.0}/src/relaxai/types/chat_completion_message_param.py +29 -4
- relaxai-0.0.1/src/relaxai/types/chat_create_completion_response.py → relaxai-0.17.0/src/relaxai/types/chat_completion_response.py +4 -4
- {relaxai-0.0.1 → relaxai-0.17.0}/src/relaxai/types/chat_create_completion_params.py +40 -8
- relaxai-0.0.1/src/relaxai/types/embedding_create_params.py → relaxai-0.17.0/src/relaxai/types/embedding_create_embedding_params.py +2 -2
- relaxai-0.0.1/src/relaxai/types/embedding_create_response.py → relaxai-0.17.0/src/relaxai/types/embedding_response.py +4 -4
- relaxai-0.0.1/src/relaxai/types/health_check_response.py → relaxai-0.17.0/src/relaxai/types/health_response.py +2 -2
- relaxai-0.0.1/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.0.1 → 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.0.1 → relaxai-0.17.0}/tests/api_resources/test_embeddings.py +33 -33
- {relaxai-0.0.1 → relaxai-0.17.0}/tests/api_resources/test_models.py +73 -73
- {relaxai-0.0.1 → relaxai-0.17.0}/tests/test_client.py +21 -39
- {relaxai-0.0.1 → relaxai-0.17.0}/tests/test_models.py +73 -1
- relaxai-0.0.1/.release-please-manifest.json +0 -3
- relaxai-0.0.1/CHANGELOG.md +0 -10
- relaxai-0.0.1/api.md +0 -55
- relaxai-0.0.1/src/relaxai/resources/health.py +0 -134
- relaxai-0.0.1/src/relaxai/types/usage.py +0 -33
- relaxai-0.0.1/tests/api_resources/test_health.py +0 -79
- {relaxai-0.0.1 → relaxai-0.17.0}/CONTRIBUTING.md +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/LICENSE +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/bin/check-release-environment +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/bin/publish-pypi +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/examples/.keep +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/mypy.ini +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/noxfile.py +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/release-please-config.json +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/src/relaxai/__init__.py +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/src/relaxai/_compat.py +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/src/relaxai/_constants.py +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/src/relaxai/_exceptions.py +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/src/relaxai/_qs.py +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/src/relaxai/_resource.py +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/src/relaxai/_response.py +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/src/relaxai/_streaming.py +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/src/relaxai/_types.py +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/src/relaxai/_utils/__init__.py +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/src/relaxai/_utils/_logs.py +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/src/relaxai/_utils/_proxy.py +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/src/relaxai/_utils/_reflection.py +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/src/relaxai/_utils/_resources_proxy.py +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/src/relaxai/_utils/_streams.py +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/src/relaxai/_utils/_sync.py +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/src/relaxai/_utils/_transform.py +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/src/relaxai/_utils/_typing.py +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/src/relaxai/_utils/_utils.py +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/src/relaxai/lib/.keep +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/src/relaxai/py.typed +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/src/relaxai/types/content_filter_results.py +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/src/relaxai/types/function_call.py +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/src/relaxai/types/function_call_param.py +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/src/relaxai/types/function_definition_param.py +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/src/relaxai/types/model.py +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/tests/__init__.py +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/tests/api_resources/__init__.py +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/tests/conftest.py +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/tests/sample_file.txt +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/tests/test_deepcopy.py +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/tests/test_extract_files.py +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/tests/test_files.py +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/tests/test_qs.py +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/tests/test_required_args.py +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/tests/test_response.py +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/tests/test_streaming.py +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/tests/test_transform.py +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/tests/test_utils/test_proxy.py +0 -0
- {relaxai-0.0.1 → relaxai-0.17.0}/tests/test_utils/test_typing.py +0 -0
- {relaxai-0.0.1 → 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.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
|
|
@@ -18,6 +18,7 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.10
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.11
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
22
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
22
23
|
Classifier: Typing :: Typed
|
|
23
24
|
Requires-Python: >=3.8
|
|
@@ -29,12 +30,13 @@ Requires-Dist: sniffio
|
|
|
29
30
|
Requires-Dist: typing-extensions<5,>=4.10
|
|
30
31
|
Provides-Extra: aiohttp
|
|
31
32
|
Requires-Dist: aiohttp; extra == 'aiohttp'
|
|
32
|
-
Requires-Dist: httpx-aiohttp>=0.1.
|
|
33
|
+
Requires-Dist: httpx-aiohttp>=0.1.8; extra == 'aiohttp'
|
|
33
34
|
Description-Content-Type: text/markdown
|
|
34
35
|
|
|
35
36
|
# Relaxai Python API library
|
|
36
37
|
|
|
37
|
-
|
|
38
|
+
<!-- prettier-ignore -->
|
|
39
|
+
[)](https://pypi.org/project/relaxai/)
|
|
38
40
|
|
|
39
41
|
The Relaxai Python library provides convenient access to the Relaxai REST API from any Python 3.8+
|
|
40
42
|
application. The library includes type definitions for all request params and response fields,
|
|
@@ -65,16 +67,17 @@ client = Relaxai(
|
|
|
65
67
|
api_key=os.environ.get("RELAXAI_API_KEY"), # This is the default and can be omitted
|
|
66
68
|
)
|
|
67
69
|
|
|
68
|
-
|
|
70
|
+
chat_completion_response = client.chat.create_completion(
|
|
69
71
|
messages=[
|
|
70
72
|
{
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
+
"role": "user",
|
|
74
|
+
"content": "Hello, how are you?",
|
|
73
75
|
}
|
|
74
76
|
],
|
|
75
|
-
model="
|
|
77
|
+
model="Llama-4-Maverick-17B-128E",
|
|
78
|
+
max_tokens=100,
|
|
76
79
|
)
|
|
77
|
-
print(
|
|
80
|
+
print(chat_completion_response.choices)
|
|
78
81
|
```
|
|
79
82
|
|
|
80
83
|
While you can provide an `api_key` keyword argument,
|
|
@@ -97,16 +100,17 @@ client = AsyncRelaxai(
|
|
|
97
100
|
|
|
98
101
|
|
|
99
102
|
async def main() -> None:
|
|
100
|
-
|
|
103
|
+
chat_completion_response = await client.chat.create_completion(
|
|
101
104
|
messages=[
|
|
102
105
|
{
|
|
103
|
-
"
|
|
104
|
-
"
|
|
106
|
+
"role": "user",
|
|
107
|
+
"content": "Hello, how are you?",
|
|
105
108
|
}
|
|
106
109
|
],
|
|
107
|
-
model="
|
|
110
|
+
model="Llama-4-Maverick-17B-128E",
|
|
111
|
+
max_tokens=100,
|
|
108
112
|
)
|
|
109
|
-
print(
|
|
113
|
+
print(chat_completion_response.choices)
|
|
110
114
|
|
|
111
115
|
|
|
112
116
|
asyncio.run(main())
|
|
@@ -128,7 +132,6 @@ pip install relaxai[aiohttp]
|
|
|
128
132
|
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
|
|
129
133
|
|
|
130
134
|
```python
|
|
131
|
-
import os
|
|
132
135
|
import asyncio
|
|
133
136
|
from relaxai import DefaultAioHttpClient
|
|
134
137
|
from relaxai import AsyncRelaxai
|
|
@@ -136,19 +139,20 @@ from relaxai import AsyncRelaxai
|
|
|
136
139
|
|
|
137
140
|
async def main() -> None:
|
|
138
141
|
async with AsyncRelaxai(
|
|
139
|
-
api_key=
|
|
142
|
+
api_key="My API Key",
|
|
140
143
|
http_client=DefaultAioHttpClient(),
|
|
141
144
|
) as client:
|
|
142
|
-
|
|
145
|
+
chat_completion_response = await client.chat.create_completion(
|
|
143
146
|
messages=[
|
|
144
147
|
{
|
|
145
|
-
"
|
|
146
|
-
"
|
|
148
|
+
"role": "user",
|
|
149
|
+
"content": "Hello, how are you?",
|
|
147
150
|
}
|
|
148
151
|
],
|
|
149
|
-
model="
|
|
152
|
+
model="Llama-4-Maverick-17B-128E",
|
|
153
|
+
max_tokens=100,
|
|
150
154
|
)
|
|
151
|
-
print(
|
|
155
|
+
print(chat_completion_response.choices)
|
|
152
156
|
|
|
153
157
|
|
|
154
158
|
asyncio.run(main())
|
|
@@ -172,10 +176,10 @@ from relaxai import Relaxai
|
|
|
172
176
|
|
|
173
177
|
client = Relaxai()
|
|
174
178
|
|
|
175
|
-
|
|
179
|
+
chat_completion_response = client.chat.create_completion(
|
|
176
180
|
messages=[
|
|
177
181
|
{
|
|
178
|
-
"
|
|
182
|
+
"content": "content",
|
|
179
183
|
"role": "role",
|
|
180
184
|
}
|
|
181
185
|
],
|
|
@@ -185,7 +189,7 @@ response = client.chat.create_completion(
|
|
|
185
189
|
"type": "type",
|
|
186
190
|
},
|
|
187
191
|
)
|
|
188
|
-
print(
|
|
192
|
+
print(chat_completion_response.prediction)
|
|
189
193
|
```
|
|
190
194
|
|
|
191
195
|
## Handling errors
|
|
@@ -207,11 +211,12 @@ try:
|
|
|
207
211
|
client.chat.create_completion(
|
|
208
212
|
messages=[
|
|
209
213
|
{
|
|
210
|
-
"
|
|
211
|
-
"
|
|
214
|
+
"role": "user",
|
|
215
|
+
"content": "Hello, how are you?",
|
|
212
216
|
}
|
|
213
217
|
],
|
|
214
|
-
model="
|
|
218
|
+
model="Llama-4-Maverick-17B-128E",
|
|
219
|
+
max_tokens=100,
|
|
215
220
|
)
|
|
216
221
|
except relaxai.APIConnectionError as e:
|
|
217
222
|
print("The server could not be reached")
|
|
@@ -258,11 +263,12 @@ client = Relaxai(
|
|
|
258
263
|
client.with_options(max_retries=5).chat.create_completion(
|
|
259
264
|
messages=[
|
|
260
265
|
{
|
|
261
|
-
"
|
|
262
|
-
"
|
|
266
|
+
"role": "user",
|
|
267
|
+
"content": "Hello, how are you?",
|
|
263
268
|
}
|
|
264
269
|
],
|
|
265
|
-
model="
|
|
270
|
+
model="Llama-4-Maverick-17B-128E",
|
|
271
|
+
max_tokens=100,
|
|
266
272
|
)
|
|
267
273
|
```
|
|
268
274
|
|
|
@@ -289,11 +295,12 @@ client = Relaxai(
|
|
|
289
295
|
client.with_options(timeout=5.0).chat.create_completion(
|
|
290
296
|
messages=[
|
|
291
297
|
{
|
|
292
|
-
"
|
|
293
|
-
"
|
|
298
|
+
"role": "user",
|
|
299
|
+
"content": "Hello, how are you?",
|
|
294
300
|
}
|
|
295
301
|
],
|
|
296
|
-
model="
|
|
302
|
+
model="Llama-4-Maverick-17B-128E",
|
|
303
|
+
max_tokens=100,
|
|
297
304
|
)
|
|
298
305
|
```
|
|
299
306
|
|
|
@@ -337,10 +344,11 @@ from relaxai import Relaxai
|
|
|
337
344
|
client = Relaxai()
|
|
338
345
|
response = client.chat.with_raw_response.create_completion(
|
|
339
346
|
messages=[{
|
|
340
|
-
"
|
|
341
|
-
"
|
|
347
|
+
"role": "user",
|
|
348
|
+
"content": "Hello, how are you?",
|
|
342
349
|
}],
|
|
343
|
-
model="
|
|
350
|
+
model="Llama-4-Maverick-17B-128E",
|
|
351
|
+
max_tokens=100,
|
|
344
352
|
)
|
|
345
353
|
print(response.headers.get('X-My-Header'))
|
|
346
354
|
|
|
@@ -362,11 +370,12 @@ To stream the response body, use `.with_streaming_response` instead, which requi
|
|
|
362
370
|
with client.chat.with_streaming_response.create_completion(
|
|
363
371
|
messages=[
|
|
364
372
|
{
|
|
365
|
-
"
|
|
366
|
-
"
|
|
373
|
+
"role": "user",
|
|
374
|
+
"content": "Hello, how are you?",
|
|
367
375
|
}
|
|
368
376
|
],
|
|
369
|
-
model="
|
|
377
|
+
model="Llama-4-Maverick-17B-128E",
|
|
378
|
+
max_tokens=100,
|
|
370
379
|
) as response:
|
|
371
380
|
print(response.headers.get("X-My-Header"))
|
|
372
381
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Relaxai Python API library
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<!-- prettier-ignore -->
|
|
4
|
+
[)](https://pypi.org/project/relaxai/)
|
|
4
5
|
|
|
5
6
|
The Relaxai Python library provides convenient access to the Relaxai REST API from any Python 3.8+
|
|
6
7
|
application. The library includes type definitions for all request params and response fields,
|
|
@@ -31,16 +32,17 @@ client = Relaxai(
|
|
|
31
32
|
api_key=os.environ.get("RELAXAI_API_KEY"), # This is the default and can be omitted
|
|
32
33
|
)
|
|
33
34
|
|
|
34
|
-
|
|
35
|
+
chat_completion_response = client.chat.create_completion(
|
|
35
36
|
messages=[
|
|
36
37
|
{
|
|
37
|
-
"
|
|
38
|
-
"
|
|
38
|
+
"role": "user",
|
|
39
|
+
"content": "Hello, how are you?",
|
|
39
40
|
}
|
|
40
41
|
],
|
|
41
|
-
model="
|
|
42
|
+
model="Llama-4-Maverick-17B-128E",
|
|
43
|
+
max_tokens=100,
|
|
42
44
|
)
|
|
43
|
-
print(
|
|
45
|
+
print(chat_completion_response.choices)
|
|
44
46
|
```
|
|
45
47
|
|
|
46
48
|
While you can provide an `api_key` keyword argument,
|
|
@@ -63,16 +65,17 @@ client = AsyncRelaxai(
|
|
|
63
65
|
|
|
64
66
|
|
|
65
67
|
async def main() -> None:
|
|
66
|
-
|
|
68
|
+
chat_completion_response = await client.chat.create_completion(
|
|
67
69
|
messages=[
|
|
68
70
|
{
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
+
"role": "user",
|
|
72
|
+
"content": "Hello, how are you?",
|
|
71
73
|
}
|
|
72
74
|
],
|
|
73
|
-
model="
|
|
75
|
+
model="Llama-4-Maverick-17B-128E",
|
|
76
|
+
max_tokens=100,
|
|
74
77
|
)
|
|
75
|
-
print(
|
|
78
|
+
print(chat_completion_response.choices)
|
|
76
79
|
|
|
77
80
|
|
|
78
81
|
asyncio.run(main())
|
|
@@ -94,7 +97,6 @@ pip install relaxai[aiohttp]
|
|
|
94
97
|
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
|
|
95
98
|
|
|
96
99
|
```python
|
|
97
|
-
import os
|
|
98
100
|
import asyncio
|
|
99
101
|
from relaxai import DefaultAioHttpClient
|
|
100
102
|
from relaxai import AsyncRelaxai
|
|
@@ -102,19 +104,20 @@ from relaxai import AsyncRelaxai
|
|
|
102
104
|
|
|
103
105
|
async def main() -> None:
|
|
104
106
|
async with AsyncRelaxai(
|
|
105
|
-
api_key=
|
|
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.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",
|
|
@@ -24,6 +24,7 @@ classifiers = [
|
|
|
24
24
|
"Programming Language :: Python :: 3.10",
|
|
25
25
|
"Programming Language :: Python :: 3.11",
|
|
26
26
|
"Programming Language :: Python :: 3.12",
|
|
27
|
+
"Programming Language :: Python :: 3.13",
|
|
27
28
|
"Operating System :: OS Independent",
|
|
28
29
|
"Operating System :: POSIX",
|
|
29
30
|
"Operating System :: MacOS",
|
|
@@ -38,7 +39,7 @@ Homepage = "https://github.com/relax-ai/python-sdk"
|
|
|
38
39
|
Repository = "https://github.com/relax-ai/python-sdk"
|
|
39
40
|
|
|
40
41
|
[project.optional-dependencies]
|
|
41
|
-
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.
|
|
42
|
+
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.8"]
|
|
42
43
|
|
|
43
44
|
[tool.rye]
|
|
44
45
|
managed = true
|
|
@@ -158,7 +159,7 @@ reportPrivateUsage = false
|
|
|
158
159
|
[tool.ruff]
|
|
159
160
|
line-length = 120
|
|
160
161
|
output-format = "grouped"
|
|
161
|
-
target-version = "
|
|
162
|
+
target-version = "py38"
|
|
162
163
|
|
|
163
164
|
[tool.ruff.format]
|
|
164
165
|
docstring-code-format = true
|