relaxai 0.5.1__py3-none-any.whl → 0.5.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of relaxai might be problematic. Click here for more details.

relaxai/_version.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "relaxai"
4
- __version__ = "0.5.1" # x-release-please-version
4
+ __version__ = "0.5.2" # x-release-please-version
@@ -7,7 +7,7 @@ from typing import Iterable
7
7
  import httpx
8
8
 
9
9
  from ..types import deep_research_create_params
10
- from .._types import Body, Omit, Query, Headers, NoneType, NotGiven, SequenceNotStr, omit, not_given
10
+ from .._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
11
11
  from .._utils import maybe_transform, async_maybe_transform
12
12
  from .._compat import cached_property
13
13
  from .._resource import SyncAPIResource, AsyncAPIResource
@@ -19,6 +19,7 @@ from .._response import (
19
19
  )
20
20
  from .._base_client import make_request_options
21
21
  from ..types.stream_options_param import StreamOptionsParam
22
+ from ..types.deepresearch_response import DeepresearchResponse
22
23
  from ..types.chat_completion_message_param import ChatCompletionMessageParam
23
24
 
24
25
  __all__ = ["DeepResearchResource", "AsyncDeepResearchResource"]
@@ -64,7 +65,7 @@ class DeepResearchResource(SyncAPIResource):
64
65
  extra_query: Query | None = None,
65
66
  extra_body: Body | None = None,
66
67
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
67
- ) -> None:
68
+ ) -> DeepresearchResponse:
68
69
  """
69
70
  Performs deep research on a given topic and returns a detailed report.
70
71
 
@@ -77,7 +78,6 @@ class DeepResearchResource(SyncAPIResource):
77
78
 
78
79
  timeout: Override the client-level default timeout for this request, in seconds
79
80
  """
80
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
81
81
  return self._post(
82
82
  "/v1/deep-research",
83
83
  body=maybe_transform(
@@ -99,7 +99,7 @@ class DeepResearchResource(SyncAPIResource):
99
99
  options=make_request_options(
100
100
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
101
101
  ),
102
- cast_to=NoneType,
102
+ cast_to=DeepresearchResponse,
103
103
  )
104
104
 
105
105
 
@@ -143,7 +143,7 @@ class AsyncDeepResearchResource(AsyncAPIResource):
143
143
  extra_query: Query | None = None,
144
144
  extra_body: Body | None = None,
145
145
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
146
- ) -> None:
146
+ ) -> DeepresearchResponse:
147
147
  """
148
148
  Performs deep research on a given topic and returns a detailed report.
149
149
 
@@ -156,7 +156,6 @@ class AsyncDeepResearchResource(AsyncAPIResource):
156
156
 
157
157
  timeout: Override the client-level default timeout for this request, in seconds
158
158
  """
159
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
160
159
  return await self._post(
161
160
  "/v1/deep-research",
162
161
  body=await async_maybe_transform(
@@ -178,7 +177,7 @@ class AsyncDeepResearchResource(AsyncAPIResource):
178
177
  options=make_request_options(
179
178
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
180
179
  ),
181
- cast_to=NoneType,
180
+ cast_to=DeepresearchResponse,
182
181
  )
183
182
 
184
183
 
@@ -5,7 +5,7 @@ from __future__ import annotations
5
5
  import httpx
6
6
 
7
7
  from ..types import tool_execute_code_params
8
- from .._types import Body, Omit, Query, Headers, NoneType, NotGiven, SequenceNotStr, omit, not_given
8
+ from .._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
9
9
  from .._utils import maybe_transform, async_maybe_transform
10
10
  from .._compat import cached_property
11
11
  from .._resource import SyncAPIResource, AsyncAPIResource
@@ -16,6 +16,7 @@ from .._response import (
16
16
  async_to_streamed_response_wrapper,
17
17
  )
18
18
  from .._base_client import make_request_options
19
+ from ..types.tool_response import ToolResponse
19
20
 
20
21
  __all__ = ["ToolsResource", "AsyncToolsResource"]
21
22
 
@@ -52,7 +53,7 @@ class ToolsResource(SyncAPIResource):
52
53
  extra_query: Query | None = None,
53
54
  extra_body: Body | None = None,
54
55
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
55
- ) -> None:
56
+ ) -> ToolResponse:
56
57
  """
57
58
  Run the given code in a secure environment and return the output.
58
59
 
@@ -65,7 +66,6 @@ class ToolsResource(SyncAPIResource):
65
66
 
66
67
  timeout: Override the client-level default timeout for this request, in seconds
67
68
  """
