relaxai 0.2.1__tar.gz → 0.3.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.
Files changed (100) hide show
  1. relaxai-0.3.0/.release-please-manifest.json +3 -0
  2. {relaxai-0.2.1 → relaxai-0.3.0}/CHANGELOG.md +24 -0
  3. {relaxai-0.2.1 → relaxai-0.3.0}/PKG-INFO +1 -1
  4. {relaxai-0.2.1 → relaxai-0.3.0}/api.md +24 -0
  5. {relaxai-0.2.1 → relaxai-0.3.0}/pyproject.toml +58 -2
  6. {relaxai-0.2.1 → relaxai-0.3.0}/requirements-dev.lock +5 -3
  7. {relaxai-0.2.1 → relaxai-0.3.0}/requirements.lock +5 -2
  8. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/__init__.py +3 -1
  9. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/_base_client.py +12 -12
  10. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/_client.py +27 -11
  11. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/_compat.py +48 -48
  12. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/_models.py +50 -44
  13. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/_qs.py +7 -7
  14. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/_types.py +53 -12
  15. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/_utils/__init__.py +9 -2
  16. relaxai-0.3.0/src/relaxai/_utils/_compat.py +45 -0
  17. relaxai-0.3.0/src/relaxai/_utils/_datetime_parse.py +136 -0
  18. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/_utils/_transform.py +13 -3
  19. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/_utils/_typing.py +6 -1
  20. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/_utils/_utils.py +4 -5
  21. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/_version.py +1 -1
  22. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/resources/__init__.py +28 -0
  23. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/resources/chat.py +60 -60
  24. relaxai-0.3.0/src/relaxai/resources/deep_research.py +165 -0
  25. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/resources/embeddings.py +9 -9
  26. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/resources/models.py +5 -5
  27. relaxai-0.3.0/src/relaxai/resources/tools.py +165 -0
  28. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/types/__init__.py +4 -0
  29. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/types/chat_create_completion_params.py +3 -2
  30. relaxai-0.3.0/src/relaxai/types/deep_research_create_params.py +13 -0
  31. relaxai-0.3.0/src/relaxai/types/deepresearch_request_param.py +59 -0
  32. relaxai-0.3.0/src/relaxai/types/tool_execute_code_params.py +13 -0
  33. relaxai-0.3.0/src/relaxai/types/tool_request_param.py +17 -0
  34. relaxai-0.3.0/tests/api_resources/test_deep_research.py +304 -0
  35. relaxai-0.3.0/tests/api_resources/test_tools.py +132 -0
  36. {relaxai-0.2.1 → relaxai-0.3.0}/tests/test_client.py +6 -47
  37. {relaxai-0.2.1 → relaxai-0.3.0}/tests/test_models.py +24 -24
  38. {relaxai-0.2.1 → relaxai-0.3.0}/tests/test_transform.py +17 -10
  39. relaxai-0.3.0/tests/test_utils/test_datetime_parse.py +110 -0
  40. {relaxai-0.2.1 → relaxai-0.3.0}/tests/utils.py +13 -5
  41. relaxai-0.2.1/.release-please-manifest.json +0 -3
  42. relaxai-0.2.1/mypy.ini +0 -50
  43. {relaxai-0.2.1 → relaxai-0.3.0}/.gitignore +0 -0
  44. {relaxai-0.2.1 → relaxai-0.3.0}/CONTRIBUTING.md +0 -0
  45. {relaxai-0.2.1 → relaxai-0.3.0}/LICENSE +0 -0
  46. {relaxai-0.2.1 → relaxai-0.3.0}/README.md +0 -0
  47. {relaxai-0.2.1 → relaxai-0.3.0}/SECURITY.md +0 -0
  48. {relaxai-0.2.1 → relaxai-0.3.0}/bin/check-release-environment +0 -0
  49. {relaxai-0.2.1 → relaxai-0.3.0}/bin/publish-pypi +0 -0
  50. {relaxai-0.2.1 → relaxai-0.3.0}/examples/.keep +0 -0
  51. {relaxai-0.2.1 → relaxai-0.3.0}/noxfile.py +0 -0
  52. {relaxai-0.2.1 → relaxai-0.3.0}/release-please-config.json +0 -0
  53. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/_constants.py +0 -0
  54. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/_exceptions.py +0 -0
  55. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/_files.py +0 -0
  56. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/_resource.py +0 -0
  57. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/_response.py +0 -0
  58. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/_streaming.py +0 -0
  59. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/_utils/_logs.py +0 -0
  60. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/_utils/_proxy.py +0 -0
  61. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/_utils/_reflection.py +0 -0
  62. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/_utils/_resources_proxy.py +0 -0
  63. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/_utils/_streams.py +0 -0
  64. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/_utils/_sync.py +0 -0
  65. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/lib/.keep +0 -0
  66. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/py.typed +0 -0
  67. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/types/chat_completion_message.py +0 -0
  68. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/types/chat_completion_message_param.py +0 -0
  69. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/types/chat_completion_response.py +0 -0
  70. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/types/content_filter_results.py +0 -0
  71. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/types/embedding_create_embedding_params.py +0 -0
  72. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/types/embedding_response.py +0 -0
  73. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/types/function_call.py +0 -0
  74. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/types/function_call_param.py +0 -0
  75. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/types/function_definition_param.py +0 -0
  76. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/types/health_response.py +0 -0
  77. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/types/model.py +0 -0
  78. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/types/model_list.py +0 -0
  79. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/types/shared/__init__.py +0 -0
  80. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/types/shared/openai_completion_tokens_details.py +0 -0
  81. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/types/shared/openai_prompt_tokens_details.py +0 -0
  82. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/types/shared/openai_usage.py +0 -0
  83. {relaxai-0.2.1 → relaxai-0.3.0}/src/relaxai/types/stream_options_param.py +0 -0
  84. {relaxai-0.2.1 → relaxai-0.3.0}/tests/__init__.py +0 -0
  85. {relaxai-0.2.1 → relaxai-0.3.0}/tests/api_resources/__init__.py +0 -0
  86. {relaxai-0.2.1 → relaxai-0.3.0}/tests/api_resources/test_chat.py +0 -0
  87. {relaxai-0.2.1 → relaxai-0.3.0}/tests/api_resources/test_client.py +0 -0
  88. {relaxai-0.2.1 → relaxai-0.3.0}/tests/api_resources/test_embeddings.py +0 -0
  89. {relaxai-0.2.1 → relaxai-0.3.0}/tests/api_resources/test_models.py +0 -0
  90. {relaxai-0.2.1 → relaxai-0.3.0}/tests/conftest.py +0 -0
  91. {relaxai-0.2.1 → relaxai-0.3.0}/tests/sample_file.txt +0 -0
  92. {relaxai-0.2.1 → relaxai-0.3.0}/tests/test_deepcopy.py +0 -0
  93. {relaxai-0.2.1 → relaxai-0.3.0}/tests/test_extract_files.py +0 -0
  94. {relaxai-0.2.1 → relaxai-0.3.0}/tests/test_files.py +0 -0
  95. {relaxai-0.2.1 → relaxai-0.3.0}/tests/test_qs.py +0 -0
  96. {relaxai-0.2.1 → relaxai-0.3.0}/tests/test_required_args.py +0 -0
  97. {relaxai-0.2.1 → relaxai-0.3.0}/tests/test_response.py +0 -0
  98. {relaxai-0.2.1 → relaxai-0.3.0}/tests/test_streaming.py +0 -0
  99. {relaxai-0.2.1 → relaxai-0.3.0}/tests/test_utils/test_proxy.py +0 -0
  100. {relaxai-0.2.1 → relaxai-0.3.0}/tests/test_utils/test_typing.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.3.0"
