vellum-ai 0.9.2__py3-none-any.whl → 0.9.3__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 CHANGED
@@ -68,6 +68,7 @@ from .types import (
68
68
  DeploymentRead,
69
69
  DeploymentReleaseTagDeploymentHistoryItem,
70
70
  DeploymentReleaseTagRead,
71
+ DockerServiceToken,
71
72
  DocumentDocumentToDocumentIndex,
72
73
  DocumentIndexChunking,
73
74
  DocumentIndexChunkingRequest,
@@ -572,6 +573,7 @@ __all__ = [
572
573
  "DeploymentReleaseTagDeploymentHistoryItem",
573
574
  "DeploymentReleaseTagRead",
574
575
  "DeploymentsListRequestStatus",
576
+ "DockerServiceToken",
575
577
  "DocumentDocumentToDocumentIndex",
576
578
  "DocumentIndexChunking",
577
579
  "DocumentIndexChunkingRequest",
@@ -17,7 +17,7 @@ class BaseClientWrapper:
17
17
  headers: typing.Dict[str, str] = {
18
18
  "X-Fern-Language": "Python",
19
19
  "X-Fern-SDK-Name": "vellum-ai",
20
- "X-Fern-SDK-Version": "0.9.2",
20
+ "X-Fern-SDK-Version": "v0.9.3",
21
21
  }
22
22
  headers["X_API_KEY"] = self.api_key
23
23
  return headers
@@ -9,6 +9,7 @@ from json.decoder import JSONDecodeError
9
9
  from ...core.api_error import ApiError
10
10
  from ...types.container_image_read import ContainerImageRead
11
11
  from ...core.jsonable_encoder import jsonable_encoder
12
+ from ...types.docker_service_token import DockerServiceToken
12
13
  from ...core.client_wrapper import AsyncClientWrapper
13
14
 
14
15
  # this is used as the default value for optional parameters
@@ -131,6 +132,49 @@ class ContainerImagesClient:
131
132
  raise ApiError(status_code=_response.status_code, body=_response.text)
132
133
  raise ApiError(status_code=_response.status_code, body=_response_json)
133
134
 
135
+ def docker_service_token(self, *, request_options: typing.Optional[RequestOptions] = None) -> DockerServiceToken:
136
+ """
137
+ An internal-only endpoint that's subject to breaking changes without notice. Not intended for public use.
138
+
139
+ Parameters
140
+ ----------
141
+ request_options : typing.Optional[RequestOptions]
142
+ Request-specific configuration.
143
+
144
+ Returns
145
+ -------
146
+ DockerServiceToken
147
+
148
+
149
+ Examples
150
+ --------
151
+ from vellum import Vellum
152
+
153
+ client = Vellum(
154
+ api_key="YOUR_API_KEY",
155
+ )
156
+ client.container_images.docker_service_token()
157
+ """
158
+ _response = self._client_wrapper.httpx_client.request(
159
+ "v1/container-images/docker-service-token",
160
+ base_url=self._client_wrapper.get_environment().default,
161
+ method="GET",
162
+ request_options=request_options,
163
+ )
164
+ try:
165
+ if 200 <= _response.status_code < 300:
166
+ return typing.cast(
167
+ DockerServiceToken,
168
+ parse_obj_as(
169
+ type_=DockerServiceToken, # type: ignore
170
+ object_=_response.json(),
171
+ ),
172
+ )
173
+ _response_json = _response.json()
174
+ except JSONDecodeError:
175
+ raise ApiError(status_code=_response.status_code, body=_response.text)
176
+ raise ApiError(status_code=_response.status_code, body=_response_json)
177
+
134
178
  def push_container_image(
135
179
  self,
136
180
  *,
@@ -330,6 +374,59 @@ class AsyncContainerImagesClient:
330
374
  raise ApiError(status_code=_response.status_code, body=_response.text)
331
375
  raise ApiError(status_code=_response.status_code, body=_response_json)
332
376
 
377
+ async def docker_service_token(
378
+ self, *, request_options: typing.Optional[RequestOptions] = None
379
+ ) -> DockerServiceToken:
380
+ """
381
+ An internal-only endpoint that's subject to breaking changes without notice. Not intended for public use.
382
+
383
+ Parameters
384
+ ----------
385
+ request_options : typing.Optional[RequestOptions]
386
+ Request-specific configuration.
387
+
388
+ Returns
389
+ -------
390
+ DockerServiceToken
391
+
392
+
393
+ Examples
394
+ --------
395
+ import asyncio
396
+
397
+ from vellum import AsyncVellum
398
+
399
+ client = AsyncVellum(
400
+ api_key="YOUR_API_KEY",
401
+ )
402
+
403
+
404
+ async def main() -> None:
405
+ await client.container_images.docker_service_token()
406
+
407
+
408
+ asyncio.run(main())
409
+ """
410
+ _response = await self._client_wrapper.httpx_client.request(
411
+ "v1/container-images/docker-service-token",
412
+ base_url=self._client_wrapper.get_environment().default,
413
+ method="GET",
414
+ request_options=request_options,
415
+ )
416
+ try:
417
+ if 200 <= _response.status_code < 300:
418
+ return typing.cast(
419
+ DockerServiceToken,
420
+ parse_obj_as(
421
+ type_=DockerServiceToken, # type: ignore
422
+ object_=_response.json(),
423
+ ),
424
+ )
425
+ _response_json = _response.json()
426
+ except JSONDecodeError:
427
+ raise ApiError(status_code=_response.status_code, body=_response.text)
428
+ raise ApiError(status_code=_response.status_code, body=_response_json)
429
+
333
430
  async def push_container_image(
334
431
  self,
335
432
  *,
@@ -2,12 +2,13 @@
2
2
 
3
3
  import typing
4
4
  from ...core.client_wrapper import SyncClientWrapper
5
- from ...types.workflow_push_exec_config import WorkflowPushExecConfig
6
5
  from ...core.request_options import RequestOptions
7
- from ...types.workflow_push_response import WorkflowPushResponse
8
- from ...core.pydantic_utilities import parse_obj_as
6
+ from ...core.jsonable_encoder import jsonable_encoder
9
7
  from json.decoder import JSONDecodeError
10
8
  from ...core.api_error import ApiError
9
+ from ...types.workflow_push_exec_config import WorkflowPushExecConfig
10
+ from ...types.workflow_push_response import WorkflowPushResponse
11
+ from ...core.pydantic_utilities import parse_obj_as
11
12
  from ...core.client_wrapper import AsyncClientWrapper
12
13
 
13
14
  # this is used as the default value for optional parameters
@@ -18,6 +19,51 @@ class WorkflowsClient:
18
19
  def __init__(self, *, client_wrapper: SyncClientWrapper):
19
20
  self._client_wrapper = client_wrapper
20
21
 
22
+ def pull(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> typing.Iterator[bytes]:
23
+ """
24
+ An internal-only endpoint that's subject to breaking changes without notice. Not intended for public use.
25
+
26
+ Parameters
27
+ ----------
28
+ id : str
29
+ The ID of the Workflow to pull from
30
+
31
+ request_options : typing.Optional[RequestOptions]
32
+ Request-specific configuration.
33
+
34
+ Yields
35
+ ------
36
+ typing.Iterator[bytes]
37
+
38
+
39
+ Examples
40
+ --------
41
+ from vellum import Vellum
42
+
43
+ client = Vellum(
44
+ api_key="YOUR_API_KEY",
45
+ )
46
+ client.workflows.pull(
47
+ id="string",
48
+ )
49
+ """
50
+ with self._client_wrapper.httpx_client.stream(
51
+ f"v1/workflows/{jsonable_encoder(id)}/pull",
52
+ base_url=self._client_wrapper.get_environment().default,
53
+ method="GET",
54
+ request_options=request_options,
55
+ ) as _response:
56
+ try:
57
+ if 200 <= _response.status_code < 300:
58
+ for _chunk in _response.iter_bytes():
59
+ yield _chunk
60
+ return
61
+ _response.read()
62
+ _response_json = _response.json()
63
+ except JSONDecodeError:
64
+ raise ApiError(status_code=_response.status_code, body=_response.text)
65
+ raise ApiError(status_code=_response.status_code, body=_response_json)
66
+
21
67
  def push(
22
68
  self,
23
69
  *,
@@ -88,6 +134,61 @@ class AsyncWorkflowsClient:
88
134
  def __init__(self, *, client_wrapper: AsyncClientWrapper):
89
135
  self._client_wrapper = client_wrapper
90
136
 
137
+ async def pull(
138
+ self, id: str, *, request_options: typing.Optional[RequestOptions] = None
139
+ ) -> typing.AsyncIterator[bytes]:
140
+ """
141
+ An internal-only endpoint that's subject to breaking changes without notice. Not intended for public use.
142
+
143
+ Parameters
144
+ ----------
145
+ id : str
146
+ The ID of the Workflow to pull from
147
+
148
+ request_options : typing.Optional[RequestOptions]
149
+ Request-specific configuration.
150
+
151
+ Yields
152
+ ------
153
+ typing.AsyncIterator[bytes]
154
+
155
+
156
+ Examples
157
+ --------
158
+ import asyncio
159
+
160
+ from vellum import AsyncVellum
161
+
162
+ client = AsyncVellum(
163
+ api_key="YOUR_API_KEY",
164
+ )
165
+
166
+
167
+ async def main() -> None:
168
+ await client.workflows.pull(
169
+ id="string",
170
+ )
171
+
172
+
173
+ asyncio.run(main())
174
+ """
175
+ async with self._client_wrapper.httpx_client.stream(
176
+ f"v1/workflows/{jsonable_encoder(id)}/pull",
177
+ base_url=self._client_wrapper.get_environment().default,
178
+ method="GET",
179
+ request_options=request_options,
180
+ ) as _response:
181
+ try:
182
+ if 200 <= _response.status_code < 300:
183
+ async for _chunk in _response.aiter_bytes():
184
+ yield _chunk
185
+ return
186
+ await _response.aread()
187
+ _response_json = _response.json()
188
+ except JSONDecodeError:
189
+ raise ApiError(status_code=_response.status_code, body=_response.text)
190
+ raise ApiError(status_code=_response.status_code, body=_response_json)
191
+
91
192
  async def push(
92
193
  self,
93
194
  *,
vellum/types/__init__.py CHANGED
@@ -75,6 +75,7 @@ from .deployment_provider_payload_response_payload import DeploymentProviderPayl
75
75
  from .deployment_read import DeploymentRead
76
76
  from .deployment_release_tag_deployment_history_item import DeploymentReleaseTagDeploymentHistoryItem
77
77
  from .deployment_release_tag_read import DeploymentReleaseTagRead
78
+ from .docker_service_token import DockerServiceToken
78
79
  from .document_document_to_document_index import DocumentDocumentToDocumentIndex
79
80
  from .document_index_chunking import DocumentIndexChunking
80
81
  from .document_index_chunking_request import DocumentIndexChunkingRequest
@@ -559,6 +560,7 @@ __all__ = [
559
560
  "DeploymentRead",
560
561
  "DeploymentReleaseTagDeploymentHistoryItem",
561
562
  "DeploymentReleaseTagRead",
563
+ "DockerServiceToken",
562
564
  "DocumentDocumentToDocumentIndex",
563
565
  "DocumentIndexChunking",
564
566
  "DocumentIndexChunkingRequest",
@@ -0,0 +1,21 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.pydantic_utilities import UniversalBaseModel
4
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
5
+ import typing
6
+ import pydantic
7
+
8
+
9
+ class DockerServiceToken(UniversalBaseModel):
10
+ access_token: str
11
+ organization_id: str
12
+ repository: str
13
+
14
+ if IS_PYDANTIC_V2:
15
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
16
+ else:
17
+
18
+ class Config:
19
+ frozen = True
20
+ smart_union = True
21
+ extra = pydantic.Extra.allow
@@ -39,7 +39,7 @@ class EnrichedNormalizedCompletion(UniversalBaseModel):
39
39
  The logprobs of the completion. Only present if specified in the original request options.
40
40
  """
41
41
 
42
- model_version_id: str = pydantic.Field()
42
+ model_version_id: typing.Optional[str] = pydantic.Field(default=None)
43
43
  """
44
44
  The ID of the model version used to generate this completion.
45
45
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vellum-ai
3
- Version: 0.9.2
3
+ Version: 0.9.3
4
4
  Summary:
5
5
  License: MIT
6
6
  Requires-Python: >=3.8,<4.0
@@ -1,8 +1,8 @@
1
- vellum/__init__.py,sha256=DLO3lFK8O_dYKoxb8rvavpQM33DWDyiUZ7vtj14w41I,34176
1
+ vellum/__init__.py,sha256=uz3omyTboMrMSk6YMbpqA5CI62by2F8tUuu9LWhK66I,34226
2
2
  vellum/client.py,sha256=kG4b9g1Jjm6zgzGBXCAYXcM_3xNQfBsa2Xut6F0eHQM,115201
3
3
  vellum/core/__init__.py,sha256=SQ85PF84B9MuKnBwHNHWemSGuy-g_515gFYNFhvEE0I,1438
4
4
  vellum/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
5
- vellum/core/client_wrapper.py,sha256=U0Ysm0UaPDp8GR9MXU31QAE37RXWmykoO9ek-a5jrwo,1889
5
+ vellum/core/client_wrapper.py,sha256=NgWlRdAr9JcMt5BPf4juPIsbFQfSBTNhjyjHNr8y864,1890
6
6
  vellum/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
7
7
  vellum/core/file.py,sha256=X9IbmkZmB2bB_DpmZAO3crWdXagOakAyn6UCOCImCPg,2322
8
8
  vellum/core/http_client.py,sha256=R0pQpCppnEtxccGvXl4uJ76s7ro_65Fo_erlNNLp_AI,19228
@@ -34,7 +34,7 @@ vellum/resources/__init__.py,sha256=oPvhJ3z-7efrRlZ7ILrHQTypPBcXLOtGZdGMmHiVpLU,
34
34
  vellum/resources/ad_hoc/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
35
35
  vellum/resources/ad_hoc/client.py,sha256=maNoWMHH8LSFlr5rDfoJybiPaoWuUiWFkt-IFq8dNMA,17271
36
36
  vellum/resources/container_images/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
37
- vellum/resources/container_images/client.py,sha256=UbR8Mf7F0ia_DyFMwiRmHlj1AR9Z4EFCl2oP3h8Iqj0,12276
37
+ vellum/resources/container_images/client.py,sha256=jK1n-NFsdBKCeEKh-EIqvw7R8AG9PP4GxxcoH9F0GYs,15463
38
38
  vellum/resources/deployments/__init__.py,sha256=AE0TcFwLrLBljM0ZDX-pPw4Kqt-1f5JDpIok2HS80QI,157
39
39
  vellum/resources/deployments/client.py,sha256=tF3llT_g6rfzDHpLhlEoz9gJDy8vIdNGKfICMJp3iEw,29236
40
40
  vellum/resources/deployments/types/__init__.py,sha256=IhwnmoXJ0r_QEhh1b2tBcaAm_x3fWMVuIhYmAapp_ZA,183
@@ -64,7 +64,7 @@ vellum/resources/workflow_deployments/types/workflow_deployments_list_request_st
64
64
  vellum/resources/workflow_sandboxes/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
65
65
  vellum/resources/workflow_sandboxes/client.py,sha256=3wVQxkjrJ5bIS8fB5FpKXCP2dX38299ghWrJ8YmXxwQ,7435
66
66
  vellum/resources/workflows/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
67
- vellum/resources/workflows/client.py,sha256=y8rjg69GUUiOxpenS8j4S_H7Rhpsn_A-1XV9zw9YTMM,4979
67
+ vellum/resources/workflows/client.py,sha256=lXyxcMpu4pYGd9EmdLHCWTKEwJ2owPOoH_kI7lT5dOQ,8181
68
68
  vellum/resources/workspace_secrets/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
69
69
  vellum/resources/workspace_secrets/client.py,sha256=h7UzXLyTttPq1t-JZGMg1BWxypxJvBGUdqg7KGT7MK4,8027
70
70
  vellum/terraform/__init__.py,sha256=CxzT0rkV9cXwAtxZ3gv46DCRt9vBl_Sx1SOj5MJtl0Y,498
@@ -78,7 +78,7 @@ vellum/terraform/ml_model/__init__.py,sha256=I8h1Ru-Rb-Hi_HusK6G7nJQZEKQGsAAHMmw
78
78
  vellum/terraform/provider/__init__.py,sha256=-06xKmAmknpohVzw5TD-t1bnUHta8OrQYqvMd04XM-U,12684
79
79
  vellum/terraform/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
80
80
  vellum/terraform/versions.json,sha256=45c7jjRD5i4w9DJQHs5ZqLLVXRnQwP9Rirq3mWY-xEo,56
81
- vellum/types/__init__.py,sha256=u_3CDRrgpYIHwabMsDv4M_zYjO0gE3hCLGBYt1lc3CM,52006
81
+ vellum/types/__init__.py,sha256=TsOOpzY7n4ut1T1LuZxN54GgthpA1V0pD10bvhXdZt8,52085
82
82
  vellum/types/ad_hoc_execute_prompt_event.py,sha256=bCjujA2XsOgyF3bRZbcEqV2rOIymRgsLoIRtZpB14xg,607
83
83
  vellum/types/ad_hoc_expand_meta_request.py,sha256=hS8PC3hC--OKvRKi2ZFj_RJPQ1bxo2GXno8qJq1kk28,1338
84
84
  vellum/types/ad_hoc_fulfilled_prompt_execution_meta.py,sha256=Bfvf1d_dkmshxRACVM5vcxbH_7AQY23RmrrnPc0ytYY,939
@@ -146,6 +146,7 @@ vellum/types/deployment_provider_payload_response_payload.py,sha256=xHLQnWFN0AZR
146
146
  vellum/types/deployment_read.py,sha256=NtXmYsYJOATxkMxeVkSM35XzDVGbva3RWmn5midBd1A,2160
147
147
  vellum/types/deployment_release_tag_deployment_history_item.py,sha256=df4qKHT1f-z0jnRS4UmP8MQe6u3PwYej_d8KDF7EL88,631
148
148
  vellum/types/deployment_release_tag_read.py,sha256=YlwssIgBd5lKVqelH-gejQXQ7l31vrsRNMJKDGDyTEA,1129
149
+ vellum/types/docker_service_token.py,sha256=T0icNHBKsIs6TrEiDRjckM_f37hcF1DMwEE8161tTvY,614
149
150
  vellum/types/document_document_to_document_index.py,sha256=LbXTZyYxA4hxewquf7ZLZgBD9uWGoIs1J64x4fY7bNg,1229
150
151
  vellum/types/document_index_chunking.py,sha256=TU0Y7z0Xacm3dhzEDuDIG3ZKJCu3vNURRh3PqEd17mY,356
151
152
  vellum/types/document_index_chunking_request.py,sha256=g9BKCsHKg5kzjG7YYeMNQ_5R8TXLeSgumJlMXoSfBcs,435
@@ -154,7 +155,7 @@ vellum/types/document_index_indexing_config_request.py,sha256=Wt-ys1o_acHNyLU0c1
154
155
  vellum/types/document_index_read.py,sha256=9btlJ9-H7DwTFfBljT2PuxtyTQjhiWTStvGqVJMwirE,1469
155
156
  vellum/types/document_read.py,sha256=heZt7k29GVehbKTofcLjRVe1R_UjbCK5Hcbgga3OODY,1930
156
157
  vellum/types/document_status.py,sha256=GD_TSoFmZUBJnPl-chAmaQFzQ2_TYO3PSqi3-9QfEHE,122
157
- vellum/types/enriched_normalized_completion.py,sha256=_NDkKVJj70uKDtIOsQB7E-dL0mOMPwjwgCzhif0RuJI,1796
158
+ vellum/types/enriched_normalized_completion.py,sha256=qk8o_PCj8rvgxa9omng0Nx5SvGNgzS7wnXMpoH56s8k,1825
158
159
  vellum/types/entity_status.py,sha256=bY0jEpISwXqFnbWd3PSb3yXEr-ounPXlAO_fyvHV7l8,158
159
160
  vellum/types/entity_visibility.py,sha256=BX1KdYd7dirpv878XDDvtOHkMOqebM8-lkWmLyFLaw4,184
160
161
  vellum/types/environment_enum.py,sha256=Wcewxp1cpGAMDIAZbTp4Y0GGfvy2Bq_Qu_67f_wBDGA,179
@@ -554,7 +555,7 @@ vellum/types/workflow_result_event_output_data_string.py,sha256=tM3kgh6tEhD0dFEb
554
555
  vellum/types/workflow_stream_event.py,sha256=Wn3Yzuy9MqWAeo8tEaXDTKDEbJoA8DdYdMVq8EKuhu8,361
555
556
  vellum/types/workspace_secret_read.py,sha256=3CnHDG72IAY0KRNvc31F0xLmhnpwjQHnDYCfQJzCxI0,714
556
557
  vellum/version.py,sha256=jq-1PlAYxN9AXuaZqbYk9ak27SgE2lw9Ia5gx1b1gVI,76
557
- vellum_ai-0.9.2.dist-info/LICENSE,sha256=CcaljEIoOBaU-wItPH4PmM_mDCGpyuUY0Er1BGu5Ti8,1073
558
- vellum_ai-0.9.2.dist-info/METADATA,sha256=FFfP07L5xYK0bVhI00nVlnXSKbShSu97EjOb7qZ82y4,4394
559
- vellum_ai-0.9.2.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
560
- vellum_ai-0.9.2.dist-info/RECORD,,
558
+ vellum_ai-0.9.3.dist-info/LICENSE,sha256=CcaljEIoOBaU-wItPH4PmM_mDCGpyuUY0Er1BGu5Ti8,1073
559
+ vellum_ai-0.9.3.dist-info/METADATA,sha256=D55Hrkl9LmXgxpCVIgO1rfc_G8dFKO3REHEtqj6qE7U,4394
560
+ vellum_ai-0.9.3.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
561
+ vellum_ai-0.9.3.dist-info/RECORD,,