68
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
69
69
  return self._post(
70
70
  "/v1/tools/code",
71
71
  body=maybe_transform(
@@ -79,7 +79,7 @@ class ToolsResource(SyncAPIResource):
79
79
  options=make_request_options(
80
80
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
81
81
  ),
82
- cast_to=NoneType,
82
+ cast_to=ToolResponse,
83
83
  )
84
84
 
85
85
 
@@ -115,7 +115,7 @@ class AsyncToolsResource(AsyncAPIResource):
115
115
  extra_query: Query | None = None,
116
116
  extra_body: Body | None = None,
117
117
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
118
- ) -> None:
118
+ ) -> ToolResponse:
119
119
  """
120
120
  Run the given code in a secure environment and return the output.
121
121
 
@@ -128,7 +128,6 @@ class AsyncToolsResource(AsyncAPIResource):
128
128
 
129
129
  timeout: Override the client-level default timeout for this request, in seconds
130
130
  """
131
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
132
131
  return await self._post(
133
132
  "/v1/tools/code",
134
133
  body=await async_maybe_transform(
@@ -142,7 +141,7 @@ class AsyncToolsResource(AsyncAPIResource):
142
141
  options=make_request_options(
143
142
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
144
143
  ),
145
- cast_to=NoneType,
144
+ cast_to=ToolResponse,
146
145
  )
147
146
 
148
147
 
relaxai/types/__init__.py CHANGED
@@ -10,10 +10,12 @@ from .shared import (
10
10
  )
11
11
  from .model_list import ModelList as ModelList
12
12
  from .function_call import FunctionCall as FunctionCall
13
+ from .tool_response import ToolResponse as ToolResponse
13
14
  from .health_response import HealthResponse as HealthResponse
14
15
  from .embedding_response import EmbeddingResponse as EmbeddingResponse
15
16
  from .function_call_param import FunctionCallParam as FunctionCallParam
16
17
  from .stream_options_param import StreamOptionsParam as StreamOptionsParam
18
+ from .deepresearch_response import DeepresearchResponse as DeepresearchResponse
17
19
  from .content_filter_results import ContentFilterResults as ContentFilterResults
18
20
  from .chat_completion_message import ChatCompletionMessage as ChatCompletionMessage
19
21
  from .chat_completion_response import ChatCompletionResponse as ChatCompletionResponse
@@ -0,0 +1,115 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List, Optional
4
+
5
+ from .._models import BaseModel
6
+ from .function_call import FunctionCall
7
+ from .shared.openai_usage import OpenAIUsage
8
+
9
+ __all__ = [
10
+ "DeepresearchResponse",
11
+ "Choice",
12
+ "ChoiceMessage",
13
+ "ChoiceMessageAnnotation",
14
+ "ChoiceMessageAnnotationURLCitation",
15
+ "ChoiceMessageToolCall",
16
+ "ChoiceLogprobs",
17
+ "ChoiceLogprobsContent",
18
+ "ChoiceLogprobsContentTopLogprob",
19
+ ]
20
+
21
+
22
+ class ChoiceMessageAnnotationURLCitation(BaseModel):
23
+ end_index: int
24
+
25
+ start_index: int
26
+
27
+ title: str
28
+
29
+ url: str
30
+
31
+
32
+ class ChoiceMessageAnnotation(BaseModel):
33
+ type: str
34
+
35
+ url_citation: Optional[ChoiceMessageAnnotationURLCitation] = None
36
+
37
+
38
+ class ChoiceMessageToolCall(BaseModel):
39
+ function: FunctionCall
40
+
41
+ type: str
42
+
43
+ id: Optional[str] = None
44
+
45
+ index: Optional[int] = None
46
+
47
+
48
+ class ChoiceMessage(BaseModel):
49
+ role: str
50
+
51
+ annotations: Optional[List[ChoiceMessageAnnotation]] = None
52
+
53
+ content: Optional[str] = None
54
+
55
+ function_call: Optional[FunctionCall] = None
56
+
57
+ name: Optional[str] = None
58
+
59
+ reasoning_content: Optional[str] = None
60
+
61
+ refusal: Optional[str] = None
62
+
63
+ tool_call_id: Optional[str] = None
64
+
65
+ tool_calls: Optional[List[ChoiceMessageToolCall]] = None
66
+
67
+
68
+ class ChoiceLogprobsContentTopLogprob(BaseModel):
69
+ token: str
70
+
71
+ logprob: float
72
+
73
+ bytes: Optional[str] = None
74
+
75
+
76
+ class ChoiceLogprobsContent(BaseModel):
77
+ token: str
78
+
79
+ logprob: float
80
+
81
+ top_logprobs: List[ChoiceLogprobsContentTopLogprob]
82
+
83
+ bytes: Optional[str] = None
84
+
85
+
86
+ class ChoiceLogprobs(BaseModel):
87
+ content: List[ChoiceLogprobsContent]
88
+
89
+
90
+ class Choice(BaseModel):
91
+ finish_reason: str
92
+
93
+ index: int
94
+
95
+ message: ChoiceMessage
96
+
97
+ logprobs: Optional[ChoiceLogprobs] = None
98
+
99
+
100
+ class DeepresearchResponse(BaseModel):
101
+ id: str
102
+
103
+ choices: List[Choice]
104
+
105
+ created: int
106
+
107
+ model: str
108
+
109
+ object: str
110
+
111
+ system_fingerprint: str
112
+
113
+ usage: OpenAIUsage
114
+
115
+ service_tier: Optional[str] = None
@@ -0,0 +1,33 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List, Optional
4
+
5
+ from .._models import BaseModel
6
+
7
+ __all__ = ["ToolResponse", "Plot"]
8
+
9
+
10
+ class Plot(BaseModel):
11
+ content_base64: str
12
+
13
+ filename: str
14
+
15
+ format: str
16
+
17
+
18
+ class ToolResponse(BaseModel):
19
+ execution_time: float
20
+
21
+ exit_code: int
22
+
23
+ security_checked: bool
24
+
25
+ stderr: str
26
+
27
+ stdout: str
28
+
29
+ success: bool
30
+
31
+ plots: Optional[List[Plot]] = None
32
+
33
+ violations: Optional[List[str]] = None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: relaxai
3
- Version: 0.5.1
3
+ Version: 0.5.2
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
@@ -11,7 +11,7 @@ relaxai/_resource.py,sha256=v7qxjafEaUaEfecj54WhuhW2hupVzM8Os0EIHVRmbkc,1106
11
11
  relaxai/_response.py,sha256=URFVS4ivxSoLsvosTN0Rc3f5vbBBb0DIB4Eh2XPGa_Q,28794
12
12
  relaxai/_streaming.py,sha256=Nr4O_q1hh35alNVqo46KKf9ZTbRp-IoXjGFCCNJC1fA,10104
13
13
  relaxai/_types.py,sha256=v5coMcqP3kIeECx9ks-aaxiodh2l0UEKv6UI4creii4,7237
14
- relaxai/_version.py,sha256=1hJwi-xdzLkl0tFMXzd2ti9Q6rWWU_nsJ2aShj75jbg,159
14
+ relaxai/_version.py,sha256=svd-bh0pKXXETQobMzg46j5yTdeXt2xCe_J206pc2Tg,159
15
15
  relaxai/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  relaxai/_utils/__init__.py,sha256=7fch0GT9zpNnErbciSpUNa-SjTxxjY6kxHxKMOM4AGs,2305
17
17
  relaxai/_utils/_compat.py,sha256=D8gtAvjJQrDWt9upS0XaG9Rr5l1QhiAx_I_1utT_tt0,1195
@@ -28,17 +28,18 @@ relaxai/_utils/_utils.py,sha256=0dDqauUbVZEXV0NVl7Bwu904Wwo5eyFCZpQThhFNhyA,1225
28
28
  relaxai/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
29
29
  relaxai/resources/__init__.py,sha256=PN55gCB7h9TokDnEC4NT3jPj17828geZDkMh6wv9uKE,2444
30
30
  relaxai/resources/chat.py,sha256=yeDuAAJk3dW1ysw7nvO2euzPzcjeHAxT-Y-9BI5l40Y,13053
31
- relaxai/resources/deep_research.py,sha256=n7dzP9efBLKThZOW9yF4cCF2_qOGc3IzcwjYG21th3g,8499
31
+ relaxai/resources/deep_research.py,sha256=87098Z1XBBd52foI-31x7pYU09BenVD0VoM5lIlRyc8,8474
32
32
  relaxai/resources/embeddings.py,sha256=BpG5jmG2O-hVnRawd834JQLvKeC7rzvfaOAyxXapGbg,6998
33
33
  relaxai/resources/models.py,sha256=Zkp7vxtB5xp2vDHOsWB2XQhcj-52AAusvFQAiS2aVWE,7856
34
- relaxai/resources/tools.py,sha256=wqz_QBd3rI0jbPL8XhVwSP3hEIJzmT9-lFv8Kgr3eO4,6484
35
- relaxai/types/__init__.py,sha256=nnoOEpJGoxrxdR1FDMiAkXyhEVI0c8H003F8ppCecR4,1557
34
+ relaxai/resources/tools.py,sha256=n6iE8e-KtqGJ-YaiRHdYUTlVzi9AOc4vd9ioP7jE5go,6411
35
+ relaxai/types/__init__.py,sha256=TFMRnoRboP2fVVpQpbKUrzgHbjd1G0JKJULvEyR_s7o,1693
36
36
  relaxai/types/chat_completion_message.py,sha256=t-dKQxWfqUr8UsX5Fs3NpN9YfRJ5oJvozfZtWn3JF8M,1544
37
37
  relaxai/types/chat_completion_message_param.py,sha256=X4oAp6FQwue-SEibwr3KcxhJNQZiaiBhz2Q9mMHY5_M,1485
38
38
  relaxai/types/chat_completion_response.py,sha256=II4PjVfW60aa9aX5mApsseDerQVieTlt9BLim2fY_RE,1564
39
39
  relaxai/types/chat_create_completion_params.py,sha256=q8c31zNDMfjYr5Ai0k-EfDXqRTfXyLGbf2DiuNgZtN8,3055
40
40
  relaxai/types/content_filter_results.py,sha256=vOaHu4jdGKVX4vqqCZohTYDsKDXlvfh57Ozb_95-c2U,999
41
41
  relaxai/types/deep_research_create_params.py,sha256=T0X5-8ck0_no5fHWQGM2GoSjJ1ntYDHlBXl_odGFK9Y,1239
42
+ relaxai/types/deepresearch_response.py,sha256=QO2wOxFDzd5eVTdp9scVEwG8-g7vYIPBg4g_dSj-5Ww,2051
42
43
  relaxai/types/embedding_create_embedding_params.py,sha256=76aUOwC4LMjfMesJTjrjUh_FzVkDcRe_2rRzMTcdaag,399
43
44
  relaxai/types/embedding_response.py,sha256=N7SS9DhAbG5kEWF6RxYc8gl_rUvY9c1mSoT8v4vwahA,549
44
45
  relaxai/types/function_call.py,sha256=n_agCO6Vrh5YZH1SZ6GWOV4mk2IFPeHJA_WkZrPGPMw,277
@@ -49,11 +50,12 @@ relaxai/types/model.py,sha256=Du9lb9dn846N1fPrKtDsPSLczkqnzxVAJPb8GMqyVJ8,764
49
50
  relaxai/types/model_list.py,sha256=9lvzYRTBYTVudP9_28Ai0lUfc82eXOmz0qZ_rwCzxIU,364
50
51
  relaxai/types/stream_options_param.py,sha256=JEom-Fs3ORSTD86NTan-9ZjlKYfPEvSYXViUhOXPCb0,273
51
52
  relaxai/types/tool_execute_code_params.py,sha256=pHhBZiOQ5e7bYe0kXAfyKld3rpFgERAt1zm2iURWZBc,387
53
+ relaxai/types/tool_response.py,sha256=OMHBB4wq34OMpqWzemRMRanV1oyRy1UcF6prRVrj-HM,519
52
54
  relaxai/types/shared/__init__.py,sha256=rVHWDutDMA_BYQSHahIzfwcaDAwE3zyBvTiPRI1lSFo,346
53
55
  relaxai/types/shared/openai_completion_tokens_details.py,sha256=kjDBsTKvzhw-8UA3t7CQ6qvAo4Lmnup5VEFU2QzBynw,338
54
56
  relaxai/types/shared/openai_prompt_tokens_details.py,sha256=wdPCsobx-VBw3MgfSCY4HXrGnMtw6YXiepKpXw1kZAE,253
55
57
  relaxai/types/shared/openai_usage.py,sha256=W-mht7UXuWne_eFXCBXHpf2HEsjzfXo2jPXOdKNEdbQ,513
56
- relaxai-0.5.1.dist-info/METADATA,sha256=3oTc09bp3bgJOd7ZFF3PGKb-V97-no5rjyDXxXdrK5Y,15304
57
- relaxai-0.5.1.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
58
- relaxai-0.5.1.dist-info/licenses/LICENSE,sha256=B0u5zBqmaNCfIZooH665f2J7yFqMmSjQxZtnJhCuID8,11337
59
- relaxai-0.5.1.dist-info/RECORD,,
58
+ relaxai-0.5.2.dist-info/METADATA,sha256=krJT1itRLyDNqbI_3q2UHk6JcyuZQUWMkS5D8OmCuG4,15304
59
+ relaxai-0.5.2.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
60
+ relaxai-0.5.2.dist-info/licenses/LICENSE,sha256=B0u5zBqmaNCfIZooH665f2J7yFqMmSjQxZtnJhCuID8,11337
61
+ relaxai-0.5.2.dist-info/RECORD,,