vellum-ai 0.1.5__py3-none-any.whl → 0.1.7__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 +26 -0
- vellum/client.py +68 -57
- vellum/core/client_wrapper.py +1 -1
- vellum/resources/deployments/client.py +99 -0
- vellum/resources/model_versions/client.py +2 -2
- vellum/types/__init__.py +28 -0
- vellum/types/deployment_provider_payload_response.py +28 -0
- vellum/types/deployment_read.py +3 -1
- vellum/types/error_execute_prompt_response.py +1 -1
- vellum/types/execute_prompt_request.py +39 -0
- vellum/types/execute_prompt_streaming_response.py +56 -0
- vellum/types/fulfilled_execute_prompt_streaming_response.py +29 -0
- vellum/types/initiated_execute_prompt_response.py +30 -0
- vellum/types/initiated_execute_prompt_streaming_response.py +29 -0
- vellum/types/json_execute_prompt_response.py +1 -1
- vellum/types/rejected_execute_prompt_response.py +31 -0
- vellum/types/rejected_execute_prompt_streaming_response.py +29 -0
- vellum/types/streaming_execute_prompt_streaming_response.py +29 -0
- vellum/types/string_execute_prompt_response.py +1 -1
- {vellum_ai-0.1.5.dist-info → vellum_ai-0.1.7.dist-info}/METADATA +1 -1
- {vellum_ai-0.1.5.dist-info → vellum_ai-0.1.7.dist-info}/RECORD +22 -13
- {vellum_ai-0.1.5.dist-info → vellum_ai-0.1.7.dist-info}/WHEEL +0 -0
vellum/__init__.py
CHANGED
@@ -10,6 +10,7 @@ from .types import (
|
|
10
10
|
ChatMessageRole,
|
11
11
|
ConditionalNodeResult,
|
12
12
|
ConditionalNodeResultData,
|
13
|
+
DeploymentProviderPayloadResponse,
|
13
14
|
DeploymentRead,
|
14
15
|
DeploymentStatus,
|
15
16
|
DocumentDocumentToDocumentIndex,
|
@@ -23,12 +24,19 @@ from .types import (
|
|
23
24
|
EvaluationParams,
|
24
25
|
EvaluationParamsRequest,
|
25
26
|
ExecutePromptApiErrorResponse,
|
27
|
+
ExecutePromptRequest,
|
26
28
|
ExecutePromptResponse,
|
27
29
|
ExecutePromptResponse_Error,
|
28
30
|
ExecutePromptResponse_Json,
|
29
31
|
ExecutePromptResponse_String,
|
32
|
+
ExecutePromptStreamingResponse,
|
33
|
+
ExecutePromptStreamingResponse_Fulfilled,
|
34
|
+
ExecutePromptStreamingResponse_Initiated,
|
35
|
+
ExecutePromptStreamingResponse_Rejected,
|
36
|
+
ExecutePromptStreamingResponse_Streaming,
|
30
37
|
ExecuteWorkflowStreamErrorResponse,
|
31
38
|
FinishReasonEnum,
|
39
|
+
FulfilledExecutePromptStreamingResponse,
|
32
40
|
GenerateErrorResponse,
|
33
41
|
GenerateOptionsRequest,
|
34
42
|
GenerateRequest,
|
@@ -40,6 +48,8 @@ from .types import (
|
|
40
48
|
GenerateStreamResult,
|
41
49
|
GenerateStreamResultData,
|
42
50
|
IndexingStateEnum,
|
51
|
+
InitiatedExecutePromptResponse,
|
52
|
+
InitiatedExecutePromptStreamingResponse,
|
43
53
|
JsonExecutePromptResponse,
|
44
54
|
JsonInputRequest,
|
45
55
|
LogicalOperator,
|
@@ -94,6 +104,8 @@ from .types import (
|
|
94
104
|
RegisteredPromptModelVersion,
|
95
105
|
RegisteredPromptSandbox,
|
96
106
|
RegisteredPromptSandboxSnapshot,
|
107
|
+
RejectedExecutePromptResponse,
|
108
|
+
RejectedExecutePromptStreamingResponse,
|
97
109
|
SandboxMetricInputParams,
|
98
110
|
SandboxMetricInputParamsRequest,
|
99
111
|
SandboxScenario,
|
@@ -113,6 +125,7 @@ from .types import (
|
|
113
125
|
SearchResultRequest,
|
114
126
|
SearchWeightsRequest,
|
115
127
|
SlimDocument,
|
128
|
+
StreamingExecutePromptStreamingResponse,
|
116
129
|
StringExecutePromptResponse,
|
117
130
|
StringInputRequest,
|
118
131
|
SubmitCompletionActualRequest,
|
@@ -251,6 +264,7 @@ __all__ = [
|
|
251
264
|
"ConditionalNodeResult",
|
252
265
|
"ConditionalNodeResultData",
|
253
266
|
"ConflictError",
|
267
|
+
"DeploymentProviderPayloadResponse",
|
254
268
|
"DeploymentRead",
|
255
269
|
"DeploymentStatus",
|
256
270
|
"DocumentDocumentToDocumentIndex",
|
@@ -264,13 +278,20 @@ __all__ = [
|
|
264
278
|
"EvaluationParams",
|
265
279
|
"EvaluationParamsRequest",
|
266
280
|
"ExecutePromptApiErrorResponse",
|
281
|
+
"ExecutePromptRequest",
|
267
282
|
"ExecutePromptResponse",
|
268
283
|
"ExecutePromptResponse_Error",
|
269
284
|
"ExecutePromptResponse_Json",
|
270
285
|
"ExecutePromptResponse_String",
|
286
|
+
"ExecutePromptStreamingResponse",
|
287
|
+
"ExecutePromptStreamingResponse_Fulfilled",
|
288
|
+
"ExecutePromptStreamingResponse_Initiated",
|
289
|
+
"ExecutePromptStreamingResponse_Rejected",
|
290
|
+
"ExecutePromptStreamingResponse_Streaming",
|
271
291
|
"ExecuteWorkflowStreamErrorResponse",
|
272
292
|
"FinishReasonEnum",
|
273
293
|
"ForbiddenError",
|
294
|
+
"FulfilledExecutePromptStreamingResponse",
|
274
295
|
"GenerateErrorResponse",
|
275
296
|
"GenerateOptionsRequest",
|
276
297
|
"GenerateRequest",
|
@@ -282,6 +303,8 @@ __all__ = [
|
|
282
303
|
"GenerateStreamResult",
|
283
304
|
"GenerateStreamResultData",
|
284
305
|
"IndexingStateEnum",
|
306
|
+
"InitiatedExecutePromptResponse",
|
307
|
+
"InitiatedExecutePromptStreamingResponse",
|
285
308
|
"InternalServerError",
|
286
309
|
"JsonExecutePromptResponse",
|
287
310
|
"JsonInputRequest",
|
@@ -338,6 +361,8 @@ __all__ = [
|
|
338
361
|
"RegisteredPromptModelVersion",
|
339
362
|
"RegisteredPromptSandbox",
|
340
363
|
"RegisteredPromptSandboxSnapshot",
|
364
|
+
"RejectedExecutePromptResponse",
|
365
|
+
"RejectedExecutePromptStreamingResponse",
|
341
366
|
"SandboxMetricInputParams",
|
342
367
|
"SandboxMetricInputParamsRequest",
|
343
368
|
"SandboxScenario",
|
@@ -357,6 +382,7 @@ __all__ = [
|
|
357
382
|
"SearchResultRequest",
|
358
383
|
"SearchWeightsRequest",
|
359
384
|
"SlimDocument",
|
385
|
+
"StreamingExecutePromptStreamingResponse",
|
360
386
|
"StringExecutePromptResponse",
|
361
387
|
"StringInputRequest",
|
362
388
|
"SubmitCompletionActualRequest",
|
vellum/client.py
CHANGED
@@ -22,12 +22,13 @@ from .resources.model_versions.client import AsyncModelVersionsClient, ModelVers
|
|
22
22
|
from .resources.registered_prompts.client import AsyncRegisteredPromptsClient, RegisteredPromptsClient
|
23
23
|
from .resources.sandboxes.client import AsyncSandboxesClient, SandboxesClient
|
24
24
|
from .resources.test_suites.client import AsyncTestSuitesClient, TestSuitesClient
|
25
|
+
from .types.execute_prompt_request import ExecutePromptRequest
|
25
26
|
from .types.execute_prompt_response import ExecutePromptResponse
|
27
|
+
from .types.execute_prompt_streaming_response import ExecutePromptStreamingResponse
|
26
28
|
from .types.generate_options_request import GenerateOptionsRequest
|
27
29
|
from .types.generate_request import GenerateRequest
|
28
30
|
from .types.generate_response import GenerateResponse
|
29
31
|
from .types.generate_stream_response import GenerateStreamResponse
|
30
|
-
from .types.prompt_deployment_input_request import PromptDeploymentInputRequest
|
31
32
|
from .types.search_request_options_request import SearchRequestOptionsRequest
|
32
33
|
from .types.search_response import SearchResponse
|
33
34
|
from .types.submit_completion_actual_request import SubmitCompletionActualRequest
|
@@ -67,42 +68,17 @@ class Vellum:
|
|
67
68
|
self.sandboxes = SandboxesClient(client_wrapper=self._client_wrapper)
|
68
69
|
self.test_suites = TestSuitesClient(client_wrapper=self._client_wrapper)
|
69
70
|
|
70
|
-
def execute_prompt(
|
71
|
-
self,
|
72
|
-
*,
|
73
|
-
inputs: typing.List[PromptDeploymentInputRequest],
|
74
|
-
prompt_deployment_id: typing.Optional[str] = OMIT,
|
75
|
-
prompt_deployment_name: typing.Optional[str] = OMIT,
|
76
|
-
release_tag: typing.Optional[str] = OMIT,
|
77
|
-
external_id: typing.Optional[str] = OMIT,
|
78
|
-
) -> ExecutePromptResponse:
|
71
|
+
def execute_prompt(self, *, request: ExecutePromptRequest) -> ExecutePromptResponse:
|
79
72
|
"""
|
80
73
|
Executes a deployed Prompt and returns the result.
|
81
74
|
|
82
75
|
Parameters:
|
83
|
-
-
|
84
|
-
|
85
|
-
- prompt_deployment_id: typing.Optional[str]. The ID of the Prompt Deployment. Must provide either this or prompt_deployment_name.
|
86
|
-
|
87
|
-
- prompt_deployment_name: typing.Optional[str]. The name of the Prompt Deployment. Must provide either this or prompt_deployment_id.
|
88
|
-
|
89
|
-
- release_tag: typing.Optional[str]. Optionally specify a release tag if you want to pin to a specific release of the Prompt Deployment
|
90
|
-
|
91
|
-
- external_id: typing.Optional[str].
|
76
|
+
- request: ExecutePromptRequest.
|
92
77
|
"""
|
93
|
-
_request: typing.Dict[str, typing.Any] = {"inputs": inputs}
|
94
|
-
if prompt_deployment_id is not OMIT:
|
95
|
-
_request["prompt_deployment_id"] = prompt_deployment_id
|
96
|
-
if prompt_deployment_name is not OMIT:
|
97
|
-
_request["prompt_deployment_name"] = prompt_deployment_name
|
98
|
-
if release_tag is not OMIT:
|
99
|
-
_request["release_tag"] = release_tag
|
100
|
-
if external_id is not OMIT:
|
101
|
-
_request["external_id"] = external_id
|
102
78
|
_response = self._client_wrapper.httpx_client.request(
|
103
79
|
"POST",
|
104
80
|
urllib.parse.urljoin(f"{self._client_wrapper.get_environment().default}/", "v1/execute-prompt"),
|
105
|
-
json=jsonable_encoder(
|
81
|
+
json=jsonable_encoder(request),
|
106
82
|
headers=self._client_wrapper.get_headers(),
|
107
83
|
timeout=None,
|
108
84
|
)
|
@@ -122,6 +98,36 @@ class Vellum:
|
|
122
98
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
123
99
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
124
100
|
|
101
|
+
def execute_prompt_stream(self, *, request: ExecutePromptRequest) -> ExecutePromptStreamingResponse:
|
102
|
+
"""
|
103
|
+
Executes a deployed Prompt and streams back the results.
|
104
|
+
|
105
|
+
Parameters:
|
106
|
+
- request: ExecutePromptRequest.
|
107
|
+
"""
|
108
|
+
_response = self._client_wrapper.httpx_client.request(
|
109
|
+
"POST",
|
110
|
+
urllib.parse.urljoin(f"{self._client_wrapper.get_environment().default}/", "v1/execute-prompt-stream"),
|
111
|
+
json=jsonable_encoder(request),
|
112
|
+
headers=self._client_wrapper.get_headers(),
|
113
|
+
timeout=None,
|
114
|
+
)
|
115
|
+
if 200 <= _response.status_code < 300:
|
116
|
+
return pydantic.parse_obj_as(ExecutePromptStreamingResponse, _response.json()) # type: ignore
|
117
|
+
if _response.status_code == 400:
|
118
|
+
raise BadRequestError(pydantic.parse_obj_as(typing.Any, _response.json())) # type: ignore
|
119
|
+
if _response.status_code == 403:
|
120
|
+
raise ForbiddenError(pydantic.parse_obj_as(typing.Any, _response.json())) # type: ignore
|
121
|
+
if _response.status_code == 404:
|
122
|
+
raise NotFoundError(pydantic.parse_obj_as(typing.Any, _response.json())) # type: ignore
|
123
|
+
if _response.status_code == 500:
|
124
|
+
raise InternalServerError(pydantic.parse_obj_as(typing.Any, _response.json())) # type: ignore
|
125
|
+
try:
|
126
|
+
_response_json = _response.json()
|
127
|
+
except JSONDecodeError:
|
128
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
129
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
130
|
+
|
125
131
|
def execute_workflow_stream(
|
126
132
|
self,
|
127
133
|
*,
|
@@ -488,42 +494,17 @@ class AsyncVellum:
|
|
488
494
|
self.sandboxes = AsyncSandboxesClient(client_wrapper=self._client_wrapper)
|
489
495
|
self.test_suites = AsyncTestSuitesClient(client_wrapper=self._client_wrapper)
|
490
496
|
|
491
|
-
async def execute_prompt(
|
492
|
-
self,
|
493
|
-
*,
|
494
|
-
inputs: typing.List[PromptDeploymentInputRequest],
|
495
|
-
prompt_deployment_id: typing.Optional[str] = OMIT,
|
496
|
-
prompt_deployment_name: typing.Optional[str] = OMIT,
|
497
|
-
release_tag: typing.Optional[str] = OMIT,
|
498
|
-
external_id: typing.Optional[str] = OMIT,
|
499
|
-
) -> ExecutePromptResponse:
|
497
|
+
async def execute_prompt(self, *, request: ExecutePromptRequest) -> ExecutePromptResponse:
|
500
498
|
"""
|
501
499
|
Executes a deployed Prompt and returns the result.
|
502
500
|
|
503
501
|
Parameters:
|
504
|
-
-
|
505
|
-
|
506
|
-
- prompt_deployment_id: typing.Optional[str]. The ID of the Prompt Deployment. Must provide either this or prompt_deployment_name.
|
507
|
-
|
508
|
-
- prompt_deployment_name: typing.Optional[str]. The name of the Prompt Deployment. Must provide either this or prompt_deployment_id.
|
509
|
-
|
510
|
-
- release_tag: typing.Optional[str]. Optionally specify a release tag if you want to pin to a specific release of the Prompt Deployment
|
511
|
-
|
512
|
-
- external_id: typing.Optional[str].
|
502
|
+
- request: ExecutePromptRequest.
|
513
503
|
"""
|
514
|
-
_request: typing.Dict[str, typing.Any] = {"inputs": inputs}
|
515
|
-
if prompt_deployment_id is not OMIT:
|
516
|
-
_request["prompt_deployment_id"] = prompt_deployment_id
|
517
|
-
if prompt_deployment_name is not OMIT:
|
518
|
-
_request["prompt_deployment_name"] = prompt_deployment_name
|
519
|
-
if release_tag is not OMIT:
|
520
|
-
_request["release_tag"] = release_tag
|
521
|
-
if external_id is not OMIT:
|
522
|
-
_request["external_id"] = external_id
|
523
504
|
_response = await self._client_wrapper.httpx_client.request(
|
524
505
|
"POST",
|
525
506
|
urllib.parse.urljoin(f"{self._client_wrapper.get_environment().default}/", "v1/execute-prompt"),
|
526
|
-
json=jsonable_encoder(
|
507
|
+
json=jsonable_encoder(request),
|
527
508
|
headers=self._client_wrapper.get_headers(),
|
528
509
|
timeout=None,
|
529
510
|
)
|
@@ -543,6 +524,36 @@ class AsyncVellum:
|
|
543
524
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
544
525
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
545
526
|
|
527
|
+
async def execute_prompt_stream(self, *, request: ExecutePromptRequest) -> ExecutePromptStreamingResponse:
|
528
|
+
"""
|
529
|
+
Executes a deployed Prompt and streams back the results.
|
530
|
+
|
531
|
+
Parameters:
|
532
|
+
- request: ExecutePromptRequest.
|
533
|
+
"""
|
534
|
+
_response = await self._client_wrapper.httpx_client.request(
|
535
|
+
"POST",
|
536
|
+
urllib.parse.urljoin(f"{self._client_wrapper.get_environment().default}/", "v1/execute-prompt-stream"),
|
537
|
+
json=jsonable_encoder(request),
|
538
|
+
headers=self._client_wrapper.get_headers(),
|
539
|
+
timeout=None,
|
540
|
+
)
|
541
|
+
if 200 <= _response.status_code < 300:
|
542
|
+
return pydantic.parse_obj_as(ExecutePromptStreamingResponse, _response.json()) # type: ignore
|
543
|
+
if _response.status_code == 400:
|
544
|
+
raise BadRequestError(pydantic.parse_obj_as(typing.Any, _response.json())) # type: ignore
|
545
|
+
if _response.status_code == 403:
|
546
|
+
raise ForbiddenError(pydantic.parse_obj_as(typing.Any, _response.json())) # type: ignore
|
547
|
+
if _response.status_code == 404:
|
548
|
+
raise NotFoundError(pydantic.parse_obj_as(typing.Any, _response.json())) # type: ignore
|
549
|
+
if _response.status_code == 500:
|
550
|
+
raise InternalServerError(pydantic.parse_obj_as(typing.Any, _response.json())) # type: ignore
|
551
|
+
try:
|
552
|
+
_response_json = _response.json()
|
553
|
+
except JSONDecodeError:
|
554
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
555
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
556
|
+
|
546
557
|
async def execute_workflow_stream(
|
547
558
|
self,
|
548
559
|
*,
|
vellum/core/client_wrapper.py
CHANGED
@@ -16,7 +16,7 @@ class BaseClientWrapper:
|
|
16
16
|
headers: typing.Dict[str, str] = {
|
17
17
|
"X-Fern-Language": "Python",
|
18
18
|
"X-Fern-SDK-Name": "vellum-ai",
|
19
|
-
"X-Fern-SDK-Version": "
|
19
|
+
"X-Fern-SDK-Version": "0.1.7",
|
20
20
|
}
|
21
21
|
headers["X_API_KEY"] = self.api_key
|
22
22
|
return headers
|
@@ -1,17 +1,24 @@
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
2
2
|
|
3
|
+
import typing
|
3
4
|
import urllib.parse
|
4
5
|
from json.decoder import JSONDecodeError
|
5
6
|
|
6
7
|
from ...core.api_error import ApiError
|
7
8
|
from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
9
|
+
from ...core.jsonable_encoder import jsonable_encoder
|
10
|
+
from ...types.deployment_provider_payload_response import DeploymentProviderPayloadResponse
|
8
11
|
from ...types.deployment_read import DeploymentRead
|
12
|
+
from ...types.prompt_deployment_input_request import PromptDeploymentInputRequest
|
9
13
|
|
10
14
|
try:
|
11
15
|
import pydantic.v1 as pydantic # type: ignore
|
12
16
|
except ImportError:
|
13
17
|
import pydantic # type: ignore
|
14
18
|
|
19
|
+
# this is used as the default value for optional parameters
|
20
|
+
OMIT = typing.cast(typing.Any, ...)
|
21
|
+
|
15
22
|
|
16
23
|
class DeploymentsClient:
|
17
24
|
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
@@ -38,6 +45,52 @@ class DeploymentsClient:
|
|
38
45
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
39
46
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
40
47
|
|
48
|
+
def retrieve_provider_payload(
|
49
|
+
self,
|
50
|
+
*,
|
51
|
+
deployment_id: typing.Optional[str] = OMIT,
|
52
|
+
deployment_name: typing.Optional[str] = OMIT,
|
53
|
+
inputs: typing.List[PromptDeploymentInputRequest],
|
54
|
+
) -> DeploymentProviderPayloadResponse:
|
55
|
+
"""
|
56
|
+
Parameters:
|
57
|
+
- deployment_id: typing.Optional[str]. The ID of the deployment. Must provide either this or deployment_name.
|
58
|
+
|
59
|
+
- deployment_name: typing.Optional[str]. The name of the deployment. Must provide either this or deployment_id.
|
60
|
+
|
61
|
+
- inputs: typing.List[PromptDeploymentInputRequest].
|
62
|
+
---
|
63
|
+
from vellum.client import Vellum
|
64
|
+
|
65
|
+
client = Vellum(
|
66
|
+
api_key="YOUR_API_KEY",
|
67
|
+
)
|
68
|
+
client.deployments.retrieve_provider_payload(
|
69
|
+
inputs=[],
|
70
|
+
)
|
71
|
+
"""
|
72
|
+
_request: typing.Dict[str, typing.Any] = {"inputs": inputs}
|
73
|
+
if deployment_id is not OMIT:
|
74
|
+
_request["deployment_id"] = deployment_id
|
75
|
+
if deployment_name is not OMIT:
|
76
|
+
_request["deployment_name"] = deployment_name
|
77
|
+
_response = self._client_wrapper.httpx_client.request(
|
78
|
+
"POST",
|
79
|
+
urllib.parse.urljoin(
|
80
|
+
f"{self._client_wrapper.get_environment().default}/", "v1/deployments/provider-payload"
|
81
|
+
),
|
82
|
+
json=jsonable_encoder(_request),
|
83
|
+
headers=self._client_wrapper.get_headers(),
|
84
|
+
timeout=None,
|
85
|
+
)
|
86
|
+
if 200 <= _response.status_code < 300:
|
87
|
+
return pydantic.parse_obj_as(DeploymentProviderPayloadResponse, _response.json()) # type: ignore
|
88
|
+
try:
|
89
|
+
_response_json = _response.json()
|
90
|
+
except JSONDecodeError:
|
91
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
92
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
93
|
+
|
41
94
|
|
42
95
|
class AsyncDeploymentsClient:
|
43
96
|
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
@@ -63,3 +116,49 @@ class AsyncDeploymentsClient:
|
|
63
116
|
except JSONDecodeError:
|
64
117
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
65
118
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
119
|
+
|
120
|
+
async def retrieve_provider_payload(
|
121
|
+
self,
|
122
|
+
*,
|
123
|
+
deployment_id: typing.Optional[str] = OMIT,
|
124
|
+
deployment_name: typing.Optional[str] = OMIT,
|
125
|
+
inputs: typing.List[PromptDeploymentInputRequest],
|
126
|
+
) -> DeploymentProviderPayloadResponse:
|
127
|
+
"""
|
128
|
+
Parameters:
|
129
|
+
- deployment_id: typing.Optional[str]. The ID of the deployment. Must provide either this or deployment_name.
|
130
|
+
|
131
|
+
- deployment_name: typing.Optional[str]. The name of the deployment. Must provide either this or deployment_id.
|
132
|
+
|
133
|
+
- inputs: typing.List[PromptDeploymentInputRequest].
|
134
|
+
---
|
135
|
+
from vellum.client import AsyncVellum
|
136
|
+
|
137
|
+
client = AsyncVellum(
|
138
|
+
api_key="YOUR_API_KEY",
|
139
|
+
)
|
140
|
+
await client.deployments.retrieve_provider_payload(
|
141
|
+
inputs=[],
|
142
|
+
)
|
143
|
+
"""
|
144
|
+
_request: typing.Dict[str, typing.Any] = {"inputs": inputs}
|
145
|
+
if deployment_id is not OMIT:
|
146
|
+
_request["deployment_id"] = deployment_id
|
147
|
+
if deployment_name is not OMIT:
|
148
|
+
_request["deployment_name"] = deployment_name
|
149
|
+
_response = await self._client_wrapper.httpx_client.request(
|
150
|
+
"POST",
|
151
|
+
urllib.parse.urljoin(
|
152
|
+
f"{self._client_wrapper.get_environment().default}/", "v1/deployments/provider-payload"
|
153
|
+
),
|
154
|
+
json=jsonable_encoder(_request),
|
155
|
+
headers=self._client_wrapper.get_headers(),
|
156
|
+
timeout=None,
|
157
|
+
)
|
158
|
+
if 200 <= _response.status_code < 300:
|
159
|
+
return pydantic.parse_obj_as(DeploymentProviderPayloadResponse, _response.json()) # type: ignore
|
160
|
+
try:
|
161
|
+
_response_json = _response.json()
|
162
|
+
except JSONDecodeError:
|
163
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
164
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
@@ -19,7 +19,7 @@ class ModelVersionsClient:
|
|
19
19
|
|
20
20
|
def retrieve(self, id: str) -> ModelVersionRead:
|
21
21
|
"""
|
22
|
-
|
22
|
+
Deprecated. Use the `deployments/provider-payload` endpoint to fetch information that we send to Model providers.
|
23
23
|
|
24
24
|
Parameters:
|
25
25
|
- id: str. A UUID string identifying this model version.
|
@@ -45,7 +45,7 @@ class AsyncModelVersionsClient:
|
|
45
45
|
|
46
46
|
async def retrieve(self, id: str) -> ModelVersionRead:
|
47
47
|
"""
|
48
|
-
|
48
|
+
Deprecated. Use the `deployments/provider-payload` endpoint to fetch information that we send to Model providers.
|
49
49
|
|
50
50
|
Parameters:
|
51
51
|
- id: str. A UUID string identifying this model version.
|
vellum/types/__init__.py
CHANGED
@@ -9,6 +9,7 @@ from .chat_message_request import ChatMessageRequest
|
|
9
9
|
from .chat_message_role import ChatMessageRole
|
10
10
|
from .conditional_node_result import ConditionalNodeResult
|
11
11
|
from .conditional_node_result_data import ConditionalNodeResultData
|
12
|
+
from .deployment_provider_payload_response import DeploymentProviderPayloadResponse
|
12
13
|
from .deployment_read import DeploymentRead
|
13
14
|
from .deployment_status import DeploymentStatus
|
14
15
|
from .document_document_to_document_index import DocumentDocumentToDocumentIndex
|
@@ -22,14 +23,23 @@ from .error_execute_prompt_response import ErrorExecutePromptResponse
|
|
22
23
|
from .evaluation_params import EvaluationParams
|
23
24
|
from .evaluation_params_request import EvaluationParamsRequest
|
24
25
|
from .execute_prompt_api_error_response import ExecutePromptApiErrorResponse
|
26
|
+
from .execute_prompt_request import ExecutePromptRequest
|
25
27
|
from .execute_prompt_response import (
|
26
28
|
ExecutePromptResponse,
|
27
29
|
ExecutePromptResponse_Error,
|
28
30
|
ExecutePromptResponse_Json,
|
29
31
|
ExecutePromptResponse_String,
|
30
32
|
)
|
33
|
+
from .execute_prompt_streaming_response import (
|
34
|
+
ExecutePromptStreamingResponse,
|
35
|
+
ExecutePromptStreamingResponse_Fulfilled,
|
36
|
+
ExecutePromptStreamingResponse_Initiated,
|
37
|
+
ExecutePromptStreamingResponse_Rejected,
|
38
|
+
ExecutePromptStreamingResponse_Streaming,
|
39
|
+
)
|
31
40
|
from .execute_workflow_stream_error_response import ExecuteWorkflowStreamErrorResponse
|
32
41
|
from .finish_reason_enum import FinishReasonEnum
|
42
|
+
from .fulfilled_execute_prompt_streaming_response import FulfilledExecutePromptStreamingResponse
|
33
43
|
from .generate_error_response import GenerateErrorResponse
|
34
44
|
from .generate_options_request import GenerateOptionsRequest
|
35
45
|
from .generate_request import GenerateRequest
|
@@ -41,6 +51,8 @@ from .generate_stream_response import GenerateStreamResponse
|
|
41
51
|
from .generate_stream_result import GenerateStreamResult
|
42
52
|
from .generate_stream_result_data import GenerateStreamResultData
|
43
53
|
from .indexing_state_enum import IndexingStateEnum
|
54
|
+
from .initiated_execute_prompt_response import InitiatedExecutePromptResponse
|
55
|
+
from .initiated_execute_prompt_streaming_response import InitiatedExecutePromptStreamingResponse
|
44
56
|
from .json_execute_prompt_response import JsonExecutePromptResponse
|
45
57
|
from .json_input_request import JsonInputRequest
|
46
58
|
from .logical_operator import LogicalOperator
|
@@ -99,6 +111,8 @@ from .registered_prompt_input_variable_request import RegisteredPromptInputVaria
|
|
99
111
|
from .registered_prompt_model_version import RegisteredPromptModelVersion
|
100
112
|
from .registered_prompt_sandbox import RegisteredPromptSandbox
|
101
113
|
from .registered_prompt_sandbox_snapshot import RegisteredPromptSandboxSnapshot
|
114
|
+
from .rejected_execute_prompt_response import RejectedExecutePromptResponse
|
115
|
+
from .rejected_execute_prompt_streaming_response import RejectedExecutePromptStreamingResponse
|
102
116
|
from .sandbox_metric_input_params import SandboxMetricInputParams
|
103
117
|
from .sandbox_metric_input_params_request import SandboxMetricInputParamsRequest
|
104
118
|
from .sandbox_scenario import SandboxScenario
|
@@ -118,6 +132,7 @@ from .search_result_merging_request import SearchResultMergingRequest
|
|
118
132
|
from .search_result_request import SearchResultRequest
|
119
133
|
from .search_weights_request import SearchWeightsRequest
|
120
134
|
from .slim_document import SlimDocument
|
135
|
+
from .streaming_execute_prompt_streaming_response import StreamingExecutePromptStreamingResponse
|
121
136
|
from .string_execute_prompt_response import StringExecutePromptResponse
|
122
137
|
from .string_input_request import StringInputRequest
|
123
138
|
from .submit_completion_actual_request import SubmitCompletionActualRequest
|
@@ -256,6 +271,7 @@ __all__ = [
|
|
256
271
|
"ChatMessageRole",
|
257
272
|
"ConditionalNodeResult",
|
258
273
|
"ConditionalNodeResultData",
|
274
|
+
"DeploymentProviderPayloadResponse",
|
259
275
|
"DeploymentRead",
|
260
276
|
"DeploymentStatus",
|
261
277
|
"DocumentDocumentToDocumentIndex",
|
@@ -269,12 +285,19 @@ __all__ = [
|
|
269
285
|
"EvaluationParams",
|
270
286
|
"EvaluationParamsRequest",
|
271
287
|
"ExecutePromptApiErrorResponse",
|
288
|
+
"ExecutePromptRequest",
|
272
289
|
"ExecutePromptResponse",
|
273
290
|
"ExecutePromptResponse_Error",
|
274
291
|
"ExecutePromptResponse_Json",
|
275
292
|
"ExecutePromptResponse_String",
|
293
|
+
"ExecutePromptStreamingResponse",
|
294
|
+
"ExecutePromptStreamingResponse_Fulfilled",
|
295
|
+
"ExecutePromptStreamingResponse_Initiated",
|
296
|
+
"ExecutePromptStreamingResponse_Rejected",
|
297
|
+
"ExecutePromptStreamingResponse_Streaming",
|
276
298
|
"ExecuteWorkflowStreamErrorResponse",
|
277
299
|
"FinishReasonEnum",
|
300
|
+
"FulfilledExecutePromptStreamingResponse",
|
278
301
|
"GenerateErrorResponse",
|
279
302
|
"GenerateOptionsRequest",
|
280
303
|
"GenerateRequest",
|
@@ -286,6 +309,8 @@ __all__ = [
|
|
286
309
|
"GenerateStreamResult",
|
287
310
|
"GenerateStreamResultData",
|
288
311
|
"IndexingStateEnum",
|
312
|
+
"InitiatedExecutePromptResponse",
|
313
|
+
"InitiatedExecutePromptStreamingResponse",
|
289
314
|
"JsonExecutePromptResponse",
|
290
315
|
"JsonInputRequest",
|
291
316
|
"LogicalOperator",
|
@@ -340,6 +365,8 @@ __all__ = [
|
|
340
365
|
"RegisteredPromptModelVersion",
|
341
366
|
"RegisteredPromptSandbox",
|
342
367
|
"RegisteredPromptSandboxSnapshot",
|
368
|
+
"RejectedExecutePromptResponse",
|
369
|
+
"RejectedExecutePromptStreamingResponse",
|
343
370
|
"SandboxMetricInputParams",
|
344
371
|
"SandboxMetricInputParamsRequest",
|
345
372
|
"SandboxScenario",
|
@@ -359,6 +386,7 @@ __all__ = [
|
|
359
386
|
"SearchResultRequest",
|
360
387
|
"SearchWeightsRequest",
|
361
388
|
"SlimDocument",
|
389
|
+
"StreamingExecutePromptStreamingResponse",
|
362
390
|
"StringExecutePromptResponse",
|
363
391
|
"StringInputRequest",
|
364
392
|
"SubmitCompletionActualRequest",
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import datetime as dt
|
4
|
+
import typing
|
5
|
+
|
6
|
+
from ..core.datetime_utils import serialize_datetime
|
7
|
+
|
8
|
+
try:
|
9
|
+
import pydantic.v1 as pydantic # type: ignore
|
10
|
+
except ImportError:
|
11
|
+
import pydantic # type: ignore
|
12
|
+
|
13
|
+
|
14
|
+
class DeploymentProviderPayloadResponse(pydantic.BaseModel):
|
15
|
+
payload: typing.Dict[str, typing.Any]
|
16
|
+
|
17
|
+
def json(self, **kwargs: typing.Any) -> str:
|
18
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
19
|
+
return super().json(**kwargs_with_defaults)
|
20
|
+
|
21
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
22
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
23
|
+
return super().dict(**kwargs_with_defaults)
|
24
|
+
|
25
|
+
class Config:
|
26
|
+
frozen = True
|
27
|
+
smart_union = True
|
28
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
vellum/types/deployment_read.py
CHANGED
@@ -37,7 +37,9 @@ class DeploymentRead(pydantic.BaseModel):
|
|
37
37
|
"* `PRODUCTION` - Production\n"
|
38
38
|
)
|
39
39
|
)
|
40
|
-
active_model_version_ids: typing.List[str]
|
40
|
+
active_model_version_ids: typing.List[str] = pydantic.Field(
|
41
|
+
description="Deprecated. The Prompt execution endpoints return a `prompt_version_id` that could be used instead."
|
42
|
+
)
|
41
43
|
last_deployed_on: dt.datetime
|
42
44
|
input_variables: typing.List[VellumVariable]
|
43
45
|
|
@@ -13,8 +13,8 @@ except ImportError:
|
|
13
13
|
|
14
14
|
|
15
15
|
class ErrorExecutePromptResponse(pydantic.BaseModel):
|
16
|
-
value: VellumError
|
17
16
|
execution_id: str
|
17
|
+
value: VellumError
|
18
18
|
|
19
19
|
def json(self, **kwargs: typing.Any) -> str:
|
20
20
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import datetime as dt
|
4
|
+
import typing
|
5
|
+
|
6
|
+
from ..core.datetime_utils import serialize_datetime
|
7
|
+
from .prompt_deployment_input_request import PromptDeploymentInputRequest
|
8
|
+
|
9
|
+
try:
|
10
|
+
import pydantic.v1 as pydantic # type: ignore
|
11
|
+
except ImportError:
|
12
|
+
import pydantic # type: ignore
|
13
|
+
|
14
|
+
|
15
|
+
class ExecutePromptRequest(pydantic.BaseModel):
|
16
|
+
inputs: typing.List[PromptDeploymentInputRequest]
|
17
|
+
prompt_deployment_id: typing.Optional[str] = pydantic.Field(
|
18
|
+
description="The ID of the Prompt Deployment. Must provide either this or prompt_deployment_name."
|
19
|
+
)
|
20
|
+
prompt_deployment_name: typing.Optional[str] = pydantic.Field(
|
21
|
+
description="The name of the Prompt Deployment. Must provide either this or prompt_deployment_id."
|
22
|
+
)
|
23
|
+
release_tag: typing.Optional[str] = pydantic.Field(
|
24
|
+
description="Optionally specify a release tag if you want to pin to a specific release of the Prompt Deployment"
|
25
|
+
)
|
26
|
+
external_id: typing.Optional[str]
|
27
|
+
|
28
|
+
def json(self, **kwargs: typing.Any) -> str:
|
29
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
30
|
+
return super().json(**kwargs_with_defaults)
|
31
|
+
|
32
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
33
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
34
|
+
return super().dict(**kwargs_with_defaults)
|
35
|
+
|
36
|
+
class Config:
|
37
|
+
frozen = True
|
38
|
+
smart_union = True
|
39
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
import typing
|
6
|
+
|
7
|
+
import typing_extensions
|
8
|
+
|
9
|
+
from .fulfilled_execute_prompt_streaming_response import FulfilledExecutePromptStreamingResponse
|
10
|
+
from .initiated_execute_prompt_streaming_response import InitiatedExecutePromptStreamingResponse
|
11
|
+
from .rejected_execute_prompt_streaming_response import RejectedExecutePromptStreamingResponse
|
12
|
+
from .streaming_execute_prompt_streaming_response import StreamingExecutePromptStreamingResponse
|
13
|
+
|
14
|
+
|
15
|
+
class ExecutePromptStreamingResponse_Initiated(InitiatedExecutePromptStreamingResponse):
|
16
|
+
state: typing_extensions.Literal["INITIATED"]
|
17
|
+
|
18
|
+
class Config:
|
19
|
+
frozen = True
|
20
|
+
smart_union = True
|
21
|
+
allow_population_by_field_name = True
|
22
|
+
|
23
|
+
|
24
|
+
class ExecutePromptStreamingResponse_Streaming(StreamingExecutePromptStreamingResponse):
|
25
|
+
state: typing_extensions.Literal["STREAMING"]
|
26
|
+
|
27
|
+
class Config:
|
28
|
+
frozen = True
|
29
|
+
smart_union = True
|
30
|
+
allow_population_by_field_name = True
|
31
|
+
|
32
|
+
|
33
|
+
class ExecutePromptStreamingResponse_Fulfilled(FulfilledExecutePromptStreamingResponse):
|
34
|
+
state: typing_extensions.Literal["FULFILLED"]
|
35
|
+
|
36
|
+
class Config:
|
37
|
+
frozen = True
|
38
|
+
smart_union = True
|
39
|
+
allow_population_by_field_name = True
|
40
|
+
|
41
|
+
|
42
|
+
class ExecutePromptStreamingResponse_Rejected(RejectedExecutePromptStreamingResponse):
|
43
|
+
state: typing_extensions.Literal["REJECTED"]
|
44
|
+
|
45
|
+
class Config:
|
46
|
+
frozen = True
|
47
|
+
smart_union = True
|
48
|
+
allow_population_by_field_name = True
|
49
|
+
|
50
|
+
|
51
|
+
ExecutePromptStreamingResponse = typing.Union[
|
52
|
+
ExecutePromptStreamingResponse_Initiated,
|
53
|
+
ExecutePromptStreamingResponse_Streaming,
|
54
|
+
ExecutePromptStreamingResponse_Fulfilled,
|
55
|
+
ExecutePromptStreamingResponse_Rejected,
|
56
|
+
]
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import datetime as dt
|
4
|
+
import typing
|
5
|
+
|
6
|
+
from ..core.datetime_utils import serialize_datetime
|
7
|
+
from .execute_prompt_response import ExecutePromptResponse
|
8
|
+
|
9
|
+
try:
|
10
|
+
import pydantic.v1 as pydantic # type: ignore
|
11
|
+
except ImportError:
|
12
|
+
import pydantic # type: ignore
|
13
|
+
|
14
|
+
|
15
|
+
class FulfilledExecutePromptStreamingResponse(pydantic.BaseModel):
|
16
|
+
data: ExecutePromptResponse
|
17
|
+
|
18
|
+
def json(self, **kwargs: typing.Any) -> str:
|
19
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
20
|
+
return super().json(**kwargs_with_defaults)
|
21
|
+
|
22
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
23
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
24
|
+
return super().dict(**kwargs_with_defaults)
|
25
|
+
|
26
|
+
class Config:
|
27
|
+
frozen = True
|
28
|
+
smart_union = True
|
29
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import datetime as dt
|
4
|
+
import typing
|
5
|
+
|
6
|
+
from ..core.datetime_utils import serialize_datetime
|
7
|
+
from .vellum_variable_type import VellumVariableType
|
8
|
+
|
9
|
+
try:
|
10
|
+
import pydantic.v1 as pydantic # type: ignore
|
11
|
+
except ImportError:
|
12
|
+
import pydantic # type: ignore
|
13
|
+
|
14
|
+
|
15
|
+
class InitiatedExecutePromptResponse(pydantic.BaseModel):
|
16
|
+
type: VellumVariableType
|
17
|
+
execution_id: str
|
18
|
+
|
19
|
+
def json(self, **kwargs: typing.Any) -> str:
|
20
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
21
|
+
return super().json(**kwargs_with_defaults)
|
22
|
+
|
23
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
24
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
25
|
+
return super().dict(**kwargs_with_defaults)
|
26
|
+
|
27
|
+
class Config:
|
28
|
+
frozen = True
|
29
|
+
smart_union = True
|
30
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import datetime as dt
|
4
|
+
import typing
|
5
|
+
|
6
|
+
from ..core.datetime_utils import serialize_datetime
|
7
|
+
from .initiated_execute_prompt_response import InitiatedExecutePromptResponse
|
8
|
+
|
9
|
+
try:
|
10
|
+
import pydantic.v1 as pydantic # type: ignore
|
11
|
+
except ImportError:
|
12
|
+
import pydantic # type: ignore
|
13
|
+
|
14
|
+
|
15
|
+
class InitiatedExecutePromptStreamingResponse(pydantic.BaseModel):
|
16
|
+
data: InitiatedExecutePromptResponse
|
17
|
+
|
18
|
+
def json(self, **kwargs: typing.Any) -> str:
|
19
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
20
|
+
return super().json(**kwargs_with_defaults)
|
21
|
+
|
22
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
23
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
24
|
+
return super().dict(**kwargs_with_defaults)
|
25
|
+
|
26
|
+
class Config:
|
27
|
+
frozen = True
|
28
|
+
smart_union = True
|
29
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -12,8 +12,8 @@ except ImportError:
|
|
12
12
|
|
13
13
|
|
14
14
|
class JsonExecutePromptResponse(pydantic.BaseModel):
|
15
|
-
value: typing.Dict[str, typing.Any]
|
16
15
|
execution_id: str
|
16
|
+
value: typing.Dict[str, typing.Any]
|
17
17
|
|
18
18
|
def json(self, **kwargs: typing.Any) -> str:
|
19
19
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import datetime as dt
|
4
|
+
import typing
|
5
|
+
|
6
|
+
from ..core.datetime_utils import serialize_datetime
|
7
|
+
from .vellum_error import VellumError
|
8
|
+
|
9
|
+
try:
|
10
|
+
import pydantic.v1 as pydantic # type: ignore
|
11
|
+
except ImportError:
|
12
|
+
import pydantic # type: ignore
|
13
|
+
|
14
|
+
|
15
|
+
class RejectedExecutePromptResponse(pydantic.BaseModel):
|
16
|
+
type: str
|
17
|
+
value: VellumError
|
18
|
+
execution_id: str
|
19
|
+
|
20
|
+
def json(self, **kwargs: typing.Any) -> str:
|
21
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
22
|
+
return super().json(**kwargs_with_defaults)
|
23
|
+
|
24
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
25
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
26
|
+
return super().dict(**kwargs_with_defaults)
|
27
|
+
|
28
|
+
class Config:
|
29
|
+
frozen = True
|
30
|
+
smart_union = True
|
31
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import datetime as dt
|
4
|
+
import typing
|
5
|
+
|
6
|
+
from ..core.datetime_utils import serialize_datetime
|
7
|
+
from .rejected_execute_prompt_response import RejectedExecutePromptResponse
|
8
|
+
|
9
|
+
try:
|
10
|
+
import pydantic.v1 as pydantic # type: ignore
|
11
|
+
except ImportError:
|
12
|
+
import pydantic # type: ignore
|
13
|
+
|
14
|
+
|
15
|
+
class RejectedExecutePromptStreamingResponse(pydantic.BaseModel):
|
16
|
+
data: RejectedExecutePromptResponse
|
17
|
+
|
18
|
+
def json(self, **kwargs: typing.Any) -> str:
|
19
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
20
|
+
return super().json(**kwargs_with_defaults)
|
21
|
+
|
22
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
23
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
24
|
+
return super().dict(**kwargs_with_defaults)
|
25
|
+
|
26
|
+
class Config:
|
27
|
+
frozen = True
|
28
|
+
smart_union = True
|
29
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import datetime as dt
|
4
|
+
import typing
|
5
|
+
|
6
|
+
from ..core.datetime_utils import serialize_datetime
|
7
|
+
from .execute_prompt_response import ExecutePromptResponse
|
8
|
+
|
9
|
+
try:
|
10
|
+
import pydantic.v1 as pydantic # type: ignore
|
11
|
+
except ImportError:
|
12
|
+
import pydantic # type: ignore
|
13
|
+
|
14
|
+
|
15
|
+
class StreamingExecutePromptStreamingResponse(pydantic.BaseModel):
|
16
|
+
data: ExecutePromptResponse
|
17
|
+
|
18
|
+
def json(self, **kwargs: typing.Any) -> str:
|
19
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
20
|
+
return super().json(**kwargs_with_defaults)
|
21
|
+
|
22
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
23
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
24
|
+
return super().dict(**kwargs_with_defaults)
|
25
|
+
|
26
|
+
class Config:
|
27
|
+
frozen = True
|
28
|
+
smart_union = True
|
29
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -12,8 +12,8 @@ except ImportError:
|
|
12
12
|
|
13
13
|
|
14
14
|
class StringExecutePromptResponse(pydantic.BaseModel):
|
15
|
-
value: str
|
16
15
|
execution_id: str
|
16
|
+
value: str
|
17
17
|
|
18
18
|
def json(self, **kwargs: typing.Any) -> str:
|
19
19
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -1,8 +1,8 @@
|
|
1
|
-
vellum/__init__.py,sha256=
|
2
|
-
vellum/client.py,sha256=
|
1
|
+
vellum/__init__.py,sha256=D6e2X48Z1TiPjYlFSzaTwFJt3otkyI3gQgi7WdQKGiI,17005
|
2
|
+
vellum/client.py,sha256=yIYh69Gfqw9tvq6leZcIj9-dU0jUOV2VPOWZgZ83a-U,43945
|
3
3
|
vellum/core/__init__.py,sha256=QJS3CJ2TYP2E1Tge0CS6Z7r8LTNzJHQVX1hD3558eP0,519
|
4
4
|
vellum/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
|
5
|
-
vellum/core/client_wrapper.py,sha256=
|
5
|
+
vellum/core/client_wrapper.py,sha256=JPcuDSpeK70W1OPKqReF9TukOWwvfSbckYsQtbeFQBE,1212
|
6
6
|
vellum/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
|
7
7
|
vellum/core/jsonable_encoder.py,sha256=MTYkDov2EryHgee4QM46uZiBOuOXK9KTHlBdBwU-CpU,3799
|
8
8
|
vellum/core/remove_none_from_dict.py,sha256=8m91FC3YuVem0Gm9_sXhJ2tGvP33owJJdrqCLEdowGw,330
|
@@ -16,20 +16,20 @@ vellum/errors/not_found_error.py,sha256=P65k-Lm2RuefAVSNLER5hH-4P99SGohKy2cOPSrI
|
|
16
16
|
vellum/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
17
17
|
vellum/resources/__init__.py,sha256=ceVGZa6cItlSHYeXoDUeCJuYVs73cUxghmL6MTL3Vp4,339
|
18
18
|
vellum/resources/deployments/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
19
|
-
vellum/resources/deployments/client.py,sha256=
|
19
|
+
vellum/resources/deployments/client.py,sha256=abtSfd_9XCrpOhxQ0kUWyDab9FRzGLTL-DZPWQP9Fr4,6625
|
20
20
|
vellum/resources/document_indexes/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
21
21
|
vellum/resources/document_indexes/client.py,sha256=O3kun7NPMNFhpEBovL0wryJUxlIf2qbVzkOvg6gCvdI,8231
|
22
22
|
vellum/resources/documents/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
23
23
|
vellum/resources/documents/client.py,sha256=lK41TE_cpTex8H-HT2WnXLPb7jSw3YA1DmanJIVs8xA,15550
|
24
24
|
vellum/resources/model_versions/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
25
|
-
vellum/resources/model_versions/client.py,sha256=
|
25
|
+
vellum/resources/model_versions/client.py,sha256=S7nsjdWVK61gpB0Lp1Dbmst5SIb3IVJ7WdkNlHEVKSQ,2645
|
26
26
|
vellum/resources/registered_prompts/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
27
27
|
vellum/resources/registered_prompts/client.py,sha256=2yzgJmV5SL_QgQFhVEMG5ykAMZS-qizKXYZEADaXXlk,9227
|
28
28
|
vellum/resources/sandboxes/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
29
29
|
vellum/resources/sandboxes/client.py,sha256=RkMHXuNGblYEMDdbUeFHzJDGEIxJd9HGiThXUbR1MNg,8201
|
30
30
|
vellum/resources/test_suites/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
31
31
|
vellum/resources/test_suites/client.py,sha256=TW8piGrmeEqYmMeWtuOyj2lH5_erQ1WVMmDcCOuGdG8,8586
|
32
|
-
vellum/types/__init__.py,sha256=
|
32
|
+
vellum/types/__init__.py,sha256=62Nm3XMpxJFSxEE-DhhF00K8ThjoDPZ0I7893M5woCk,23046
|
33
33
|
vellum/types/api_node_result.py,sha256=1zAcNznjyVkTQM2V--UE1lYFzRWbYEogoChZBGcsliE,936
|
34
34
|
vellum/types/api_node_result_data.py,sha256=HvpZaAKYXsoBOnobACIYCmIdxbRc7Zp-ibIohiz_Nzc,1125
|
35
35
|
vellum/types/block_type_enum.py,sha256=BQ8ZN1OKhOdmHeQ3-bhMfkLLohirsNhHPljBJX8Bbmo,1051
|
@@ -39,7 +39,8 @@ vellum/types/chat_message_request.py,sha256=9wgnG0Q36jUNTr7vS0FASRFrsXzgIccrjNiC
|
|
39
39
|
vellum/types/chat_message_role.py,sha256=VscYXloHNYjiThf7g6OsMxO0S8p0ZUa0G6sakaWhc1g,914
|
40
40
|
vellum/types/conditional_node_result.py,sha256=u2Rx3LOY0rNwdSb6vZnOmMRcDvl83uKXccVQv2kzS7g,968
|
41
41
|
vellum/types/conditional_node_result_data.py,sha256=IT6PnM2N4q8JJ4srk9ushri4GnCvxMz9VuEcbhmo_rs,911
|
42
|
-
vellum/types/
|
42
|
+
vellum/types/deployment_provider_payload_response.py,sha256=R8X-oE1hydzE4qgLO0HS6NwlW157if4ecCPJPCLyPHY,918
|
43
|
+
vellum/types/deployment_read.py,sha256=FQmnDqpdKxCrKGCaMyIfCZyUXfpG62HFOWRgpBgQeGs,2110
|
43
44
|
vellum/types/deployment_status.py,sha256=rtsRFv9cx0kEwNYkgscGzo62bvaNME-rU8ZxFlcY0M8,761
|
44
45
|
vellum/types/document_document_to_document_index.py,sha256=So0eaa9uQd_vrbnpQD_wV7YJS0YQY3AH_91asYpYv_g,1634
|
45
46
|
vellum/types/document_index_read.py,sha256=PuGRQTrzpQjs4d-ObBe5glzKNlgpJR3Hr5OGEannHak,1889
|
@@ -48,13 +49,16 @@ vellum/types/document_read.py,sha256=aeAwY8-Si0nT2Ifh1J9ChLaNFJaker1jlfbJkuoA-xc
|
|
48
49
|
vellum/types/document_status.py,sha256=dkotle2rykOxF1QxqcM8af2ORzmFjZR5a7pHXP6SjDQ,144
|
49
50
|
vellum/types/enriched_normalized_completion.py,sha256=z3MzEF7T-JcyTQRNlZlnB9GpFcLFo0gy-hF3LYW7Pfg,2135
|
50
51
|
vellum/types/environment_enum.py,sha256=16gr0xkzNIO5dhrOnJNjcQ34z9Xk1oE-egW17P0RWDs,799
|
51
|
-
vellum/types/error_execute_prompt_response.py,sha256=
|
52
|
+
vellum/types/error_execute_prompt_response.py,sha256=WKGFWwYe-3voDJ201StQg_znLR5LV0Vreg1Iml2sUig,952
|
52
53
|
vellum/types/evaluation_params.py,sha256=Ey-RgV4uKVv8G4Dj6lmX_qiBsLcPo1NmoY2xcFW_qDQ,1048
|
53
54
|
vellum/types/evaluation_params_request.py,sha256=izDbrQHT7QFYjxXX9bkeZnoCle3teShaodbnV_11sJo,1055
|
54
55
|
vellum/types/execute_prompt_api_error_response.py,sha256=f0peA0yIyF1dqh2PclsVEaiCCoLK73KEwYq32cj82Nw,958
|
56
|
+
vellum/types/execute_prompt_request.py,sha256=q50zgx3KB_eb1biQhHgEpKyCGDszBMRhJWNkF04xrBE,1570
|
55
57
|
vellum/types/execute_prompt_response.py,sha256=XjY80wf3-_zZQp4BeEP4OzedkEPzhLCr3pSJZ3vv-qo,1156
|
58
|
+
vellum/types/execute_prompt_streaming_response.py,sha256=a8jAsI0rBhqlvDpDhzShMvtsK-fNK3oJ7LY3bk3Edgo,1779
|
56
59
|
vellum/types/execute_workflow_stream_error_response.py,sha256=WHSu333maVV2Nbxs43QCxlW6wjbkPdm-97DP1tzglAA,963
|
57
60
|
vellum/types/finish_reason_enum.py,sha256=JawC1tsGIUCwfGoIjrnD2c4wmbsO5Dx39WPAbwYIWm0,726
|
61
|
+
vellum/types/fulfilled_execute_prompt_streaming_response.py,sha256=OjN_FNpm1ygCAormfD54SuVGh4WPpzY-PWLFn1T8BbM,973
|
58
62
|
vellum/types/generate_error_response.py,sha256=auz4NPbyceabCe0eN89lavEwotWbqsTSbkJtI_lgXJs,950
|
59
63
|
vellum/types/generate_options_request.py,sha256=9W8wAC79BB1lu9bJjWm0Wwco7FiB6wZYvRDYWZbV_Tg,1117
|
60
64
|
vellum/types/generate_request.py,sha256=Wf5j8TIhLqPwwJJz63TiMNty2cvnJI9xVmUKtWlJIpQ,1581
|
@@ -66,7 +70,9 @@ vellum/types/generate_stream_response.py,sha256=mbaw11ScmPmSgih02qE2pLDN0fjILc3L
|
|
66
70
|
vellum/types/generate_stream_result.py,sha256=NevSf70_mbODDRPnauYobl41PNbPVcNKyWTe2gg-lxI,1107
|
67
71
|
vellum/types/generate_stream_result_data.py,sha256=lyAvxY714Zo5W1i4WkuIbKjyP3rLGJAQ_pL2jkDL7Pg,1011
|
68
72
|
vellum/types/indexing_state_enum.py,sha256=7eEvjuZi3dy6XJIYhHgca4XfRDqntaoYTFOOl9AXe78,1181
|
69
|
-
vellum/types/
|
73
|
+
vellum/types/initiated_execute_prompt_response.py,sha256=aODjQByWjOgOEWcffzHGdUxWAQZEMqbQvbn7isI032A,977
|
74
|
+
vellum/types/initiated_execute_prompt_streaming_response.py,sha256=tNezi3r94E19wg4LJp2OYAaScIN0XjjnIuwYvHyBVgU,1001
|
75
|
+
vellum/types/json_execute_prompt_response.py,sha256=JN_lyuNWaQP9aHV_SkSzEt-cRbuRb7KganXkiw3lkbI,930
|
70
76
|
vellum/types/json_input_request.py,sha256=x3aGIGpjqG8aPxRWfneeWalR2mOdQJKlviF72URrnMg,996
|
71
77
|
vellum/types/logical_operator.py,sha256=4AVyWKNKyL8NxaqUKdS8hV7nfRpUlItKDNdC_hkJU9E,4282
|
72
78
|
vellum/types/logprobs_enum.py,sha256=v3VTlzw1bpuU0hBhcWJTN7JMBS2nWqwertJlaCgxmuY,490
|
@@ -111,6 +117,8 @@ vellum/types/registered_prompt_input_variable_request.py,sha256=rbqQnjUtP2_J3axz
|
|
111
117
|
vellum/types/registered_prompt_model_version.py,sha256=g1HQfGIucvXJ0E0xAZiE5rnvkFp8DMpe3MPCYbxHTSo,1057
|
112
118
|
vellum/types/registered_prompt_sandbox.py,sha256=TMVbdnTEoSBvabGQ9ZZqMSDNxjK4iXLaQrZciytWazc,1040
|
113
119
|
vellum/types/registered_prompt_sandbox_snapshot.py,sha256=Dv4sY70rvdLtyKi8oN2mWwHmHZIHEcdN0v32ULxD67A,960
|
120
|
+
vellum/types/rejected_execute_prompt_response.py,sha256=_SdbOPXsPiQMRYAGQgBIdP6fmKYSxhtb56LmjLPEAaI,969
|
121
|
+
vellum/types/rejected_execute_prompt_streaming_response.py,sha256=hm48IfCMHandLwfiugItBLHuNVeD4LU-UaTF2ELkM3c,997
|
114
122
|
vellum/types/sandbox_metric_input_params.py,sha256=WPrqAWggrSvu9syP2Fk4SGj08YvV55oF9dD6Cb40gjE,961
|
115
123
|
vellum/types/sandbox_metric_input_params_request.py,sha256=UbTt4QimyaoYjzhWNggpFL7SlYLgKqZ4i6_skWzAo2I,990
|
116
124
|
vellum/types/sandbox_scenario.py,sha256=mGidLY1jAdw7BSMbeXTc-PtiZLSQS4peOiJmxL8YxqQ,1214
|
@@ -130,7 +138,8 @@ vellum/types/search_result_merging_request.py,sha256=lLgp8q1WwvdUJcR1YWpLRjmZ3Sg
|
|
130
138
|
vellum/types/search_result_request.py,sha256=SMjICHnxr3l8-KCe7ftWMZiKPdlvdMAPZd4zRXNxpQ8,1335
|
131
139
|
vellum/types/search_weights_request.py,sha256=guPgN3N0b5Mg0sIpw8ts80iBOT_nUsRNZqjDMKJIphI,1117
|
132
140
|
vellum/types/slim_document.py,sha256=-wzURGcLcnoh5vdTlbtkPLKfP3yAShdkkK6AIIi6W48,3074
|
133
|
-
vellum/types/
|
141
|
+
vellum/types/streaming_execute_prompt_streaming_response.py,sha256=fzXYdZeMSzhAcxigXOSQksrw80ItRibEitKYOrtLnmc,973
|
142
|
+
vellum/types/string_execute_prompt_response.py,sha256=yDttrw8xZ7bKQhKKFAAub30orAUmxjPqHDLaHeYPZTI,907
|
134
143
|
vellum/types/string_input_request.py,sha256=aUzb_zuLK9G7tHBRHVWCJD4o-UbcVcMVtIrgAoES8dw,973
|
135
144
|
vellum/types/submit_completion_actual_request.py,sha256=krKZefK_-0LAEJYIKilUemEwc6v0RELpusQvyj1XUJQ,1787
|
136
145
|
vellum/types/submit_completion_actuals_error_response.py,sha256=AJTkBM60F8rxGKXfz0TcjdP5v_OgRnF3zUrDG1CtNDo,895
|
@@ -199,6 +208,6 @@ vellum/types/workflow_result_event_output_data_number.py,sha256=zWtQor27iaDDHmY5
|
|
199
208
|
vellum/types/workflow_result_event_output_data_search_results.py,sha256=frCaJ5kWrIqCeV-waBNfd7rO4fqWe5aYpSI8PM4-oRw,1323
|
200
209
|
vellum/types/workflow_result_event_output_data_string.py,sha256=TByZxyQh9ci4UIdEmoEi_JK1U_JwYCnVZeB_4kGuXKM,1405
|
201
210
|
vellum/types/workflow_stream_event.py,sha256=OQUSzwoM-OCfWxNzeOVVLsjCue_WWqin3tGMtwvp_rc,873
|
202
|
-
vellum_ai-0.1.
|
203
|
-
vellum_ai-0.1.
|
204
|
-
vellum_ai-0.1.
|
211
|
+
vellum_ai-0.1.7.dist-info/METADATA,sha256=xJmftveWGDpOAuA4fzAH2woeebCq8AkOHEC0gfL32U0,3486
|
212
|
+
vellum_ai-0.1.7.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
213
|
+
vellum_ai-0.1.7.dist-info/RECORD,,
|
File without changes
|