3
+ }
@@ -1,5 +1,29 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.0 (2025-10-15)
4
+
5
+ Full Changelog: [v0.2.1...v0.3.0](https://github.com/relax-ai/python-sdk/compare/v0.2.1...v0.3.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** manual updates ([fb55fbb](https://github.com/relax-ai/python-sdk/commit/fb55fbbad43d0e9e451cd478fdc245c13ac902d5))
10
+ * **api:** manual updates ([01862ef](https://github.com/relax-ai/python-sdk/commit/01862efe3dbab403d0b375368dfc1abe7da8c207))
11
+ * **api:** manual updates ([a87f00a](https://github.com/relax-ai/python-sdk/commit/a87f00af92db246737d129211b1288624cc968fd))
12
+ * improve future compat with pydantic v3 ([e6f68a5](https://github.com/relax-ai/python-sdk/commit/e6f68a526ac50b2a439770d778e1f7bf024614e2))
13
+ * **types:** replace List[str] with SequenceNotStr in params ([151f372](https://github.com/relax-ai/python-sdk/commit/151f372fe9393e0a4d6e276a0590608730c7db31))
14
+
15
+
16
+ ### Chores
17
+
18
+ * do not install brew dependencies in ./scripts/bootstrap by default ([4e5f72f](https://github.com/relax-ai/python-sdk/commit/4e5f72f42aa9931746d4883dc8fdcc0c458d5696))
19
+ * **internal:** add Sequence related utils ([d2984db](https://github.com/relax-ai/python-sdk/commit/d2984db3cfd795659892617f88bc36e77f69d379))
20
+ * **internal:** detect missing future annotations with ruff ([826ae50](https://github.com/relax-ai/python-sdk/commit/826ae504f63ac7182e4420547b83003e7d7edc34))
21
+ * **internal:** move mypy configurations to `pyproject.toml` file ([466a932](https://github.com/relax-ai/python-sdk/commit/466a932633583de1e75b3d2574fd189c4997637e))
22
+ * **internal:** update pydantic dependency ([453c07f](https://github.com/relax-ai/python-sdk/commit/453c07f92fa1f2a54c0d80b282d3404199d8e455))
23
+ * **internal:** update pyright exclude list ([b38f5fa](https://github.com/relax-ai/python-sdk/commit/b38f5fafdf9a2ae1ce03e5750472582000289bc8))
24
+ * **tests:** simplify `get_platform` test ([9c5443b](https://github.com/relax-ai/python-sdk/commit/9c5443be195c8eb14a40c211fe4ce25c4a701113))
25
+ * **types:** change optional parameter type from NotGiven to Omit ([9fc9e2f](https://github.com/relax-ai/python-sdk/commit/9fc9e2fa695f30d157d2bae209b41ae2204076bb))
26
+
3
27
  ## 0.2.1 (2025-08-27)
4
28
 
5
29
  Full Changelog: [v0.2.0...v0.2.1](https://github.com/relax-ai/python-sdk/compare/v0.2.0...v0.2.1)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: relaxai
3
- Version: 0.2.1
3
+ Version: 0.3.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
@@ -60,3 +60,27 @@ Methods:
60
60
 
61
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
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>
63
+
64
+ # Tools
65
+
66
+ Types:
67
+
68
+ ```python
69
+ from relaxai.types import ToolRequest, ToolResponse
70
+ ```
71
+
72
+ Methods:
73
+
74
+ - <code title="post /v1/tools/code">client.tools.<a href="./src/relaxai/resources/tools.py">execute_code</a>(\*\*<a href="src/relaxai/types/tool_execute_code_params.py">params</a>) -> None</code>
75
+
76
+ # DeepResearch
77
+
78
+ Types:
79
+
80
+ ```python
81
+ from relaxai.types import DeepresearchRequest, DeepresearchResponse
82
+ ```
83
+
84
+ Methods:
85
+
86
+ - <code title="post /v1/deep-research">client.deep_research.<a href="./src/relaxai/resources/deep_research.py">create</a>(\*\*<a href="src/relaxai/types/deep_research_create_params.py">params</a>) -> None</code>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "relaxai"
3
- version = "0.2.1"
3
+ version = "0.3.0"
4
4
  description = "The official Python library for the relaxai API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -56,7 +56,6 @@ dev-dependencies = [
56
56
  "dirty-equals>=0.6.0",
57
57
  "importlib-metadata>=6.7.0",
58
58
  "rich>=13.7.1",
59
- "nest_asyncio==1.6.0",
60
59
  "pytest-xdist>=3.6.1",
61
60
  ]
62
61
 
@@ -148,6 +147,7 @@ exclude = [
148
147
  "_dev",
149
148
  ".venv",
150
149
  ".nox",
150
+ ".git",
151
151
  ]
152
152
 
153
153
  reportImplicitOverride = true
@@ -156,6 +156,58 @@ reportOverlappingOverload = false
156
156
  reportImportCycles = false
157
157
  reportPrivateUsage = false
158
158
 
159
+ [tool.mypy]
160
+ pretty = true
161
+ show_error_codes = true
162
+
163
+ # Exclude _files.py because mypy isn't smart enough to apply
164
+ # the correct type narrowing and as this is an internal module
165
+ # it's fine to just use Pyright.
166
+ #
167
+ # We also exclude our `tests` as mypy doesn't always infer
168
+ # types correctly and Pyright will still catch any type errors.
169
+ exclude = ['src/relaxai/_files.py', '_dev/.*.py', 'tests/.*']
170
+
171
+ strict_equality = true
172
+ implicit_reexport = true
173
+ check_untyped_defs = true
174
+ no_implicit_optional = true
175
+
176
+ warn_return_any = true
177
+ warn_unreachable = true
178
+ warn_unused_configs = true
179
+
180
+ # Turn these options off as it could cause conflicts
181
+ # with the Pyright options.
182
+ warn_unused_ignores = false
183
+ warn_redundant_casts = false
184
+
185
+ disallow_any_generics = true
186
+ disallow_untyped_defs = true
187
+ disallow_untyped_calls = true
188
+ disallow_subclassing_any = true
189
+ disallow_incomplete_defs = true
190
+ disallow_untyped_decorators = true
191
+ cache_fine_grained = true
192
+
193
+ # By default, mypy reports an error if you assign a value to the result
194
+ # of a function call that doesn't return anything. We do this in our test
195
+ # cases:
196
+ # ```
197
+ # result = ...
198
+ # assert result is None
199
+ # ```
200
+ # Changing this codegen to make mypy happy would increase complexity
201
+ # and would not be worth it.
202
+ disable_error_code = "func-returns-value,overload-cannot-match"
203
+
204
+ # https://github.com/python/mypy/issues/12162
205
+ [[tool.mypy.overrides]]
206
+ module = "black.files.*"
207
+ ignore_errors = true
208
+ ignore_missing_imports = true
209
+
210
+
159
211
  [tool.ruff]
160
212
  line-length = 120
161
213
  output-format = "grouped"
@@ -172,6 +224,8 @@ select = [
172
224
  "B",
173
225
  # remove unused imports
174
226
  "F401",
227
+ # check for missing future annotations
228
+ "FA102",
175
229
  # bare except statements
176
230
  "E722",
177
231
  # unused arguments
@@ -194,6 +248,8 @@ unfixable = [
194
248
  "T203",
195
249
  ]
196
250
 
251
+ extend-safe-fixes = ["FA102"]
252
+
197
253
  [tool.ruff.lint.flake8-tidy-imports.banned-api]
198
254
  "functools.lru_cache".msg = "This function does not retain type information for the wrapped function's arguments; The `lru_cache` function from `_utils` should be used instead"
199
255
 
@@ -75,7 +75,6 @@ multidict==6.4.4
75
75
  mypy==1.14.1
76
76
  mypy-extensions==1.0.0
77
77
  # via mypy
78
- nest-asyncio==1.6.0
79
78
  nodeenv==1.8.0
80
79
  # via pyright
81
80
  nox==2023.4.22
@@ -89,9 +88,9 @@ pluggy==1.5.0
89
88
  propcache==0.3.1
90
89
  # via aiohttp
91
90
  # via yarl
92
- pydantic==2.10.3
91
+ pydantic==2.11.9
93
92
  # via relaxai
94
- pydantic-core==2.27.1
93
+ pydantic-core==2.33.2
95
94
  # via pydantic
96
95
  pygments==2.18.0
97
96
  # via rich
@@ -127,6 +126,9 @@ typing-extensions==4.12.2
127
126
  # via pydantic-core
128
127
  # via pyright
129
128
  # via relaxai
129
+ # via typing-inspection
130
+ typing-inspection==0.4.1
131
+ # via pydantic
130
132
  virtualenv==20.24.5
131
133
  # via nox
132
134
  yarl==1.20.0
@@ -55,9 +55,9 @@ multidict==6.4.4
55
55
  propcache==0.3.1
56
56
  # via aiohttp
57
57
  # via yarl
58
- pydantic==2.10.3
58
+ pydantic==2.11.9
59
59
  # via relaxai
60
- pydantic-core==2.27.1
60
+ pydantic-core==2.33.2
61
61
  # via pydantic
62
62
  sniffio==1.3.0
63
63
  # via anyio
@@ -68,5 +68,8 @@ typing-extensions==4.12.2
68
68
  # via pydantic
69
69
  # via pydantic-core
70
70
  # via relaxai
71
+ # via typing-inspection
72
+ typing-inspection==0.4.1
73
+ # via pydantic
71
74
  yarl==1.20.0
72
75
  # via aiohttp
@@ -3,7 +3,7 @@
3
3
  import typing as _t
4
4
 
5
5
  from . import types
6
- from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes
6
+ from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes, omit, not_given
7
7
  from ._utils import file_from_path
8
8
  from ._client import Client, Stream, Relaxai, Timeout, Transport, AsyncClient, AsyncStream, AsyncRelaxai, RequestOptions
9
9
  from ._models import BaseModel
@@ -38,7 +38,9 @@ __all__ = [
38
38
  "ProxiesTypes",
39
39
  "NotGiven",
40
40
  "NOT_GIVEN",
41
+ "not_given",
41
42
  "Omit",
43
+ "omit",
42
44
  "RelaxaiError",
43
45
  "APIError",
44
46
  "APIStatusError",
@@ -42,7 +42,6 @@ from . import _exceptions
42
42
  from ._qs import Querystring
43
43
  from ._files import to_httpx_files, async_to_httpx_files
44
44
  from ._types import (
45
- NOT_GIVEN,
46
45
  Body,
47
46
  Omit,
48
47
  Query,
@@ -57,9 +56,10 @@ from ._types import (
57
56
  RequestOptions,
58
57
  HttpxRequestFiles,
59
58
  ModelBuilderProtocol,
59
+ not_given,
60
60
  )
61
61
  from ._utils import is_dict, is_list, asyncify, is_given, lru_cache, is_mapping
62
- from ._compat import PYDANTIC_V2, model_copy, model_dump
62
+ from ._compat import PYDANTIC_V1, model_copy, model_dump
63
63
  from ._models import GenericModel, FinalRequestOptions, validate_type, construct_type
64
64
  from ._response import (
65
65
  APIResponse,
@@ -145,9 +145,9 @@ class PageInfo:
145
145
  def __init__(
146
146
  self,
147
147
  *,
148
- url: URL | NotGiven = NOT_GIVEN,
149
- json: Body | NotGiven = NOT_GIVEN,
150
- params: Query | NotGiven = NOT_GIVEN,
148
+ url: URL | NotGiven = not_given,
149
+ json: Body | NotGiven = not_given,
150
+ params: Query | NotGiven = not_given,
151
151
  ) -> None:
152
152
  self.url = url
153
153
  self.json = json
@@ -232,7 +232,7 @@ class BaseSyncPage(BasePage[_T], Generic[_T]):
232
232
  model: Type[_T],
233
233
  options: FinalRequestOptions,
234
234
  ) -> None:
235
- if PYDANTIC_V2 and getattr(self, "__pydantic_private__", None) is None:
235
+ if (not PYDANTIC_V1) and getattr(self, "__pydantic_private__", None) is None:
236
236
  self.__pydantic_private__ = {}
237
237
 
238
238
  self._model = model
@@ -320,7 +320,7 @@ class BaseAsyncPage(BasePage[_T], Generic[_T]):
320
320
  client: AsyncAPIClient,
321
321
  options: FinalRequestOptions,
322
322
  ) -> None:
323
- if PYDANTIC_V2 and getattr(self, "__pydantic_private__", None) is None:
323
+ if (not PYDANTIC_V1) and getattr(self, "__pydantic_private__", None) is None:
324
324
  self.__pydantic_private__ = {}
325
325
 
326
326
  self._model = model
@@ -595,7 +595,7 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
595
595
  # we internally support defining a temporary header to override the
596
596
  # default `cast_to` type for use with `.with_raw_response` and `.with_streaming_response`
597
597
  # see _response.py for implementation details
598
- override_cast_to = headers.pop(OVERRIDE_CAST_TO_HEADER, NOT_GIVEN)
598
+ override_cast_to = headers.pop(OVERRIDE_CAST_TO_HEADER, not_given)
599
599
  if is_given(override_cast_to):
600
600
  options.headers = headers
601
601
  return cast(Type[ResponseT], override_cast_to)
@@ -825,7 +825,7 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
825
825
  version: str,
826
826
  base_url: str | URL,
827
827
  max_retries: int = DEFAULT_MAX_RETRIES,
828
- timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
828
+ timeout: float | Timeout | None | NotGiven = not_given,
829
829
  http_client: httpx.Client | None = None,
830
830
  custom_headers: Mapping[str, str] | None = None,
831
831
  custom_query: Mapping[str, object] | None = None,
@@ -1356,7 +1356,7 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
1356
1356
  base_url: str | URL,
1357
1357
  _strict_response_validation: bool,
1358
1358
  max_retries: int = DEFAULT_MAX_RETRIES,
1359
- timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
1359
+ timeout: float | Timeout | None | NotGiven = not_given,
1360
1360
  http_client: httpx.AsyncClient | None = None,
1361
1361
  custom_headers: Mapping[str, str] | None = None,
1362
1362
  custom_query: Mapping[str, object] | None = None,
@@ -1818,8 +1818,8 @@ def make_request_options(
1818
1818
  extra_query: Query | None = None,
1819
1819
  extra_body: Body | None = None,
1820
1820
  idempotency_key: str | None = None,
1821
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1822
- post_parser: PostParser | NotGiven = NOT_GIVEN,
1821
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
1822
+ post_parser: PostParser | NotGiven = not_given,
1823
1823
  ) -> RequestOptions:
1824
1824
  """Create a dict of type RequestOptions without keys of NotGiven values."""
1825
1825
  options: RequestOptions = {}
@@ -3,7 +3,7 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  import os
6
- from typing import Any, Union, Mapping
6
+ from typing import Any, Mapping
7
7
  from typing_extensions import Self, override
8
8
 
9
9
  import httpx
@@ -11,7 +11,6 @@ import httpx
11
11
  from . import _exceptions
12
12
  from ._qs import Querystring
13
13
  from ._types import (
14
- NOT_GIVEN,
15
14
  Body,
16
15
  Omit,
17
16
  Query,
@@ -21,6 +20,7 @@ from ._types import (
21
20
  Transport,
22
21
  ProxiesTypes,
23
22
  RequestOptions,
23
+ not_given,
24
24
  )
25
25
  from ._utils import is_given, get_async_library
26
26
  from ._version import __version__
@@ -30,7 +30,7 @@ from ._response import (
30
30
  async_to_raw_response_wrapper,
31
31
  async_to_streamed_response_wrapper,
32
32
  )
33
- from .resources import chat, models, embeddings
33
+ from .resources import chat, tools, models, embeddings, deep_research
34
34
  from ._streaming import Stream as Stream, AsyncStream as AsyncStream
35
35
  from ._exceptions import RelaxaiError, APIStatusError
36
36
  from ._base_client import (
@@ -47,6 +47,8 @@ class Relaxai(SyncAPIClient):
47
47
  chat: chat.ChatResource
48
48
  embeddings: embeddings.EmbeddingsResource
49
49
  models: models.ModelsResource
50
+ tools: tools.ToolsResource
51
+ deep_research: deep_research.DeepResearchResource
50
52
  with_raw_response: RelaxaiWithRawResponse
51
53
  with_streaming_response: RelaxaiWithStreamedResponse
52
54
 
@@ -58,7 +60,7 @@ class Relaxai(SyncAPIClient):
58
60
  *,
59
61
  api_key: str | None = None,
60
62
  base_url: str | httpx.URL | None = None,
61
- timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN,
63
+ timeout: float | Timeout | None | NotGiven = not_given,
62
64
  max_retries: int = DEFAULT_MAX_RETRIES,
63
65
  default_headers: Mapping[str, str] | None = None,
64
66
  default_query: Mapping[str, object] | None = None,
@@ -107,6 +109,8 @@ class Relaxai(SyncAPIClient):
107
109
  self.chat = chat.ChatResource(self)
108
110
  self.embeddings = embeddings.EmbeddingsResource(self)
109
111
  self.models = models.ModelsResource(self)
112
+ self.tools = tools.ToolsResource(self)
113
+ self.deep_research = deep_research.DeepResearchResource(self)
110
114
  self.with_raw_response = RelaxaiWithRawResponse(self)
111
115
  self.with_streaming_response = RelaxaiWithStreamedResponse(self)
112
116
 
@@ -135,9 +139,9 @@ class Relaxai(SyncAPIClient):
135
139
  *,
136
140
  api_key: str | None = None,
137
141
  base_url: str | httpx.URL | None = None,
138
- timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
142
+ timeout: float | Timeout | None | NotGiven = not_given,
139
143
  http_client: httpx.Client | None = None,
140
- max_retries: int | NotGiven = NOT_GIVEN,
144
+ max_retries: int | NotGiven = not_given,
141
145
  default_headers: Mapping[str, str] | None = None,
142
146
  set_default_headers: Mapping[str, str] | None = None,
143
147
  default_query: Mapping[str, object] | None = None,
@@ -189,7 +193,7 @@ class Relaxai(SyncAPIClient):
189
193
  extra_headers: Headers | None = None,
190
194
  extra_query: Query | None = None,
191
195
  extra_body: Body | None = None,
192
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
196
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
193
197
  ) -> str:
194
198
  """Check the health of the service."""
195
199
  return self.get(
@@ -238,6 +242,8 @@ class AsyncRelaxai(AsyncAPIClient):
238
242
  chat: chat.AsyncChatResource
239
243
  embeddings: embeddings.AsyncEmbeddingsResource
240
244
  models: models.AsyncModelsResource
245
+ tools: tools.AsyncToolsResource
246
+ deep_research: deep_research.AsyncDeepResearchResource
241
247
  with_raw_response: AsyncRelaxaiWithRawResponse
242
248
  with_streaming_response: AsyncRelaxaiWithStreamedResponse
243
249
 
@@ -249,7 +255,7 @@ class AsyncRelaxai(AsyncAPIClient):
249
255
  *,
250
256
  api_key: str | None = None,
251
257
  base_url: str | httpx.URL | None = None,
252
- timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN,
258
+ timeout: float | Timeout | None | NotGiven = not_given,
253
259
  max_retries: int = DEFAULT_MAX_RETRIES,
254
260
  default_headers: Mapping[str, str] | None = None,
255
261
  default_query: Mapping[str, object] | None = None,
@@ -298,6 +304,8 @@ class AsyncRelaxai(AsyncAPIClient):
298
304
  self.chat = chat.AsyncChatResource(self)
299
305
  self.embeddings = embeddings.AsyncEmbeddingsResource(self)
300
306
  self.models = models.AsyncModelsResource(self)
307
+ self.tools = tools.AsyncToolsResource(self)
308
+ self.deep_research = deep_research.AsyncDeepResearchResource(self)
301
309
  self.with_raw_response = AsyncRelaxaiWithRawResponse(self)
302
310
  self.with_streaming_response = AsyncRelaxaiWithStreamedResponse(self)
303
311
 
@@ -326,9 +334,9 @@ class AsyncRelaxai(AsyncAPIClient):
326
334
  *,
327
335
  api_key: str | None = None,
328
336
  base_url: str | httpx.URL | None = None,
329
- timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
337
+ timeout: float | Timeout | None | NotGiven = not_given,
330
338
  http_client: httpx.AsyncClient | None = None,
331
- max_retries: int | NotGiven = NOT_GIVEN,
339
+ max_retries: int | NotGiven = not_given,
332
340
  default_headers: Mapping[str, str] | None = None,
333
341
  set_default_headers: Mapping[str, str] | None = None,
334
342
  default_query: Mapping[str, object] | None = None,
@@ -380,7 +388,7 @@ class AsyncRelaxai(AsyncAPIClient):
380
388
  extra_headers: Headers | None = None,
381
389
  extra_query: Query | None = None,
382
390
  extra_body: Body | None = None,
383
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
391
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
384
392
  ) -> str:
385
393
  """Check the health of the service."""
386
394
  return await self.get(
@@ -430,6 +438,8 @@ class RelaxaiWithRawResponse:
430
438
  self.chat = chat.ChatResourceWithRawResponse(client.chat)
431
439
  self.embeddings = embeddings.EmbeddingsResourceWithRawResponse(client.embeddings)
432
440
  self.models = models.ModelsResourceWithRawResponse(client.models)
441
+ self.tools = tools.ToolsResourceWithRawResponse(client.tools)
442
+ self.deep_research = deep_research.DeepResearchResourceWithRawResponse(client.deep_research)
433
443
 
434
444
  self.health = to_raw_response_wrapper(
435
445
  client.health,
@@ -441,6 +451,8 @@ class AsyncRelaxaiWithRawResponse:
441
451
  self.chat = chat.AsyncChatResourceWithRawResponse(client.chat)
442
452
  self.embeddings = embeddings.AsyncEmbeddingsResourceWithRawResponse(client.embeddings)
443
453
  self.models = models.AsyncModelsResourceWithRawResponse(client.models)
454
+ self.tools = tools.AsyncToolsResourceWithRawResponse(client.tools)
455
+ self.deep_research = deep_research.AsyncDeepResearchResourceWithRawResponse(client.deep_research)
444
456
 
445
457
  self.health = async_to_raw_response_wrapper(
446
458
  client.health,
@@ -452,6 +464,8 @@ class RelaxaiWithStreamedResponse:
452
464
  self.chat = chat.ChatResourceWithStreamingResponse(client.chat)
453
465
  self.embeddings = embeddings.EmbeddingsResourceWithStreamingResponse(client.embeddings)
454
466
  self.models = models.ModelsResourceWithStreamingResponse(client.models)
467
+ self.tools = tools.ToolsResourceWithStreamingResponse(client.tools)
468
+ self.deep_research = deep_research.DeepResearchResourceWithStreamingResponse(client.deep_research)
455
469
 
456
470
  self.health = to_streamed_response_wrapper(
457
471
  client.health,
@@ -463,6 +477,8 @@ class AsyncRelaxaiWithStreamedResponse:
463
477
  self.chat = chat.AsyncChatResourceWithStreamingResponse(client.chat)
464
478
  self.embeddings = embeddings.AsyncEmbeddingsResourceWithStreamingResponse(client.embeddings)
465
479
  self.models = models.AsyncModelsResourceWithStreamingResponse(client.models)
480
+ self.tools = tools.AsyncToolsResourceWithStreamingResponse(client.tools)
481
+ self.deep_research = deep_research.AsyncDeepResearchResourceWithStreamingResponse(client.deep_research)
466
482
 
467
483
  self.health = async_to_streamed_response_wrapper(
468
484
  client.health,