vellum-ai 0.13.6__py3-none-any.whl → 0.13.8__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/workflows/nodes/displayable/bases/types.py +1 -1
- vellum/workflows/nodes/displayable/search_node/tests/test_node.py +12 -2
- {vellum_ai-0.13.6.dist-info → vellum_ai-0.13.8.dist-info}/METADATA +1 -1
- {vellum_ai-0.13.6.dist-info → vellum_ai-0.13.8.dist-info}/RECORD +12 -12
- vellum_ee/workflows/display/nodes/vellum/base_node.py +19 -5
- vellum_ee/workflows/display/nodes/vellum/conditional_node.py +15 -1
- vellum_ee/workflows/display/nodes/vellum/search_node.py +2 -1
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_search_node_serialization.py +6 -1
- {vellum_ai-0.13.6.dist-info → vellum_ai-0.13.8.dist-info}/LICENSE +0 -0
- {vellum_ai-0.13.6.dist-info → vellum_ai-0.13.8.dist-info}/WHEEL +0 -0
- {vellum_ai-0.13.6.dist-info → vellum_ai-0.13.8.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.8",
|
22
22
|
}
|
23
23
|
headers["X_API_KEY"] = self.api_key
|
24
24
|
return headers
|
@@ -24,7 +24,7 @@ class MetadataLogicalConditionGroup(UniversalBaseModel):
|
|
24
24
|
class MetadataLogicalCondition(UniversalBaseModel):
|
25
25
|
lhs_variable: Any
|
26
26
|
operator: LogicalOperator
|
27
|
-
rhs_variable: Any
|
27
|
+
rhs_variable: Any = None
|
28
28
|
|
29
29
|
def to_request(self) -> VellumValueLogicalConditionRequest:
|
30
30
|
return VellumValueLogicalConditionRequest(
|
@@ -1,4 +1,5 @@
|
|
1
1
|
from vellum import SearchResponse, SearchResult, SearchResultDocument
|
2
|
+
from vellum.client.types.json_vellum_value_request import JsonVellumValueRequest
|
2
3
|
from vellum.client.types.search_filters_request import SearchFiltersRequest
|
3
4
|
from vellum.client.types.search_request_options_request import SearchRequestOptionsRequest
|
4
5
|
from vellum.client.types.search_result_merging_request import SearchResultMergingRequest
|
@@ -39,7 +40,11 @@ def test_run_workflow__happy_path(vellum_client):
|
|
39
40
|
lhs_variable="TYPE",
|
40
41
|
operator="=",
|
41
42
|
rhs_variable="COMPANY",
|
42
|
-
)
|
43
|
+
),
|
44
|
+
MetadataLogicalCondition(
|
45
|
+
lhs_variable="NAME",
|
46
|
+
operator="notNull",
|
47
|
+
),
|
43
48
|
],
|
44
49
|
),
|
45
50
|
)
|
@@ -81,7 +86,12 @@ def test_run_workflow__happy_path(vellum_client):
|
|
81
86
|
lhs_variable=StringVellumValueRequest(value="TYPE"),
|
82
87
|
operator="=",
|
83
88
|
rhs_variable=StringVellumValueRequest(value="COMPANY"),
|
84
|
-
)
|
89
|
+
),
|
90
|
+
VellumValueLogicalConditionRequest(
|
91
|
+
lhs_variable=StringVellumValueRequest(value="NAME"),
|
92
|
+
operator="notNull",
|
93
|
+
rhs_variable=JsonVellumValueRequest(value=None),
|
94
|
+
),
|
85
95
|
],
|
86
96
|
),
|
87
97
|
),
|
@@ -30,9 +30,9 @@ vellum_ee/workflows/display/nodes/types.py,sha256=St1BB6no528OyELGiyRabWao0GGw6m
|
|
30
30
|
vellum_ee/workflows/display/nodes/utils.py,sha256=sloya5TpXsnot1HURc9L51INwflRqUzHxRVnCS9Cd-4,973
|
31
31
|
vellum_ee/workflows/display/nodes/vellum/__init__.py,sha256=_raKY9eKi_OvIFn6nGvf9xKSboKtYLHCWaWCwDQFbOc,1567
|
32
32
|
vellum_ee/workflows/display/nodes/vellum/api_node.py,sha256=hoV-cUtS6H9kmRQXHd2py95GRWI_dAnnaPwvlNBkDOQ,8571
|
33
|
-
vellum_ee/workflows/display/nodes/vellum/base_node.py,sha256=
|
33
|
+
vellum_ee/workflows/display/nodes/vellum/base_node.py,sha256=mZSeZpolPZg1OEe3xsLbAiYT9aTSfdw0LhiUsHNBRXY,8029
|
34
34
|
vellum_ee/workflows/display/nodes/vellum/code_execution_node.py,sha256=z00Z3L0d4PsUQo4S8FRDTtOFLtjdi17TJbatNVF4nM8,4288
|
35
|
-
vellum_ee/workflows/display/nodes/vellum/conditional_node.py,sha256=
|
35
|
+
vellum_ee/workflows/display/nodes/vellum/conditional_node.py,sha256=XynMt1dt1qAlDFYYNYNDAfItYBUEGWYjQl2oEgcMEW0,11052
|
36
36
|
vellum_ee/workflows/display/nodes/vellum/error_node.py,sha256=Tyx74dUmj_ef0slptoUXHtkjLbNd3f4hXeoEozFaFcw,2023
|
37
37
|
vellum_ee/workflows/display/nodes/vellum/final_output_node.py,sha256=p-PvlnxpBQ7IKskZi2A19jKAtKnSxJ8LPbGMA83VkFk,2805
|
38
38
|
vellum_ee/workflows/display/nodes/vellum/guardrail_node.py,sha256=aYZSJTxknU4LMiQdWk9LcK6CkhdozeDEMiRxfAyUNEc,2202
|
@@ -42,7 +42,7 @@ vellum_ee/workflows/display/nodes/vellum/map_node.py,sha256=VlO3UwkspCOdDQ-h3v8k
|
|
42
42
|
vellum_ee/workflows/display/nodes/vellum/merge_node.py,sha256=HkNMgdQELiON42jdO-xDLmqrEKdGx1RVqrz2DXNTLS8,3239
|
43
43
|
vellum_ee/workflows/display/nodes/vellum/note_node.py,sha256=TMb8txILu2uWjzoxaghjgjlzeBAgzn4vkP_8zSh2qoE,1151
|
44
44
|
vellum_ee/workflows/display/nodes/vellum/prompt_deployment_node.py,sha256=LFjLUrH6sJ4czPnExdRqFr0PB_yKBMLXLvK5GAzIAgc,3273
|
45
|
-
vellum_ee/workflows/display/nodes/vellum/search_node.py,sha256=
|
45
|
+
vellum_ee/workflows/display/nodes/vellum/search_node.py,sha256=TxcAGZDl_hvJ7Y1hUi9YVEVrj9Ie0hKkASdpfRL4_cs,9227
|
46
46
|
vellum_ee/workflows/display/nodes/vellum/subworkflow_deployment_node.py,sha256=lfevlHpGEX14dEDym6qmnkw3nvzQPTB1_D2ch12B_Rk,2701
|
47
47
|
vellum_ee/workflows/display/nodes/vellum/templating_node.py,sha256=JVIMPR3WpveOCWZubHKZkE04mavnTdb_9QY_r3XliRg,3424
|
48
48
|
vellum_ee/workflows/display/nodes/vellum/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -69,7 +69,7 @@ vellum_ee/workflows/display/tests/workflow_serialization/test_basic_inline_subwo
|
|
69
69
|
vellum_ee/workflows/display/tests/workflow_serialization/test_basic_map_node_serialization.py,sha256=luj_PdJd8e13C4JO7dkbTlNPko6N7cPFM1iAljdElW8,16043
|
70
70
|
vellum_ee/workflows/display/tests/workflow_serialization/test_basic_merge_node_serialization.py,sha256=mGk21Wp9Gyr-rRwYqhLEyenJF-ArdXjAdj_qYqcldrE,8422
|
71
71
|
vellum_ee/workflows/display/tests/workflow_serialization/test_basic_prompt_deployment_serialization.py,sha256=W_d-hsjSqbqR5BA3aF3KFoEyfLV6x_yhNKmLA1ai2QY,8622
|
72
|
-
vellum_ee/workflows/display/tests/workflow_serialization/test_basic_search_node_serialization.py,sha256=
|
72
|
+
vellum_ee/workflows/display/tests/workflow_serialization/test_basic_search_node_serialization.py,sha256=azUVSdXWoYyAjKuM8m9ikOoJPb5JlEvJtR5nSRR0eaA,12989
|
73
73
|
vellum_ee/workflows/display/tests/workflow_serialization/test_basic_subworkflow_deployment_serialization.py,sha256=yq98DHxetpbqYnGVTDmcokU0A4XAD7E-NcKhrEMP66M,11295
|
74
74
|
vellum_ee/workflows/display/tests/workflow_serialization/test_basic_templating_node_serialization.py,sha256=dipuapy5Z1vSpEeBnFq29g9DGAy9sufw8KcJpFjIN18,7791
|
75
75
|
vellum_ee/workflows/display/tests/workflow_serialization/test_basic_terminal_node_serialization.py,sha256=1HaEwIbxzWl2OEEVlsNcHFQKMhUKQPlsIMaHnjvMODI,3754
|
@@ -111,7 +111,7 @@ vellum/client/README.md,sha256=JkCJjmMZl4jrPj46pkmL9dpK4gSzQQmP5I7z4aME4LY,4749
|
|
111
111
|
vellum/client/__init__.py,sha256=8nZt88C9SVwWanjLbIQMU3rzb32h5UZfFMBx3VPHB50,111887
|
112
112
|
vellum/client/core/__init__.py,sha256=SQ85PF84B9MuKnBwHNHWemSGuy-g_515gFYNFhvEE0I,1438
|
113
113
|
vellum/client/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
|
114
|
-
vellum/client/core/client_wrapper.py,sha256=
|
114
|
+
vellum/client/core/client_wrapper.py,sha256=NnIgNorh26bh1LnC042Vcmf_kylY4hdObVYLpA5mq6k,1868
|
115
115
|
vellum/client/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
|
116
116
|
vellum/client/core/file.py,sha256=X9IbmkZmB2bB_DpmZAO3crWdXagOakAyn6UCOCImCPg,2322
|
117
117
|
vellum/client/core/http_client.py,sha256=R0pQpCppnEtxccGvXl4uJ76s7ro_65Fo_erlNNLp_AI,19228
|
@@ -1346,7 +1346,7 @@ vellum/workflows/nodes/displayable/bases/prompt_deployment_node.py,sha256=rm23Ze
|
|
1346
1346
|
vellum/workflows/nodes/displayable/bases/search_node.py,sha256=m37Ukjb75U6e5ehxV9YKz8r0J1e3p_Tv-f8pTvaH4RI,5245
|
1347
1347
|
vellum/workflows/nodes/displayable/bases/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
1348
1348
|
vellum/workflows/nodes/displayable/bases/tests/test_utils.py,sha256=uQM9RTVmC-fMQ4hd4481QZbviokshwYSxk1ee9leh3A,2406
|
1349
|
-
vellum/workflows/nodes/displayable/bases/types.py,sha256=
|
1349
|
+
vellum/workflows/nodes/displayable/bases/types.py,sha256=C37B2Qh2YP7s7pUjd-EYKc2Zl1TbnCgI_mENuUSb8bo,1706
|
1350
1350
|
vellum/workflows/nodes/displayable/bases/utils.py,sha256=hlbIRLAAeqRhzZPLK7WDvBzUT2b6tupaXYOF54iYvS0,4973
|
1351
1351
|
vellum/workflows/nodes/displayable/code_execution_node/__init__.py,sha256=0FLWMMktpzSnmBMizQglBpcPrP80fzVsoJwJgf822Cg,76
|
1352
1352
|
vellum/workflows/nodes/displayable/code_execution_node/node.py,sha256=JgyTgZRSb-gSXL4ccHn4VkPcPZFOkVK5ohPazPqSWFw,8652
|
@@ -1374,7 +1374,7 @@ vellum/workflows/nodes/displayable/prompt_deployment_node/node.py,sha256=cpOrqQQ
|
|
1374
1374
|
vellum/workflows/nodes/displayable/search_node/__init__.py,sha256=hpBpvbrDYf43DElRZFLzieSn8weXiwNiiNOJurERQbs,62
|
1375
1375
|
vellum/workflows/nodes/displayable/search_node/node.py,sha256=yhFWulbNmSQoDAwtTSGD4AtKmBbcykezRGRG16xga_0,1311
|
1376
1376
|
vellum/workflows/nodes/displayable/search_node/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
1377
|
-
vellum/workflows/nodes/displayable/search_node/tests/test_node.py,sha256=
|
1377
|
+
vellum/workflows/nodes/displayable/search_node/tests/test_node.py,sha256=2-QCV7Vk_-YMls33p0GOUtCv3f2uPNZCjkB2CRjek7o,6562
|
1378
1378
|
vellum/workflows/nodes/displayable/subworkflow_deployment_node/__init__.py,sha256=9yYM6001YZeqI1VOk1QuEM_yrffk_EdsO7qaPzINKds,92
|
1379
1379
|
vellum/workflows/nodes/displayable/subworkflow_deployment_node/node.py,sha256=FgS1ZMnIBliqEMNKX2ChE80bw4IVHEQ6IGiTDvF0RZw,7226
|
1380
1380
|
vellum/workflows/nodes/displayable/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -1440,8 +1440,8 @@ vellum/workflows/vellum_client.py,sha256=ODrq_TSl-drX2aezXegf7pizpWDVJuTXH-j6528
|
|
1440
1440
|
vellum/workflows/workflows/__init__.py,sha256=KY45TqvavCCvXIkyCFMEc0dc6jTMOUci93U2DUrlZYc,66
|
1441
1441
|
vellum/workflows/workflows/base.py,sha256=k0kUWWko4fHyCqLSU_1cBK_pXZpl9MXekWiG-bdOAo0,18353
|
1442
1442
|
vellum/workflows/workflows/event_filters.py,sha256=GSxIgwrX26a1Smfd-6yss2abGCnadGsrSZGa7t7LpJA,2008
|
1443
|
-
vellum_ai-0.13.
|
1444
|
-
vellum_ai-0.13.
|
1445
|
-
vellum_ai-0.13.
|
1446
|
-
vellum_ai-0.13.
|
1447
|
-
vellum_ai-0.13.
|
1443
|
+
vellum_ai-0.13.8.dist-info/LICENSE,sha256=hOypcdt481qGNISA784bnAGWAE6tyIf9gc2E78mYC3E,1574
|
1444
|
+
vellum_ai-0.13.8.dist-info/METADATA,sha256=DslQiu2NfpU6727w1BqOFezu5H0uKbP0EiBP1ALlB1Y,5334
|
1445
|
+
vellum_ai-0.13.8.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
1446
|
+
vellum_ai-0.13.8.dist-info/entry_points.txt,sha256=HCH4yc_V3J_nDv3qJzZ_nYS8llCHZViCDP1ejgCc5Ak,42
|
1447
|
+
vellum_ai-0.13.8.dist-info/RECORD,,
|
@@ -3,8 +3,12 @@ from typing import Any, Generic, TypeVar, cast
|
|
3
3
|
from vellum.workflows.constants import UNDEF
|
4
4
|
from vellum.workflows.descriptors.base import BaseDescriptor
|
5
5
|
from vellum.workflows.expressions.between import BetweenExpression
|
6
|
+
from vellum.workflows.expressions.is_nil import IsNilExpression
|
7
|
+
from vellum.workflows.expressions.is_not_nil import IsNotNilExpression
|
6
8
|
from vellum.workflows.expressions.is_not_null import IsNotNullExpression
|
9
|
+
from vellum.workflows.expressions.is_not_undefined import IsNotUndefinedExpression
|
7
10
|
from vellum.workflows.expressions.is_null import IsNullExpression
|
11
|
+
from vellum.workflows.expressions.is_undefined import IsUndefinedExpression
|
8
12
|
from vellum.workflows.expressions.not_between import NotBetweenExpression
|
9
13
|
from vellum.workflows.nodes.bases.base import BaseNode
|
10
14
|
from vellum.workflows.references.execution_count import ExecutionCountReference
|
@@ -104,17 +108,27 @@ class BaseNodeDisplay(BaseNodeVellumDisplay[_BaseNodeType], Generic[_BaseNodeTyp
|
|
104
108
|
return explicit_value if explicit_value else GenericNodeDisplayData()
|
105
109
|
|
106
110
|
def serialize_condition(self, display_context: WorkflowDisplayContext, condition: BaseDescriptor) -> JsonObject:
|
107
|
-
if isinstance(
|
108
|
-
|
111
|
+
if isinstance(
|
112
|
+
condition,
|
113
|
+
(
|
114
|
+
IsNullExpression,
|
115
|
+
IsNotNullExpression,
|
116
|
+
IsNilExpression,
|
117
|
+
IsNotNilExpression,
|
118
|
+
IsUndefinedExpression,
|
119
|
+
IsNotUndefinedExpression,
|
120
|
+
),
|
121
|
+
):
|
122
|
+
lhs = self.serialize_value(display_context, condition._expression)
|
109
123
|
return {
|
110
124
|
"type": "UNARY_EXPRESSION",
|
111
125
|
"lhs": lhs,
|
112
126
|
"operator": convert_descriptor_to_operator(condition),
|
113
127
|
}
|
114
128
|
elif isinstance(condition, (BetweenExpression, NotBetweenExpression)):
|
115
|
-
base = self.serialize_value(display_context, condition._value)
|
116
|
-
lhs = self.serialize_value(display_context, condition._start)
|
117
|
-
rhs = self.serialize_value(display_context, condition._end)
|
129
|
+
base = self.serialize_value(display_context, condition._value)
|
130
|
+
lhs = self.serialize_value(display_context, condition._start)
|
131
|
+
rhs = self.serialize_value(display_context, condition._end)
|
118
132
|
|
119
133
|
return {
|
120
134
|
"type": "TERNARY_EXPRESSION",
|
@@ -5,8 +5,12 @@ from typing import Any, ClassVar, Dict, Generic, List, Optional, Tuple, TypeVar,
|
|
5
5
|
from vellum.workflows.descriptors.base import BaseDescriptor
|
6
6
|
from vellum.workflows.expressions.and_ import AndExpression
|
7
7
|
from vellum.workflows.expressions.between import BetweenExpression
|
8
|
+
from vellum.workflows.expressions.is_nil import IsNilExpression
|
9
|
+
from vellum.workflows.expressions.is_not_nil import IsNotNilExpression
|
8
10
|
from vellum.workflows.expressions.is_not_null import IsNotNullExpression
|
11
|
+
from vellum.workflows.expressions.is_not_undefined import IsNotUndefinedExpression
|
9
12
|
from vellum.workflows.expressions.is_null import IsNullExpression
|
13
|
+
from vellum.workflows.expressions.is_undefined import IsUndefinedExpression
|
10
14
|
from vellum.workflows.expressions.not_between import NotBetweenExpression
|
11
15
|
from vellum.workflows.expressions.or_ import OrExpression
|
12
16
|
from vellum.workflows.nodes.displayable import ConditionalNode
|
@@ -89,7 +93,17 @@ but the defined conditions have length {len(condition_ids)}"""
|
|
89
93
|
}
|
90
94
|
|
91
95
|
# Base cases for other descriptors
|
92
|
-
elif isinstance(
|
96
|
+
elif isinstance(
|
97
|
+
descriptor,
|
98
|
+
(
|
99
|
+
IsNullExpression,
|
100
|
+
IsNotNullExpression,
|
101
|
+
IsNilExpression,
|
102
|
+
IsNotNilExpression,
|
103
|
+
IsUndefinedExpression,
|
104
|
+
IsNotUndefinedExpression,
|
105
|
+
),
|
106
|
+
):
|
93
107
|
expression_node_input = create_node_input(
|
94
108
|
node_id, f"{current_id}.field", descriptor._expression, display_context, field_node_input_id
|
95
109
|
)
|
@@ -97,7 +97,8 @@ class BaseSearchNodeDisplay(BaseNodeVellumDisplay[_SearchNodeType], Generic[_Sea
|
|
97
97
|
result_merging = options.result_merging if options else None
|
98
98
|
result_merging_enabled = True if result_merging and result_merging.enabled else False
|
99
99
|
|
100
|
-
|
100
|
+
raw_weights = raise_if_descriptor(node.weights)
|
101
|
+
weights = raw_weights if raw_weights is not None else options.weights if options is not None else None
|
101
102
|
|
102
103
|
node_input_names_and_values = [
|
103
104
|
("query", node.query),
|
vellum_ee/workflows/display/tests/workflow_serialization/test_basic_search_node_serialization.py
CHANGED
@@ -84,7 +84,12 @@ def test_serialize_workflow():
|
|
84
84
|
"id": "983f2b7f-ad86-45cf-b04b-08724af27236",
|
85
85
|
"key": "weights",
|
86
86
|
"value": {
|
87
|
-
"rules": [
|
87
|
+
"rules": [
|
88
|
+
{
|
89
|
+
"type": "CONSTANT_VALUE",
|
90
|
+
"data": {"type": "JSON", "value": {"keywords": 0.45, "semantic_similarity": 0.55}},
|
91
|
+
}
|
92
|
+
],
|
88
93
|
"combinator": "OR",
|
89
94
|
},
|
90
95
|
},
|
File without changes
|
File without changes
|
File without changes
|