vellum-ai 0.13.12__py3-none-any.whl → 0.13.14__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/client/core/client_wrapper.py +1 -1
- vellum/client/resources/documents/client.py +10 -0
- vellum/workflows/environment/environment.py +4 -2
- vellum/workflows/events/tests/test_event.py +7 -0
- vellum/workflows/references/environment_variable.py +6 -2
- vellum/workflows/types/core.py +3 -4
- {vellum_ai-0.13.12.dist-info → vellum_ai-0.13.14.dist-info}/METADATA +1 -1
- {vellum_ai-0.13.12.dist-info → vellum_ai-0.13.14.dist-info}/RECORD +11 -11
- {vellum_ai-0.13.12.dist-info → vellum_ai-0.13.14.dist-info}/LICENSE +0 -0
- {vellum_ai-0.13.12.dist-info → vellum_ai-0.13.14.dist-info}/WHEEL +0 -0
- {vellum_ai-0.13.12.dist-info → vellum_ai-0.13.14.dist-info}/entry_points.txt +0 -0
@@ -18,7 +18,7 @@ class BaseClientWrapper:
|
|
18
18
|
headers: typing.Dict[str, str] = {
|
19
19
|
"X-Fern-Language": "Python",
|
20
20
|
"X-Fern-SDK-Name": "vellum-ai",
|
21
|
-
"X-Fern-SDK-Version": "0.13.
|
21
|
+
"X-Fern-SDK-Version": "0.13.13",
|
22
22
|
}
|
23
23
|
headers["X_API_KEY"] = self.api_key
|
24
24
|
return headers
|
@@ -32,6 +32,7 @@ class DocumentsClient:
|
|
32
32
|
limit: typing.Optional[int] = None,
|
33
33
|
offset: typing.Optional[int] = None,
|
34
34
|
ordering: typing.Optional[str] = None,
|
35
|
+
search: typing.Optional[str] = None,
|
35
36
|
request_options: typing.Optional[RequestOptions] = None,
|
36
37
|
) -> PaginatedSlimDocumentList:
|
37
38
|
"""
|
@@ -51,6 +52,9 @@ class DocumentsClient:
|
|
51
52
|
ordering : typing.Optional[str]
|
52
53
|
Which field to use when ordering the results.
|
53
54
|
|
55
|
+
search : typing.Optional[str]
|
56
|
+
A search term.
|
57
|
+
|
54
58
|
request_options : typing.Optional[RequestOptions]
|
55
59
|
Request-specific configuration.
|
56
60
|
|
@@ -77,6 +81,7 @@ class DocumentsClient:
|
|
77
81
|
"limit": limit,
|
78
82
|
"offset": offset,
|
79
83
|
"ordering": ordering,
|
84
|
+
"search": search,
|
80
85
|
},
|
81
86
|
request_options=request_options,
|
82
87
|
)
|
@@ -392,6 +397,7 @@ class AsyncDocumentsClient:
|
|
392
397
|
limit: typing.Optional[int] = None,
|
393
398
|
offset: typing.Optional[int] = None,
|
394
399
|
ordering: typing.Optional[str] = None,
|
400
|
+
search: typing.Optional[str] = None,
|
395
401
|
request_options: typing.Optional[RequestOptions] = None,
|
396
402
|
) -> PaginatedSlimDocumentList:
|
397
403
|
"""
|
@@ -411,6 +417,9 @@ class AsyncDocumentsClient:
|
|
411
417
|
ordering : typing.Optional[str]
|
412
418
|
Which field to use when ordering the results.
|
413
419
|
|
420
|
+
search : typing.Optional[str]
|
421
|
+
A search term.
|
422
|
+
|
414
423
|
request_options : typing.Optional[RequestOptions]
|
415
424
|
Request-specific configuration.
|
416
425
|
|
@@ -445,6 +454,7 @@ class AsyncDocumentsClient:
|
|
445
454
|
"limit": limit,
|
446
455
|
"offset": offset,
|
447
456
|
"ordering": ordering,
|
457
|
+
"search": search,
|
448
458
|
},
|
449
459
|
request_options=request_options,
|
450
460
|
)
|
@@ -1,7 +1,9 @@
|
|
1
|
+
from typing import Optional
|
2
|
+
|
1
3
|
from vellum.workflows.references import EnvironmentVariableReference
|
2
4
|
|
3
5
|
|
4
6
|
class Environment:
|
5
7
|
@staticmethod
|
6
|
-
def get(name: str) -> EnvironmentVariableReference:
|
7
|
-
return EnvironmentVariableReference(name=name)
|
8
|
+
def get(name: str, default: Optional[str] = None) -> EnvironmentVariableReference:
|
9
|
+
return EnvironmentVariableReference(name=name, default=default)
|
@@ -27,7 +27,9 @@ from vellum.workflows.events.workflow import (
|
|
27
27
|
from vellum.workflows.inputs.base import BaseInputs
|
28
28
|
from vellum.workflows.nodes.bases.base import BaseNode
|
29
29
|
from vellum.workflows.outputs.base import BaseOutput
|
30
|
+
from vellum.workflows.references.vellum_secret import VellumSecretReference
|
30
31
|
from vellum.workflows.state.base import BaseState
|
32
|
+
from vellum.workflows.types.core import VellumSecret
|
31
33
|
from vellum.workflows.utils.uuids import uuid4_from_hash
|
32
34
|
from vellum.workflows.workflows.base import BaseWorkflow
|
33
35
|
|
@@ -38,6 +40,7 @@ class MockInputs(BaseInputs):
|
|
38
40
|
|
39
41
|
class MockNode(BaseNode):
|
40
42
|
node_foo = MockInputs.foo
|
43
|
+
node_secret = VellumSecretReference("secret")
|
41
44
|
|
42
45
|
class Outputs(BaseNode.Outputs):
|
43
46
|
example: str
|
@@ -97,6 +100,7 @@ mock_node_uuid = str(uuid4_from_hash(MockNode.__qualname__))
|
|
97
100
|
node_definition=MockNode,
|
98
101
|
inputs={
|
99
102
|
MockNode.node_foo: "bar",
|
103
|
+
MockNode.node_secret: VellumSecret(name="secret"),
|
100
104
|
},
|
101
105
|
),
|
102
106
|
parent=NodeParentContext(
|
@@ -123,6 +127,9 @@ mock_node_uuid = str(uuid4_from_hash(MockNode.__qualname__))
|
|
123
127
|
},
|
124
128
|
"inputs": {
|
125
129
|
"node_foo": "bar",
|
130
|
+
"node_secret": {
|
131
|
+
"name": "secret",
|
132
|
+
},
|
126
133
|
},
|
127
134
|
},
|
128
135
|
"parent": {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import os
|
2
|
-
from typing import TYPE_CHECKING
|
2
|
+
from typing import TYPE_CHECKING, Optional
|
3
3
|
|
4
4
|
from vellum.workflows.descriptors.base import BaseDescriptor
|
5
5
|
|
@@ -8,13 +8,17 @@ if TYPE_CHECKING:
|
|
8
8
|
|
9
9
|
|
10
10
|
class EnvironmentVariableReference(BaseDescriptor[str]):
|
11
|
-
def __init__(self, *, name: str
|
11
|
+
def __init__(self, *, name: str, default: Optional[str]):
|
12
12
|
super().__init__(name=name, types=(str,))
|
13
|
+
self._default = default
|
13
14
|
|
14
15
|
def resolve(self, state: "BaseState") -> str:
|
15
16
|
env_value = os.environ.get(self.name)
|
16
17
|
if env_value is not None:
|
17
18
|
return env_value
|
18
19
|
|
20
|
+
if self._default is not None:
|
21
|
+
return self._default
|
22
|
+
|
19
23
|
# Fetch Vellum Environment Variable named `self.name` once that project is done
|
20
24
|
raise ValueError(f"No environment variable named '{self.name}' found")
|
vellum/workflows/types/core.py
CHANGED
@@ -9,6 +9,8 @@ from typing import ( # type: ignore[attr-defined]
|
|
9
9
|
_UnionGenericAlias,
|
10
10
|
)
|
11
11
|
|
12
|
+
from vellum.client.core.pydantic_utilities import UniversalBaseModel
|
13
|
+
|
12
14
|
JsonArray = List["Json"]
|
13
15
|
JsonObject = Dict[str, "Json"]
|
14
16
|
Json = Union[None, bool, int, float, str, JsonArray, JsonObject]
|
@@ -20,12 +22,9 @@ SpecialGenericAlias = _SpecialGenericAlias
|
|
20
22
|
UnionGenericAlias = _UnionGenericAlias
|
21
23
|
|
22
24
|
|
23
|
-
class VellumSecret:
|
25
|
+
class VellumSecret(UniversalBaseModel):
|
24
26
|
name: str
|
25
27
|
|
26
|
-
def __init__(self, name: str):
|
27
|
-
self.name = name
|
28
|
-
|
29
28
|
|
30
29
|
EntityInputsInterface = Dict[str, Any]
|
31
30
|
|
@@ -112,7 +112,7 @@ vellum/client/README.md,sha256=JkCJjmMZl4jrPj46pkmL9dpK4gSzQQmP5I7z4aME4LY,4749
|
|
112
112
|
vellum/client/__init__.py,sha256=8nZt88C9SVwWanjLbIQMU3rzb32h5UZfFMBx3VPHB50,111887
|
113
113
|
vellum/client/core/__init__.py,sha256=SQ85PF84B9MuKnBwHNHWemSGuy-g_515gFYNFhvEE0I,1438
|
114
114
|
vellum/client/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
|
115
|
-
vellum/client/core/client_wrapper.py,sha256=
|
115
|
+
vellum/client/core/client_wrapper.py,sha256=WBZxe9jwGagoDy-B3qFt1xxFJYUu4kED2-27248SBsQ,1869
|
116
116
|
vellum/client/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
|
117
117
|
vellum/client/core/file.py,sha256=X9IbmkZmB2bB_DpmZAO3crWdXagOakAyn6UCOCImCPg,2322
|
118
118
|
vellum/client/core/http_client.py,sha256=R0pQpCppnEtxccGvXl4uJ76s7ro_65Fo_erlNNLp_AI,19228
|
@@ -143,7 +143,7 @@ vellum/client/resources/document_indexes/client.py,sha256=1kp5I8DC4UPvjlWsocuaNh
|
|
143
143
|
vellum/client/resources/document_indexes/types/__init__.py,sha256=IoFqKHN_VBdEhC7VL8_6Jbatrn0e0zuYEJAJUahcUR0,196
|
144
144
|
vellum/client/resources/document_indexes/types/document_indexes_list_request_status.py,sha256=sfUEB0cvOSmlE2iITqnMVyHv05Zy2fWP4QjCIYqMg0M,178
|
145
145
|
vellum/client/resources/documents/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
146
|
-
vellum/client/resources/documents/client.py,sha256=
|
146
|
+
vellum/client/resources/documents/client.py,sha256=V2OREx-YVxQxGgC_84QQGCUmW3QveOgLB2SEhUGPde4,27864
|
147
147
|
vellum/client/resources/folder_entities/__init__.py,sha256=QOp7UMMB3a32GrfVaud35ECn4fqPBKXxCyClsDgd6GE,175
|
148
148
|
vellum/client/resources/folder_entities/client.py,sha256=ep5dnfJmEuEyrOSUftEVwKaeXrg1DENEDjO4_nw9yq0,11114
|
149
149
|
vellum/client/resources/folder_entities/types/__init__.py,sha256=cHabrupjC-HL3kj-UZ9WdVzqHoQHCu6QsLFB3wlOs7k,212
|
@@ -1258,13 +1258,13 @@ vellum/workflows/edges/edge.py,sha256=N0SnY3gKVuxImPAdCbPMPlHJIXbkQ3fwq_LbJRvVMF
|
|
1258
1258
|
vellum/workflows/emitters/__init__.py,sha256=YyOgaoLtVW8eFNEWODzCYb0HzL0PoSeNRf4diJ1Y0dk,80
|
1259
1259
|
vellum/workflows/emitters/base.py,sha256=D5SADKIvnbgKwIBgYm77jaqvpo1o0rz4MmuX_muRqQU,359
|
1260
1260
|
vellum/workflows/environment/__init__.py,sha256=wGHslgSEZ7Octe4C-hNtl84EFelNimgmWQoi7px4-uw,71
|
1261
|
-
vellum/workflows/environment/environment.py,sha256=
|
1261
|
+
vellum/workflows/environment/environment.py,sha256=0XhJPBs8YASWmvPx8bkSdCvcbDmzpe9stfs2kgtNDRU,296
|
1262
1262
|
vellum/workflows/errors/__init__.py,sha256=tWGPu5xyAU8gRb8_bl0fL7OfU3wxQ9UH6qVwy4X4P_Q,113
|
1263
1263
|
vellum/workflows/errors/types.py,sha256=-Ls41oM4HN28b78Ou13FoZnaWRuaxBgTarKgSoBlCKc,3413
|
1264
1264
|
vellum/workflows/events/__init__.py,sha256=6pxxceJo2dcaRkWtkDAYlUQZ-PHBQSZytIoyuUK48Qw,759
|
1265
1265
|
vellum/workflows/events/node.py,sha256=uHT6If0esgZ3nLjrjmUPTKf3qbjGhoV_x5YKpjDBDcU,5280
|
1266
1266
|
vellum/workflows/events/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
1267
|
-
vellum/workflows/events/tests/test_event.py,sha256=
|
1267
|
+
vellum/workflows/events/tests/test_event.py,sha256=9rbp92dQXpGFad-LjE2nYU17neKkiHxQz9X8RsoCWs4,13718
|
1268
1268
|
vellum/workflows/events/types.py,sha256=cjRE8WL8tYCFradd9NOGl_H0mN3LiWWnA1uHmyT2Q0Q,3412
|
1269
1269
|
vellum/workflows/events/workflow.py,sha256=l5tXes0sg7iWaA1ZUE5dtAqNnGQ8iy6trVbOU9meu7U,5240
|
1270
1270
|
vellum/workflows/exceptions.py,sha256=l-FLGvXywxg6ivolCts71b8pcsYAWoB1cmUR4Jx7N8g,614
|
@@ -1395,7 +1395,7 @@ vellum/workflows/ports/port.py,sha256=rc3GB7dDQCUs0IbY08a92-31YzJHQgBeww13brSJ2J
|
|
1395
1395
|
vellum/workflows/ports/utils.py,sha256=pEjVNJKw9LhD_cFN-o0MWBOW2ejno7jv26qqzjLxwS4,1662
|
1396
1396
|
vellum/workflows/references/__init__.py,sha256=glHFC1VfXmcbNvH5VzFbkT03d8_D7MMcvEcsUBrzLIs,591
|
1397
1397
|
vellum/workflows/references/constant.py,sha256=6yUT4q1sMj1hkI_tzzQ9AYcmeeDYFUNCqUq_W2DN0S8,540
|
1398
|
-
vellum/workflows/references/environment_variable.py,sha256
|
1398
|
+
vellum/workflows/references/environment_variable.py,sha256=-gfOcdYwVp9ztSUYz6h2WI2Cg95zqxq5hhFf3Yr7aQg,791
|
1399
1399
|
vellum/workflows/references/execution_count.py,sha256=JILHqt8ELdc9ct-WsVCA5X-rKiP1rmJODw-XTf4kpHI,722
|
1400
1400
|
vellum/workflows/references/external_input.py,sha256=XHugauKYvAmsGoFnjgJh00FcXjSMIqBvRun_CZuJD64,1662
|
1401
1401
|
vellum/workflows/references/input.py,sha256=3INu-TLTi4dziWmva6LO3WvgDlPzsjayUx61cVvqLJA,325
|
@@ -1420,7 +1420,7 @@ vellum/workflows/state/tests/test_state.py,sha256=7ap_Z9GJqyonZ1eVXwNyyuhV0AL5Xi
|
|
1420
1420
|
vellum/workflows/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
1421
1421
|
vellum/workflows/tests/test_sandbox.py,sha256=JKwaluI-lODQo7Ek9sjDstjL_WTdSqUlVik6ZVTfVOA,1826
|
1422
1422
|
vellum/workflows/types/__init__.py,sha256=KxUTMBGzuRCfiMqzzsykOeVvrrkaZmTTo1a7SLu8gRM,68
|
1423
|
-
vellum/workflows/types/core.py,sha256=
|
1423
|
+
vellum/workflows/types/core.py,sha256=kMQremh_I8egXpiKmtMQbB6e3OczAWiRnnTq5V6xlD0,928
|
1424
1424
|
vellum/workflows/types/cycle_map.py,sha256=-ZMQsKzZBpCi0bchJrkuN_dtCFuz9uFABy7Fq2PI58E,928
|
1425
1425
|
vellum/workflows/types/generics.py,sha256=ZkfoRhWs042i5IjA99v2wIhmh1u-Wieo3LzosgGWJVk,600
|
1426
1426
|
vellum/workflows/types/stack.py,sha256=RDSGLkcV612ge8UuAH9TZiEGXxJt0Av2-H5rfzrTVVI,1014
|
@@ -1441,8 +1441,8 @@ vellum/workflows/vellum_client.py,sha256=ODrq_TSl-drX2aezXegf7pizpWDVJuTXH-j6528
|
|
1441
1441
|
vellum/workflows/workflows/__init__.py,sha256=KY45TqvavCCvXIkyCFMEc0dc6jTMOUci93U2DUrlZYc,66
|
1442
1442
|
vellum/workflows/workflows/base.py,sha256=k0kUWWko4fHyCqLSU_1cBK_pXZpl9MXekWiG-bdOAo0,18353
|
1443
1443
|
vellum/workflows/workflows/event_filters.py,sha256=GSxIgwrX26a1Smfd-6yss2abGCnadGsrSZGa7t7LpJA,2008
|
1444
|
-
vellum_ai-0.13.
|
1445
|
-
vellum_ai-0.13.
|
1446
|
-
vellum_ai-0.13.
|
1447
|
-
vellum_ai-0.13.
|
1448
|
-
vellum_ai-0.13.
|
1444
|
+
vellum_ai-0.13.14.dist-info/LICENSE,sha256=hOypcdt481qGNISA784bnAGWAE6tyIf9gc2E78mYC3E,1574
|
1445
|
+
vellum_ai-0.13.14.dist-info/METADATA,sha256=-XRE0gS6VYSqoJt7wrYK1LcXz99LGaGwgY-9L7THqsg,5335
|
1446
|
+
vellum_ai-0.13.14.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
1447
|
+
vellum_ai-0.13.14.dist-info/entry_points.txt,sha256=HCH4yc_V3J_nDv3qJzZ_nYS8llCHZViCDP1ejgCc5Ak,42
|
1448
|
+
vellum_ai-0.13.14.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|