vellum-ai 1.0.11__py3-none-any.whl → 1.1.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- vellum/__init__.py +2 -2
- vellum/client/README.md +0 -55
- vellum/client/__init__.py +159 -877
- vellum/client/core/__init__.py +3 -0
- vellum/client/core/client_wrapper.py +2 -2
- vellum/client/core/http_response.py +47 -0
- vellum/client/raw_client.py +1561 -0
- vellum/client/reference.md +22 -696
- vellum/client/resources/__init__.py +0 -2
- vellum/client/resources/ad_hoc/client.py +55 -161
- vellum/client/resources/ad_hoc/raw_client.py +278 -0
- vellum/client/resources/container_images/client.py +62 -172
- vellum/client/resources/container_images/raw_client.py +400 -0
- vellum/client/resources/deployments/client.py +112 -437
- vellum/client/resources/deployments/raw_client.py +995 -0
- vellum/client/resources/document_indexes/client.py +108 -317
- vellum/client/resources/document_indexes/raw_client.py +847 -0
- vellum/client/resources/documents/client.py +88 -285
- vellum/client/resources/documents/raw_client.py +655 -0
- vellum/client/resources/folder_entities/client.py +54 -92
- vellum/client/resources/folder_entities/raw_client.py +277 -0
- vellum/client/resources/metric_definitions/client.py +48 -95
- vellum/client/resources/metric_definitions/raw_client.py +225 -0
- vellum/client/resources/ml_models/client.py +36 -40
- vellum/client/resources/ml_models/raw_client.py +103 -0
- vellum/client/resources/organizations/client.py +34 -39
- vellum/client/resources/organizations/raw_client.py +96 -0
- vellum/client/resources/prompts/client.py +50 -193
- vellum/client/resources/prompts/raw_client.py +346 -0
- vellum/client/resources/sandboxes/client.py +68 -141
- vellum/client/resources/sandboxes/raw_client.py +393 -0
- vellum/client/resources/test_suite_runs/client.py +58 -141
- vellum/client/resources/test_suite_runs/raw_client.py +355 -0
- vellum/client/resources/test_suites/client.py +73 -141
- vellum/client/resources/test_suites/raw_client.py +379 -0
- vellum/client/resources/workflow_deployments/client.py +203 -328
- vellum/client/resources/workflow_deployments/raw_client.py +931 -0
- vellum/client/resources/workflow_executions/client.py +36 -40
- vellum/client/resources/workflow_executions/raw_client.py +97 -0
- vellum/client/resources/workflow_sandboxes/client.py +60 -108
- vellum/client/resources/workflow_sandboxes/raw_client.py +300 -0
- vellum/client/resources/workflows/client.py +68 -133
- vellum/client/resources/workflows/raw_client.py +307 -0
- vellum/client/resources/workspace_secrets/client.py +46 -90
- vellum/client/resources/workspace_secrets/raw_client.py +220 -0
- vellum/client/resources/workspaces/client.py +34 -39
- vellum/client/resources/workspaces/raw_client.py +96 -0
- vellum/client/types/__init__.py +2 -0
- vellum/client/types/api_request_parent_context.py +1 -0
- vellum/client/types/external_parent_context.py +36 -0
- vellum/client/types/node_execution_fulfilled_event.py +1 -0
- vellum/client/types/node_execution_initiated_event.py +1 -0
- vellum/client/types/node_execution_paused_event.py +1 -0
- vellum/client/types/node_execution_rejected_event.py +1 -0
- vellum/client/types/node_execution_resumed_event.py +1 -0
- vellum/client/types/node_execution_span.py +1 -0
- vellum/client/types/node_execution_span_attributes.py +1 -0
- vellum/client/types/node_execution_streaming_event.py +1 -0
- vellum/client/types/node_parent_context.py +1 -0
- vellum/client/types/parent_context.py +2 -0
- vellum/client/types/prompt_deployment_parent_context.py +1 -0
- vellum/client/types/slim_workflow_execution_read.py +1 -0
- vellum/client/types/span_link.py +1 -0
- vellum/client/types/workflow_deployment_event_executions_response.py +1 -0
- vellum/client/types/workflow_deployment_parent_context.py +1 -0
- vellum/client/types/workflow_event_execution_read.py +1 -0
- vellum/client/types/workflow_execution_detail.py +1 -0
- vellum/client/types/workflow_execution_fulfilled_event.py +1 -0
- vellum/client/types/workflow_execution_initiated_event.py +1 -0
- vellum/client/types/workflow_execution_paused_event.py +1 -0
- vellum/client/types/workflow_execution_rejected_event.py +1 -0
- vellum/client/types/workflow_execution_resumed_event.py +1 -0
- vellum/client/types/workflow_execution_snapshotted_event.py +1 -0
- vellum/client/types/workflow_execution_span.py +1 -0
- vellum/client/types/workflow_execution_span_attributes.py +1 -0
- vellum/client/types/workflow_execution_streaming_event.py +1 -0
- vellum/client/types/workflow_parent_context.py +1 -0
- vellum/client/types/workflow_sandbox_parent_context.py +1 -0
- vellum/{resources/release_reviews/__init__.py → core/http_response.py} +1 -1
- vellum/{resources/release_reviews/client.py → raw_client.py} +1 -1
- vellum/resources/ad_hoc/raw_client.py +3 -0
- vellum/resources/container_images/raw_client.py +3 -0
- vellum/resources/deployments/raw_client.py +3 -0
- vellum/resources/document_indexes/raw_client.py +3 -0
- vellum/resources/documents/raw_client.py +3 -0
- vellum/resources/folder_entities/raw_client.py +3 -0
- vellum/resources/metric_definitions/raw_client.py +3 -0
- vellum/resources/ml_models/raw_client.py +3 -0
- vellum/resources/organizations/raw_client.py +3 -0
- vellum/resources/prompts/raw_client.py +3 -0
- vellum/resources/sandboxes/raw_client.py +3 -0
- vellum/resources/test_suite_runs/raw_client.py +3 -0
- vellum/resources/test_suites/raw_client.py +3 -0
- vellum/resources/workflow_deployments/raw_client.py +3 -0
- vellum/resources/workflow_executions/raw_client.py +3 -0
- vellum/resources/workflow_sandboxes/raw_client.py +3 -0
- vellum/resources/workflows/raw_client.py +3 -0
- vellum/resources/workspace_secrets/raw_client.py +3 -0
- vellum/resources/workspaces/raw_client.py +3 -0
- vellum/types/external_parent_context.py +3 -0
- vellum/workflows/emitters/vellum_emitter.py +3 -2
- vellum/workflows/events/types.py +6 -0
- vellum/workflows/nodes/displayable/tests/test_text_prompt_deployment_node.py +5 -15
- vellum/workflows/nodes/displayable/tool_calling_node/node.py +6 -0
- vellum/workflows/nodes/displayable/tool_calling_node/utils.py +75 -0
- vellum/workflows/state/context.py +13 -2
- vellum/workflows/types/definition.py +2 -2
- vellum/workflows/types/tests/test_definition.py +2 -3
- vellum/workflows/utils/functions.py +1 -1
- vellum/workflows/utils/tests/test_functions.py +3 -3
- {vellum_ai-1.0.11.dist-info → vellum_ai-1.1.1.dist-info}/METADATA +1 -1
- {vellum_ai-1.0.11.dist-info → vellum_ai-1.1.1.dist-info}/RECORD +123 -81
- vellum_ee/workflows/display/exceptions.py +7 -0
- vellum_ee/workflows/display/nodes/vellum/code_execution_node.py +2 -1
- vellum_ee/workflows/display/nodes/vellum/tests/test_code_execution_node.py +53 -2
- vellum_ee/workflows/display/nodes/vellum/tests/test_tool_calling_node.py +93 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_mcp_serialization.py +98 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_workflow_deployment_serialization.py +1 -1
- vellum_ee/workflows/display/utils/expressions.py +1 -1
- vellum_ee/workflows/display/workflows/base_workflow_display.py +2 -1
- vellum/client/resources/release_reviews/__init__.py +0 -2
- vellum/client/resources/release_reviews/client.py +0 -139
- {vellum_ai-1.0.11.dist-info → vellum_ai-1.1.1.dist-info}/LICENSE +0 -0
- {vellum_ai-1.0.11.dist-info → vellum_ai-1.1.1.dist-info}/WHEEL +0 -0
- {vellum_ai-1.0.11.dist-info → vellum_ai-1.1.1.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,220 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import typing
|
4
|
+
from ...core.client_wrapper import SyncClientWrapper
|
5
|
+
from ...core.request_options import RequestOptions
|
6
|
+
from ...core.http_response import HttpResponse
|
7
|
+
from ...types.workspace_secret_read import WorkspaceSecretRead
|
8
|
+
from ...core.jsonable_encoder import jsonable_encoder
|
9
|
+
from ...core.pydantic_utilities import parse_obj_as
|
10
|
+
from json.decoder import JSONDecodeError
|
11
|
+
from ...core.api_error import ApiError
|
12
|
+
from ...core.client_wrapper import AsyncClientWrapper
|
13
|
+
from ...core.http_response import AsyncHttpResponse
|
14
|
+
|
15
|
+
# this is used as the default value for optional parameters
|
16
|
+
OMIT = typing.cast(typing.Any, ...)
|
17
|
+
|
18
|
+
|
19
|
+
class RawWorkspaceSecretsClient:
|
20
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
21
|
+
self._client_wrapper = client_wrapper
|
22
|
+
|
23
|
+
def retrieve(
|
24
|
+
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
25
|
+
) -> HttpResponse[WorkspaceSecretRead]:
|
26
|
+
"""
|
27
|
+
Used to retrieve a Workspace Secret given its ID or name.
|
28
|
+
|
29
|
+
Parameters
|
30
|
+
----------
|
31
|
+
id : str
|
32
|
+
Either the Workspace Secret's ID or its unique name
|
33
|
+
|
34
|
+
request_options : typing.Optional[RequestOptions]
|
35
|
+
Request-specific configuration.
|
36
|
+
|
37
|
+
Returns
|
38
|
+
-------
|
39
|
+
HttpResponse[WorkspaceSecretRead]
|
40
|
+
|
41
|
+
"""
|
42
|
+
_response = self._client_wrapper.httpx_client.request(
|
43
|
+
f"v1/workspace-secrets/{jsonable_encoder(id)}",
|
44
|
+
base_url=self._client_wrapper.get_environment().default,
|
45
|
+
method="GET",
|
46
|
+
request_options=request_options,
|
47
|
+
)
|
48
|
+
try:
|
49
|
+
if 200 <= _response.status_code < 300:
|
50
|
+
_data = typing.cast(
|
51
|
+
WorkspaceSecretRead,
|
52
|
+
parse_obj_as(
|
53
|
+
type_=WorkspaceSecretRead, # type: ignore
|
54
|
+
object_=_response.json(),
|
55
|
+
),
|
56
|
+
)
|
57
|
+
return HttpResponse(response=_response, data=_data)
|
58
|
+
_response_json = _response.json()
|
59
|
+
except JSONDecodeError:
|
60
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
61
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
62
|
+
|
63
|
+
def partial_update(
|
64
|
+
self,
|
65
|
+
id: str,
|
66
|
+
*,
|
67
|
+
label: typing.Optional[str] = OMIT,
|
68
|
+
value: typing.Optional[str] = OMIT,
|
69
|
+
request_options: typing.Optional[RequestOptions] = None,
|
70
|
+
) -> HttpResponse[WorkspaceSecretRead]:
|
71
|
+
"""
|
72
|
+
Used to update a Workspace Secret given its ID or name.
|
73
|
+
|
74
|
+
Parameters
|
75
|
+
----------
|
76
|
+
id : str
|
77
|
+
Either the Workspace Secret's ID or its unique name
|
78
|
+
|
79
|
+
label : typing.Optional[str]
|
80
|
+
|
81
|
+
value : typing.Optional[str]
|
82
|
+
|
83
|
+
request_options : typing.Optional[RequestOptions]
|
84
|
+
Request-specific configuration.
|
85
|
+
|
86
|
+
Returns
|
87
|
+
-------
|
88
|
+
HttpResponse[WorkspaceSecretRead]
|
89
|
+
|
90
|
+
"""
|
91
|
+
_response = self._client_wrapper.httpx_client.request(
|
92
|
+
f"v1/workspace-secrets/{jsonable_encoder(id)}",
|
93
|
+
base_url=self._client_wrapper.get_environment().default,
|
94
|
+
method="PATCH",
|
95
|
+
json={
|
96
|
+
"label": label,
|
97
|
+
"value": value,
|
98
|
+
},
|
99
|
+
headers={
|
100
|
+
"content-type": "application/json",
|
101
|
+
},
|
102
|
+
request_options=request_options,
|
103
|
+
omit=OMIT,
|
104
|
+
)
|
105
|
+
try:
|
106
|
+
if 200 <= _response.status_code < 300:
|
107
|
+
_data = typing.cast(
|
108
|
+
WorkspaceSecretRead,
|
109
|
+
parse_obj_as(
|
110
|
+
type_=WorkspaceSecretRead, # type: ignore
|
111
|
+
object_=_response.json(),
|
112
|
+
),
|
113
|
+
)
|
114
|
+
return HttpResponse(response=_response, data=_data)
|
115
|
+
_response_json = _response.json()
|
116
|
+
except JSONDecodeError:
|
117
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
118
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
119
|
+
|
120
|
+
|
121
|
+
class AsyncRawWorkspaceSecretsClient:
|
122
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
123
|
+
self._client_wrapper = client_wrapper
|
124
|
+
|
125
|
+
async def retrieve(
|
126
|
+
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
127
|
+
) -> AsyncHttpResponse[WorkspaceSecretRead]:
|
128
|
+
"""
|
129
|
+
Used to retrieve a Workspace Secret given its ID or name.
|
130
|
+
|
131
|
+
Parameters
|
132
|
+
----------
|
133
|
+
id : str
|
134
|
+
Either the Workspace Secret's ID or its unique name
|
135
|
+
|
136
|
+
request_options : typing.Optional[RequestOptions]
|
137
|
+
Request-specific configuration.
|
138
|
+
|
139
|
+
Returns
|
140
|
+
-------
|
141
|
+
AsyncHttpResponse[WorkspaceSecretRead]
|
142
|
+
|
143
|
+
"""
|
144
|
+
_response = await self._client_wrapper.httpx_client.request(
|
145
|
+
f"v1/workspace-secrets/{jsonable_encoder(id)}",
|
146
|
+
base_url=self._client_wrapper.get_environment().default,
|
147
|
+
method="GET",
|
148
|
+
request_options=request_options,
|
149
|
+
)
|
150
|
+
try:
|
151
|
+
if 200 <= _response.status_code < 300:
|
152
|
+
_data = typing.cast(
|
153
|
+
WorkspaceSecretRead,
|
154
|
+
parse_obj_as(
|
155
|
+
type_=WorkspaceSecretRead, # type: ignore
|
156
|
+
object_=_response.json(),
|
157
|
+
),
|
158
|
+
)
|
159
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
160
|
+
_response_json = _response.json()
|
161
|
+
except JSONDecodeError:
|
162
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
163
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
164
|
+
|
165
|
+
async def partial_update(
|
166
|
+
self,
|
167
|
+
id: str,
|
168
|
+
*,
|
169
|
+
label: typing.Optional[str] = OMIT,
|
170
|
+
value: typing.Optional[str] = OMIT,
|
171
|
+
request_options: typing.Optional[RequestOptions] = None,
|
172
|
+
) -> AsyncHttpResponse[WorkspaceSecretRead]:
|
173
|
+
"""
|
174
|
+
Used to update a Workspace Secret given its ID or name.
|
175
|
+
|
176
|
+
Parameters
|
177
|
+
----------
|
178
|
+
id : str
|
179
|
+
Either the Workspace Secret's ID or its unique name
|
180
|
+
|
181
|
+
label : typing.Optional[str]
|
182
|
+
|
183
|
+
value : typing.Optional[str]
|
184
|
+
|
185
|
+
request_options : typing.Optional[RequestOptions]
|
186
|
+
Request-specific configuration.
|
187
|
+
|
188
|
+
Returns
|
189
|
+
-------
|
190
|
+
AsyncHttpResponse[WorkspaceSecretRead]
|
191
|
+
|
192
|
+
"""
|
193
|
+
_response = await self._client_wrapper.httpx_client.request(
|
194
|
+
f"v1/workspace-secrets/{jsonable_encoder(id)}",
|
195
|
+
base_url=self._client_wrapper.get_environment().default,
|
196
|
+
method="PATCH",
|
197
|
+
json={
|
198
|
+
"label": label,
|
199
|
+
"value": value,
|
200
|
+
},
|
201
|
+
headers={
|
202
|
+
"content-type": "application/json",
|
203
|
+
},
|
204
|
+
request_options=request_options,
|
205
|
+
omit=OMIT,
|
206
|
+
)
|
207
|
+
try:
|
208
|
+
if 200 <= _response.status_code < 300:
|
209
|
+
_data = typing.cast(
|
210
|
+
WorkspaceSecretRead,
|
211
|
+
parse_obj_as(
|
212
|
+
type_=WorkspaceSecretRead, # type: ignore
|
213
|
+
object_=_response.json(),
|
214
|
+
),
|
215
|
+
)
|
216
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
217
|
+
_response_json = _response.json()
|
218
|
+
except JSONDecodeError:
|
219
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
220
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
@@ -1,18 +1,32 @@
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
2
2
|
|
3
3
|
from ...core.client_wrapper import SyncClientWrapper
|
4
|
+
from .raw_client import RawWorkspacesClient
|
4
5
|
import typing
|
5
6
|
from ...core.request_options import RequestOptions
|
6
7
|
from ...types.workspace_read import WorkspaceRead
|
7
|
-
from ...core.pydantic_utilities import parse_obj_as
|
8
|
-
from json.decoder import JSONDecodeError
|
9
|
-
from ...core.api_error import ApiError
|
10
8
|
from ...core.client_wrapper import AsyncClientWrapper
|
9
|
+
from .raw_client import AsyncRawWorkspacesClient
|
11
10
|
|
12
11
|
|
13
12
|
class WorkspacesClient:
|
14
13
|
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
15
|
-
self.
|
14
|
+
self._raw_client = RawWorkspacesClient(client_wrapper=client_wrapper)
|
15
|
+
|
16
|
+
@property
|
17
|
+
def _client_wrapper(self) -> SyncClientWrapper:
|
18
|
+
return self._raw_client._client_wrapper
|
19
|
+
|
20
|
+
@property
|
21
|
+
def with_raw_response(self) -> RawWorkspacesClient:
|
22
|
+
"""
|
23
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
24
|
+
|
25
|
+
Returns
|
26
|
+
-------
|
27
|
+
RawWorkspacesClient
|
28
|
+
"""
|
29
|
+
return self._raw_client
|
16
30
|
|
17
31
|
def workspace_identity(self, *, request_options: typing.Optional[RequestOptions] = None) -> WorkspaceRead:
|
18
32
|
"""
|
@@ -38,30 +52,26 @@ class WorkspacesClient:
|
|
38
52
|
)
|
39
53
|
client.workspaces.workspace_identity()
|
40
54
|
"""
|
41
|
-
|
42
|
-
"v1/workspaces/identity",
|
43
|
-
base_url=self._client_wrapper.get_environment().default,
|
44
|
-
method="GET",
|
55
|
+
response = self._raw_client.workspace_identity(
|
45
56
|
request_options=request_options,
|
46
57
|
)
|
47
|
-
|
48
|
-
if 200 <= _response.status_code < 300:
|
49
|
-
return typing.cast(
|
50
|
-
WorkspaceRead,
|
51
|
-
parse_obj_as(
|
52
|
-
type_=WorkspaceRead, # type: ignore
|
53
|
-
object_=_response.json(),
|
54
|
-
),
|
55
|
-
)
|
56
|
-
_response_json = _response.json()
|
57
|
-
except JSONDecodeError:
|
58
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
59
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
58
|
+
return response.data
|
60
59
|
|
61
60
|
|
62
61
|
class AsyncWorkspacesClient:
|
63
62
|
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
64
|
-
self.
|
63
|
+
self._raw_client = AsyncRawWorkspacesClient(client_wrapper=client_wrapper)
|
64
|
+
|
65
|
+
@property
|
66
|
+
def with_raw_response(self) -> AsyncRawWorkspacesClient:
|
67
|
+
"""
|
68
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
69
|
+
|
70
|
+
Returns
|
71
|
+
-------
|
72
|
+
AsyncRawWorkspacesClient
|
73
|
+
"""
|
74
|
+
return self._raw_client
|
65
75
|
|
66
76
|
async def workspace_identity(self, *, request_options: typing.Optional[RequestOptions] = None) -> WorkspaceRead:
|
67
77
|
"""
|
@@ -95,22 +105,7 @@ class AsyncWorkspacesClient:
|
|
95
105
|
|
96
106
|
asyncio.run(main())
|
97
107
|
"""
|
98
|
-
|
99
|
-
"v1/workspaces/identity",
|
100
|
-
base_url=self._client_wrapper.get_environment().default,
|
101
|
-
method="GET",
|
108
|
+
response = await self._raw_client.workspace_identity(
|
102
109
|
request_options=request_options,
|
103
110
|
)
|
104
|
-
|
105
|
-
if 200 <= _response.status_code < 300:
|
106
|
-
return typing.cast(
|
107
|
-
WorkspaceRead,
|
108
|
-
parse_obj_as(
|
109
|
-
type_=WorkspaceRead, # type: ignore
|
110
|
-
object_=_response.json(),
|
111
|
-
),
|
112
|
-
)
|
113
|
-
_response_json = _response.json()
|
114
|
-
except JSONDecodeError:
|
115
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
116
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
111
|
+
return response.data
|
@@ -0,0 +1,96 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from ...core.client_wrapper import SyncClientWrapper
|
4
|
+
import typing
|
5
|
+
from ...core.request_options import RequestOptions
|
6
|
+
from ...core.http_response import HttpResponse
|
7
|
+
from ...types.workspace_read import WorkspaceRead
|
8
|
+
from ...core.pydantic_utilities import parse_obj_as
|
9
|
+
from json.decoder import JSONDecodeError
|
10
|
+
from ...core.api_error import ApiError
|
11
|
+
from ...core.client_wrapper import AsyncClientWrapper
|
12
|
+
from ...core.http_response import AsyncHttpResponse
|
13
|
+
|
14
|
+
|
15
|
+
class RawWorkspacesClient:
|
16
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
17
|
+
self._client_wrapper = client_wrapper
|
18
|
+
|
19
|
+
def workspace_identity(
|
20
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
21
|
+
) -> HttpResponse[WorkspaceRead]:
|
22
|
+
"""
|
23
|
+
Retrieves information about the active Workspace
|
24
|
+
|
25
|
+
Parameters
|
26
|
+
----------
|
27
|
+
request_options : typing.Optional[RequestOptions]
|
28
|
+
Request-specific configuration.
|
29
|
+
|
30
|
+
Returns
|
31
|
+
-------
|
32
|
+
HttpResponse[WorkspaceRead]
|
33
|
+
|
34
|
+
"""
|
35
|
+
_response = self._client_wrapper.httpx_client.request(
|
36
|
+
"v1/workspaces/identity",
|
37
|
+
base_url=self._client_wrapper.get_environment().default,
|
38
|
+
method="GET",
|
39
|
+
request_options=request_options,
|
40
|
+
)
|
41
|
+
try:
|
42
|
+
if 200 <= _response.status_code < 300:
|
43
|
+
_data = typing.cast(
|
44
|
+
WorkspaceRead,
|
45
|
+
parse_obj_as(
|
46
|
+
type_=WorkspaceRead, # type: ignore
|
47
|
+
object_=_response.json(),
|
48
|
+
),
|
49
|
+
)
|
50
|
+
return HttpResponse(response=_response, data=_data)
|
51
|
+
_response_json = _response.json()
|
52
|
+
except JSONDecodeError:
|
53
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
54
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
55
|
+
|
56
|
+
|
57
|
+
class AsyncRawWorkspacesClient:
|
58
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
59
|
+
self._client_wrapper = client_wrapper
|
60
|
+
|
61
|
+
async def workspace_identity(
|
62
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
63
|
+
) -> AsyncHttpResponse[WorkspaceRead]:
|
64
|
+
"""
|
65
|
+
Retrieves information about the active Workspace
|
66
|
+
|
67
|
+
Parameters
|
68
|
+
----------
|
69
|
+
request_options : typing.Optional[RequestOptions]
|
70
|
+
Request-specific configuration.
|
71
|
+
|
72
|
+
Returns
|
73
|
+
-------
|
74
|
+
AsyncHttpResponse[WorkspaceRead]
|
75
|
+
|
76
|
+
"""
|
77
|
+
_response = await self._client_wrapper.httpx_client.request(
|
78
|
+
"v1/workspaces/identity",
|
79
|
+
base_url=self._client_wrapper.get_environment().default,
|
80
|
+
method="GET",
|
81
|
+
request_options=request_options,
|
82
|
+
)
|
83
|
+
try:
|
84
|
+
if 200 <= _response.status_code < 300:
|
85
|
+
_data = typing.cast(
|
86
|
+
WorkspaceRead,
|
87
|
+
parse_obj_as(
|
88
|
+
type_=WorkspaceRead, # type: ignore
|
89
|
+
object_=_response.json(),
|
90
|
+
),
|
91
|
+
)
|
92
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
93
|
+
_response_json = _response.json()
|
94
|
+
except JSONDecodeError:
|
95
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
96
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
vellum/client/types/__init__.py
CHANGED
@@ -128,6 +128,7 @@ from .execution_string_vellum_value import ExecutionStringVellumValue
|
|
128
128
|
from .execution_thinking_vellum_value import ExecutionThinkingVellumValue
|
129
129
|
from .execution_vellum_value import ExecutionVellumValue
|
130
130
|
from .external_input_descriptor import ExternalInputDescriptor
|
131
|
+
from .external_parent_context import ExternalParentContext
|
131
132
|
from .external_test_case_execution import ExternalTestCaseExecution
|
132
133
|
from .external_test_case_execution_request import ExternalTestCaseExecutionRequest
|
133
134
|
from .fast_embed_vectorizer_baai_bge_small_en_v_15 import FastEmbedVectorizerBaaiBgeSmallEnV15
|
@@ -751,6 +752,7 @@ __all__ = [
|
|
751
752
|
"ExecutionThinkingVellumValue",
|
752
753
|
"ExecutionVellumValue",
|
753
754
|
"ExternalInputDescriptor",
|
755
|
+
"ExternalParentContext",
|
754
756
|
"ExternalTestCaseExecution",
|
755
757
|
"ExternalTestCaseExecutionRequest",
|
756
758
|
"FastEmbedVectorizerBaaiBgeSmallEnV15",
|
@@ -24,6 +24,7 @@ class ApiRequestParentContext(UniversalBaseModel):
|
|
24
24
|
extra = pydantic.Extra.allow
|
25
25
|
|
26
26
|
|
27
|
+
from .external_parent_context import ExternalParentContext # noqa: E402
|
27
28
|
from .node_parent_context import NodeParentContext # noqa: E402
|
28
29
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext # noqa: E402
|
29
30
|
from .span_link import SpanLink # noqa: E402
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
5
|
+
import typing
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
7
|
+
import pydantic
|
8
|
+
from ..core.pydantic_utilities import update_forward_refs
|
9
|
+
|
10
|
+
|
11
|
+
class ExternalParentContext(UniversalBaseModel):
|
12
|
+
parent: typing.Optional["ParentContext"] = None
|
13
|
+
links: typing.Optional[typing.List["SpanLink"]] = None
|
14
|
+
type: typing.Literal["EXTERNAL"] = "EXTERNAL"
|
15
|
+
span_id: str
|
16
|
+
|
17
|
+
if IS_PYDANTIC_V2:
|
18
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
19
|
+
else:
|
20
|
+
|
21
|
+
class Config:
|
22
|
+
frozen = True
|
23
|
+
smart_union = True
|
24
|
+
extra = pydantic.Extra.allow
|
25
|
+
|
26
|
+
|
27
|
+
from .api_request_parent_context import ApiRequestParentContext # noqa: E402
|
28
|
+
from .node_parent_context import NodeParentContext # noqa: E402
|
29
|
+
from .prompt_deployment_parent_context import PromptDeploymentParentContext # noqa: E402
|
30
|
+
from .span_link import SpanLink # noqa: E402
|
31
|
+
from .workflow_deployment_parent_context import WorkflowDeploymentParentContext # noqa: E402
|
32
|
+
from .workflow_parent_context import WorkflowParentContext # noqa: E402
|
33
|
+
from .workflow_sandbox_parent_context import WorkflowSandboxParentContext # noqa: E402
|
34
|
+
from .parent_context import ParentContext # noqa: E402
|
35
|
+
|
36
|
+
update_forward_refs(ExternalParentContext)
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
from ..core.pydantic_utilities import UniversalBaseModel
|
4
4
|
from .api_request_parent_context import ApiRequestParentContext
|
5
|
+
from .external_parent_context import ExternalParentContext
|
5
6
|
from .node_parent_context import NodeParentContext
|
6
7
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext
|
7
8
|
from .span_link import SpanLink
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
from ..core.pydantic_utilities import UniversalBaseModel
|
4
4
|
from .api_request_parent_context import ApiRequestParentContext
|
5
|
+
from .external_parent_context import ExternalParentContext
|
5
6
|
from .node_parent_context import NodeParentContext
|
6
7
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext
|
7
8
|
from .span_link import SpanLink
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
from ..core.pydantic_utilities import UniversalBaseModel
|
4
4
|
from .api_request_parent_context import ApiRequestParentContext
|
5
|
+
from .external_parent_context import ExternalParentContext
|
5
6
|
from .node_parent_context import NodeParentContext
|
6
7
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext
|
7
8
|
from .span_link import SpanLink
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
from ..core.pydantic_utilities import UniversalBaseModel
|
4
4
|
from .api_request_parent_context import ApiRequestParentContext
|
5
|
+
from .external_parent_context import ExternalParentContext
|
5
6
|
from .node_parent_context import NodeParentContext
|
6
7
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext
|
7
8
|
from .span_link import SpanLink
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
from ..core.pydantic_utilities import UniversalBaseModel
|
4
4
|
from .api_request_parent_context import ApiRequestParentContext
|
5
|
+
from .external_parent_context import ExternalParentContext
|
5
6
|
from .node_parent_context import NodeParentContext
|
6
7
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext
|
7
8
|
from .span_link import SpanLink
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
from ..core.pydantic_utilities import UniversalBaseModel
|
4
4
|
from .api_request_parent_context import ApiRequestParentContext
|
5
|
+
from .external_parent_context import ExternalParentContext
|
5
6
|
from .node_parent_context import NodeParentContext
|
6
7
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext
|
7
8
|
from .span_link import SpanLink
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
from ..core.pydantic_utilities import UniversalBaseModel
|
4
4
|
from .api_request_parent_context import ApiRequestParentContext
|
5
|
+
from .external_parent_context import ExternalParentContext
|
5
6
|
from .node_parent_context import NodeParentContext
|
6
7
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext
|
7
8
|
from .span_link import SpanLink
|
@@ -27,6 +27,7 @@ class NodeParentContext(UniversalBaseModel):
|
|
27
27
|
|
28
28
|
|
29
29
|
from .api_request_parent_context import ApiRequestParentContext # noqa: E402
|
30
|
+
from .external_parent_context import ExternalParentContext # noqa: E402
|
30
31
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext # noqa: E402
|
31
32
|
from .span_link import SpanLink # noqa: E402
|
32
33
|
from .workflow_deployment_parent_context import WorkflowDeploymentParentContext # noqa: E402
|
@@ -11,6 +11,7 @@ if typing.TYPE_CHECKING:
|
|
11
11
|
from .workflow_sandbox_parent_context import WorkflowSandboxParentContext
|
12
12
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext
|
13
13
|
from .api_request_parent_context import ApiRequestParentContext
|
14
|
+
from .external_parent_context import ExternalParentContext
|
14
15
|
ParentContext = typing.Union[
|
15
16
|
"WorkflowParentContext",
|
16
17
|
"NodeParentContext",
|
@@ -18,4 +19,5 @@ ParentContext = typing.Union[
|
|
18
19
|
"WorkflowSandboxParentContext",
|
19
20
|
"PromptDeploymentParentContext",
|
20
21
|
"ApiRequestParentContext",
|
22
|
+
"ExternalParentContext",
|
21
23
|
]
|
@@ -33,6 +33,7 @@ class PromptDeploymentParentContext(UniversalBaseModel):
|
|
33
33
|
|
34
34
|
|
35
35
|
from .api_request_parent_context import ApiRequestParentContext # noqa: E402
|
36
|
+
from .external_parent_context import ExternalParentContext # noqa: E402
|
36
37
|
from .node_parent_context import NodeParentContext # noqa: E402
|
37
38
|
from .span_link import SpanLink # noqa: E402
|
38
39
|
from .workflow_deployment_parent_context import WorkflowDeploymentParentContext # noqa: E402
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
from ..core.pydantic_utilities import UniversalBaseModel
|
4
4
|
from .api_request_parent_context import ApiRequestParentContext
|
5
|
+
from .external_parent_context import ExternalParentContext
|
5
6
|
from .node_parent_context import NodeParentContext
|
6
7
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext
|
7
8
|
from .span_link import SpanLink
|
vellum/client/types/span_link.py
CHANGED
@@ -25,6 +25,7 @@ class SpanLink(UniversalBaseModel):
|
|
25
25
|
|
26
26
|
|
27
27
|
from .api_request_parent_context import ApiRequestParentContext # noqa: E402
|
28
|
+
from .external_parent_context import ExternalParentContext # noqa: E402
|
28
29
|
from .node_parent_context import NodeParentContext # noqa: E402
|
29
30
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext # noqa: E402
|
30
31
|
from .workflow_deployment_parent_context import WorkflowDeploymentParentContext # noqa: E402
|
@@ -3,6 +3,7 @@
|
|
3
3
|
from ..core.pydantic_utilities import UniversalBaseModel
|
4
4
|
from .api_request_parent_context import ApiRequestParentContext
|
5
5
|
from .array_vellum_value import ArrayVellumValue
|
6
|
+
from .external_parent_context import ExternalParentContext
|
6
7
|
from .node_parent_context import NodeParentContext
|
7
8
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext
|
8
9
|
from .span_link import SpanLink
|
@@ -33,6 +33,7 @@ class WorkflowDeploymentParentContext(UniversalBaseModel):
|
|
33
33
|
|
34
34
|
|
35
35
|
from .api_request_parent_context import ApiRequestParentContext # noqa: E402
|
36
|
+
from .external_parent_context import ExternalParentContext # noqa: E402
|
36
37
|
from .node_parent_context import NodeParentContext # noqa: E402
|
37
38
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext # noqa: E402
|
38
39
|
from .span_link import SpanLink # noqa: E402
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
from ..core.pydantic_utilities import UniversalBaseModel
|
4
4
|
from .api_request_parent_context import ApiRequestParentContext
|
5
|
+
from .external_parent_context import ExternalParentContext
|
5
6
|
from .node_parent_context import NodeParentContext
|
6
7
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext
|
7
8
|
from .span_link import SpanLink
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
from ..core.pydantic_utilities import UniversalBaseModel
|
4
4
|
from .api_request_parent_context import ApiRequestParentContext
|
5
|
+
from .external_parent_context import ExternalParentContext
|
5
6
|
from .node_parent_context import NodeParentContext
|
6
7
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext
|
7
8
|
from .span_link import SpanLink
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
from ..core.pydantic_utilities import UniversalBaseModel
|
4
4
|
from .api_request_parent_context import ApiRequestParentContext
|
5
|
+
from .external_parent_context import ExternalParentContext
|
5
6
|
from .node_parent_context import NodeParentContext
|
6
7
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext
|
7
8
|
from .span_link import SpanLink
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
from ..core.pydantic_utilities import UniversalBaseModel
|
4
4
|
from .api_request_parent_context import ApiRequestParentContext
|
5
|
+
from .external_parent_context import ExternalParentContext
|
5
6
|
from .node_parent_context import NodeParentContext
|
6
7
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext
|
7
8
|
from .span_link import SpanLink
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
from ..core.pydantic_utilities import UniversalBaseModel
|
4
4
|
from .api_request_parent_context import ApiRequestParentContext
|
5
|
+
from .external_parent_context import ExternalParentContext
|
5
6
|
from .node_parent_context import NodeParentContext
|
6
7
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext
|
7
8
|
from .span_link import SpanLink
|