vellum-ai 0.8.14__py3-none-any.whl → 0.8.16__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- vellum/__init__.py +18 -0
- vellum/core/client_wrapper.py +3 -3
- vellum/core/http_client.py +22 -16
- vellum/core/pydantic_utilities.py +26 -3
- vellum/types/__init__.py +18 -0
- vellum/types/array_variable_value.py +27 -0
- vellum/types/array_variable_value_item.py +9 -0
- vellum/types/array_vellum_value.py +31 -0
- vellum/types/array_vellum_value_item.py +15 -1
- vellum/types/array_vellum_value_item_request.py +9 -0
- vellum/types/array_vellum_value_request.py +31 -0
- vellum/types/chat_history_variable_value.py +21 -0
- vellum/types/chat_history_vellum_value.py +25 -0
- vellum/types/chat_history_vellum_value_request.py +25 -0
- vellum/types/code_execution_node_array_result.py +6 -0
- vellum/types/code_execution_node_result.py +6 -0
- vellum/types/code_execution_node_result_data.py +6 -0
- vellum/types/create_test_suite_test_case_request.py +6 -0
- vellum/types/execute_workflow_response.py +6 -0
- vellum/types/execution_array_vellum_value.py +6 -0
- vellum/types/external_test_case_execution.py +6 -0
- vellum/types/external_test_case_execution_request.py +6 -0
- vellum/types/fulfilled_execute_workflow_workflow_result_event.py +8 -0
- vellum/types/fulfilled_workflow_node_result_event.py +8 -0
- vellum/types/initiated_workflow_node_result_event.py +6 -0
- vellum/types/named_test_case_array_variable_value.py +6 -0
- vellum/types/named_test_case_array_variable_value_request.py +8 -0
- vellum/types/node_input_compiled_array_value.py +6 -0
- vellum/types/node_output_compiled_array_value.py +6 -0
- vellum/types/paginated_test_suite_run_execution_list.py +6 -0
- vellum/types/paginated_test_suite_test_case_list.py +6 -0
- vellum/types/rejected_workflow_node_result_event.py +6 -0
- vellum/types/replace_test_suite_test_case_request.py +6 -0
- vellum/types/search_results_variable_value.py +21 -0
- vellum/types/search_results_vellum_value.py +25 -0
- vellum/types/search_results_vellum_value_request.py +25 -0
- vellum/types/streaming_workflow_node_result_event.py +8 -0
- vellum/types/templating_node_array_result.py +6 -0
- vellum/types/templating_node_result.py +6 -0
- vellum/types/templating_node_result_data.py +6 -0
- vellum/types/terminal_node_array_result.py +6 -0
- vellum/types/terminal_node_result.py +6 -0
- vellum/types/terminal_node_result_data.py +6 -0
- vellum/types/test_case_array_variable_value.py +6 -0
- vellum/types/test_suite_run_execution.py +6 -0
- vellum/types/test_suite_run_execution_array_output.py +6 -0
- vellum/types/test_suite_run_external_exec_config.py +6 -0
- vellum/types/test_suite_run_external_exec_config_data.py +6 -0
- vellum/types/test_suite_run_external_exec_config_data_request.py +8 -0
- vellum/types/test_suite_run_external_exec_config_request.py +8 -0
- vellum/types/test_suite_run_read.py +6 -0
- vellum/types/test_suite_test_case.py +6 -0
- vellum/types/test_suite_test_case_create_bulk_operation_request.py +8 -0
- vellum/types/test_suite_test_case_replace_bulk_operation_request.py +8 -0
- vellum/types/test_suite_test_case_upsert_bulk_operation_request.py +8 -0
- vellum/types/upsert_test_suite_test_case_request.py +6 -0
- vellum/types/workflow_execution_node_result_event.py +8 -0
- vellum/types/workflow_execution_workflow_result_event.py +8 -0
- vellum/types/workflow_output_array.py +6 -0
- vellum/types/workflow_result_event.py +8 -0
- vellum/types/workflow_result_event_output_data_array.py +6 -0
- {vellum_ai-0.8.14.dist-info → vellum_ai-0.8.16.dist-info}/METADATA +1 -1
- {vellum_ai-0.8.14.dist-info → vellum_ai-0.8.16.dist-info}/RECORD +65 -56
- {vellum_ai-0.8.14.dist-info → vellum_ai-0.8.16.dist-info}/LICENSE +0 -0
- {vellum_ai-0.8.14.dist-info → vellum_ai-0.8.16.dist-info}/WHEEL +0 -0
vellum/__init__.py
CHANGED
@@ -14,9 +14,12 @@ from .types import (
|
|
14
14
|
ArrayChatMessageContentItem,
|
15
15
|
ArrayChatMessageContentItemRequest,
|
16
16
|
ArrayChatMessageContentRequest,
|
17
|
+
ArrayVariableValue,
|
17
18
|
ArrayVariableValueItem,
|
19
|
+
ArrayVellumValue,
|
18
20
|
ArrayVellumValueItem,
|
19
21
|
ArrayVellumValueItemRequest,
|
22
|
+
ArrayVellumValueRequest,
|
20
23
|
BasicVectorizerIntfloatMultilingualE5Large,
|
21
24
|
BasicVectorizerIntfloatMultilingualE5LargeRequest,
|
22
25
|
BasicVectorizerSentenceTransformersMultiQaMpnetBaseCosV1,
|
@@ -24,6 +27,9 @@ from .types import (
|
|
24
27
|
BasicVectorizerSentenceTransformersMultiQaMpnetBaseDotV1,
|
25
28
|
BasicVectorizerSentenceTransformersMultiQaMpnetBaseDotV1Request,
|
26
29
|
ChatHistoryInputRequest,
|
30
|
+
ChatHistoryVariableValue,
|
31
|
+
ChatHistoryVellumValue,
|
32
|
+
ChatHistoryVellumValueRequest,
|
27
33
|
ChatMessage,
|
28
34
|
ChatMessageContent,
|
29
35
|
ChatMessageContentRequest,
|
@@ -258,6 +264,9 @@ from .types import (
|
|
258
264
|
SearchResultMeta,
|
259
265
|
SearchResultMetaRequest,
|
260
266
|
SearchResultRequest,
|
267
|
+
SearchResultsVariableValue,
|
268
|
+
SearchResultsVellumValue,
|
269
|
+
SearchResultsVellumValueRequest,
|
261
270
|
SearchWeightsRequest,
|
262
271
|
SentenceChunkerConfig,
|
263
272
|
SentenceChunkerConfigRequest,
|
@@ -452,9 +461,12 @@ __all__ = [
|
|
452
461
|
"ArrayChatMessageContentItem",
|
453
462
|
"ArrayChatMessageContentItemRequest",
|
454
463
|
"ArrayChatMessageContentRequest",
|
464
|
+
"ArrayVariableValue",
|
455
465
|
"ArrayVariableValueItem",
|
466
|
+
"ArrayVellumValue",
|
456
467
|
"ArrayVellumValueItem",
|
457
468
|
"ArrayVellumValueItemRequest",
|
469
|
+
"ArrayVellumValueRequest",
|
458
470
|
"AsyncVellum",
|
459
471
|
"BadRequestError",
|
460
472
|
"BasicVectorizerIntfloatMultilingualE5Large",
|
@@ -464,6 +476,9 @@ __all__ = [
|
|
464
476
|
"BasicVectorizerSentenceTransformersMultiQaMpnetBaseDotV1",
|
465
477
|
"BasicVectorizerSentenceTransformersMultiQaMpnetBaseDotV1Request",
|
466
478
|
"ChatHistoryInputRequest",
|
479
|
+
"ChatHistoryVariableValue",
|
480
|
+
"ChatHistoryVellumValue",
|
481
|
+
"ChatHistoryVellumValueRequest",
|
467
482
|
"ChatMessage",
|
468
483
|
"ChatMessageContent",
|
469
484
|
"ChatMessageContentRequest",
|
@@ -703,6 +718,9 @@ __all__ = [
|
|
703
718
|
"SearchResultMeta",
|
704
719
|
"SearchResultMetaRequest",
|
705
720
|
"SearchResultRequest",
|
721
|
+
"SearchResultsVariableValue",
|
722
|
+
"SearchResultsVellumValue",
|
723
|
+
"SearchResultsVellumValueRequest",
|
706
724
|
"SearchWeightsRequest",
|
707
725
|
"SentenceChunkerConfig",
|
708
726
|
"SentenceChunkerConfigRequest",
|
vellum/core/client_wrapper.py
CHANGED
@@ -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.8.
|
20
|
+
"X-Fern-SDK-Version": "0.8.16",
|
21
21
|
}
|
22
22
|
headers["X_API_KEY"] = self.api_key
|
23
23
|
return headers
|
@@ -40,7 +40,7 @@ class SyncClientWrapper(BaseClientWrapper):
|
|
40
40
|
):
|
41
41
|
super().__init__(api_key=api_key, environment=environment, timeout=timeout)
|
42
42
|
self.httpx_client = HttpClient(
|
43
|
-
httpx_client=httpx_client, base_headers=self.get_headers
|
43
|
+
httpx_client=httpx_client, base_headers=self.get_headers, base_timeout=self.get_timeout
|
44
44
|
)
|
45
45
|
|
46
46
|
|
@@ -55,5 +55,5 @@ class AsyncClientWrapper(BaseClientWrapper):
|
|
55
55
|
):
|
56
56
|
super().__init__(api_key=api_key, environment=environment, timeout=timeout)
|
57
57
|
self.httpx_client = AsyncHttpClient(
|
58
|
-
httpx_client=httpx_client, base_headers=self.get_headers
|
58
|
+
httpx_client=httpx_client, base_headers=self.get_headers, base_timeout=self.get_timeout
|
59
59
|
)
|
vellum/core/http_client.py
CHANGED
@@ -152,9 +152,9 @@ class HttpClient:
|
|
152
152
|
self,
|
153
153
|
*,
|
154
154
|
httpx_client: httpx.Client,
|
155
|
-
base_timeout: typing.Optional[float],
|
156
|
-
base_headers: typing.Dict[str, str],
|
157
|
-
base_url: typing.Optional[str] = None,
|
155
|
+
base_timeout: typing.Callable[[], typing.Optional[float]],
|
156
|
+
base_headers: typing.Callable[[], typing.Dict[str, str]],
|
157
|
+
base_url: typing.Optional[typing.Callable[[], str]] = None,
|
158
158
|
):
|
159
159
|
self.base_url = base_url
|
160
160
|
self.base_timeout = base_timeout
|
@@ -162,7 +162,10 @@ class HttpClient:
|
|
162
162
|
self.httpx_client = httpx_client
|
163
163
|
|
164
164
|
def get_base_url(self, maybe_base_url: typing.Optional[str]) -> str:
|
165
|
-
base_url =
|
165
|
+
base_url = maybe_base_url
|
166
|
+
if self.base_url is not None and base_url is None:
|
167
|
+
base_url = self.base_url()
|
168
|
+
|
166
169
|
if base_url is None:
|
167
170
|
raise ValueError("A base_url is required to make this request, please provide one and try again.")
|
168
171
|
return base_url
|
@@ -187,7 +190,7 @@ class HttpClient:
|
|
187
190
|
timeout = (
|
188
191
|
request_options.get("timeout_in_seconds")
|
189
192
|
if request_options is not None and request_options.get("timeout_in_seconds") is not None
|
190
|
-
else self.base_timeout
|
193
|
+
else self.base_timeout()
|
191
194
|
)
|
192
195
|
|
193
196
|
json_body, data_body = get_request_body(json=json, data=data, request_options=request_options, omit=omit)
|
@@ -198,7 +201,7 @@ class HttpClient:
|
|
198
201
|
headers=jsonable_encoder(
|
199
202
|
remove_none_from_dict(
|
200
203
|
{
|
201
|
-
**self.base_headers,
|
204
|
+
**self.base_headers(),
|
202
205
|
**(headers if headers is not None else {}),
|
203
206
|
**(request_options.get("additional_headers", {}) or {} if request_options is not None else {}),
|
204
207
|
}
|
@@ -271,7 +274,7 @@ class HttpClient:
|
|
271
274
|
timeout = (
|
272
275
|
request_options.get("timeout_in_seconds")
|
273
276
|
if request_options is not None and request_options.get("timeout_in_seconds") is not None
|
274
|
-
else self.base_timeout
|
277
|
+
else self.base_timeout()
|
275
278
|
)
|
276
279
|
|
277
280
|
json_body, data_body = get_request_body(json=json, data=data, request_options=request_options, omit=omit)
|
@@ -282,7 +285,7 @@ class HttpClient:
|
|
282
285
|
headers=jsonable_encoder(
|
283
286
|
remove_none_from_dict(
|
284
287
|
{
|
285
|
-
**self.base_headers,
|
288
|
+
**self.base_headers(),
|
286
289
|
**(headers if headers is not None else {}),
|
287
290
|
**(request_options.get("additional_headers", {}) if request_options is not None else {}),
|
288
291
|
}
|
@@ -321,9 +324,9 @@ class AsyncHttpClient:
|
|
321
324
|
self,
|
322
325
|
*,
|
323
326
|
httpx_client: httpx.AsyncClient,
|
324
|
-
base_timeout: typing.Optional[float],
|
325
|
-
base_headers: typing.Dict[str, str],
|
326
|
-
base_url: typing.Optional[str] = None,
|
327
|
+
base_timeout: typing.Callable[[], typing.Optional[float]],
|
328
|
+
base_headers: typing.Callable[[], typing.Dict[str, str]],
|
329
|
+
base_url: typing.Optional[typing.Callable[[], str]] = None,
|
327
330
|
):
|
328
331
|
self.base_url = base_url
|
329
332
|
self.base_timeout = base_timeout
|
@@ -331,7 +334,10 @@ class AsyncHttpClient:
|
|
331
334
|
self.httpx_client = httpx_client
|
332
335
|
|
333
336
|
def get_base_url(self, maybe_base_url: typing.Optional[str]) -> str:
|
334
|
-
base_url =
|
337
|
+
base_url = maybe_base_url
|
338
|
+
if self.base_url is not None and base_url is None:
|
339
|
+
base_url = self.base_url()
|
340
|
+
|
335
341
|
if base_url is None:
|
336
342
|
raise ValueError("A base_url is required to make this request, please provide one and try again.")
|
337
343
|
return base_url
|
@@ -356,7 +362,7 @@ class AsyncHttpClient:
|
|
356
362
|
timeout = (
|
357
363
|
request_options.get("timeout_in_seconds")
|
358
364
|
if request_options is not None and request_options.get("timeout_in_seconds") is not None
|
359
|
-
else self.base_timeout
|
365
|
+
else self.base_timeout()
|
360
366
|
)
|
361
367
|
|
362
368
|
json_body, data_body = get_request_body(json=json, data=data, request_options=request_options, omit=omit)
|
@@ -368,7 +374,7 @@ class AsyncHttpClient:
|
|
368
374
|
headers=jsonable_encoder(
|
369
375
|
remove_none_from_dict(
|
370
376
|
{
|
371
|
-
**self.base_headers,
|
377
|
+
**self.base_headers(),
|
372
378
|
**(headers if headers is not None else {}),
|
373
379
|
**(request_options.get("additional_headers", {}) or {} if request_options is not None else {}),
|
374
380
|
}
|
@@ -438,7 +444,7 @@ class AsyncHttpClient:
|
|
438
444
|
timeout = (
|
439
445
|
request_options.get("timeout_in_seconds")
|
440
446
|
if request_options is not None and request_options.get("timeout_in_seconds") is not None
|
441
|
-
else self.base_timeout
|
447
|
+
else self.base_timeout()
|
442
448
|
)
|
443
449
|
|
444
450
|
json_body, data_body = get_request_body(json=json, data=data, request_options=request_options, omit=omit)
|
@@ -449,7 +455,7 @@ class AsyncHttpClient:
|
|
449
455
|
headers=jsonable_encoder(
|
450
456
|
remove_none_from_dict(
|
451
457
|
{
|
452
|
-
**self.base_headers,
|
458
|
+
**self.base_headers(),
|
453
459
|
**(headers if headers is not None else {}),
|
454
460
|
**(request_options.get("additional_headers", {}) if request_options is not None else {}),
|
455
461
|
}
|
@@ -152,7 +152,7 @@ class UniversalBaseModel(pydantic.BaseModel):
|
|
152
152
|
)
|
153
153
|
|
154
154
|
else:
|
155
|
-
_fields_set = self.__fields_set__
|
155
|
+
_fields_set = self.__fields_set__.copy()
|
156
156
|
|
157
157
|
fields = _get_model_fields(self.__class__)
|
158
158
|
for name, field in fields.items():
|
@@ -162,9 +162,12 @@ class UniversalBaseModel(pydantic.BaseModel):
|
|
162
162
|
# If the default values are non-null act like they've been set
|
163
163
|
# This effectively allows exclude_unset to work like exclude_none where
|
164
164
|
# the latter passes through intentionally set none values.
|
165
|
-
if default
|
165
|
+
if default is not None or ("exclude_unset" in kwargs and not kwargs["exclude_unset"]):
|
166
166
|
_fields_set.add(name)
|
167
167
|
|
168
|
+
if default is not None:
|
169
|
+
self.__fields_set__.add(name)
|
170
|
+
|
168
171
|
kwargs_with_defaults_exclude_unset_include_fields: typing.Any = {
|
169
172
|
"by_alias": True,
|
170
173
|
"exclude_unset": True,
|
@@ -177,13 +180,33 @@ class UniversalBaseModel(pydantic.BaseModel):
|
|
177
180
|
return convert_and_respect_annotation_metadata(object_=dict_dump, annotation=self.__class__, direction="write")
|
178
181
|
|
179
182
|
|
183
|
+
def _union_list_of_pydantic_dicts(
|
184
|
+
source: typing.List[typing.Any], destination: typing.List[typing.Any]
|
185
|
+
) -> typing.List[typing.Any]:
|
186
|
+
converted_list: typing.List[typing.Any] = []
|
187
|
+
for i, item in enumerate(source):
|
188
|
+
destination_value = destination[i] # type: ignore
|
189
|
+
if isinstance(item, dict):
|
190
|
+
converted_list.append(deep_union_pydantic_dicts(item, destination_value))
|
191
|
+
elif isinstance(item, list):
|
192
|
+
converted_list.append(_union_list_of_pydantic_dicts(item, destination_value))
|
193
|
+
else:
|
194
|
+
converted_list.append(item)
|
195
|
+
return converted_list
|
196
|
+
|
197
|
+
|
180
198
|
def deep_union_pydantic_dicts(
|
181
199
|
source: typing.Dict[str, typing.Any], destination: typing.Dict[str, typing.Any]
|
182
200
|
) -> typing.Dict[str, typing.Any]:
|
183
201
|
for key, value in source.items():
|
202
|
+
node = destination.setdefault(key, {})
|
184
203
|
if isinstance(value, dict):
|
185
|
-
node = destination.setdefault(key, {})
|
186
204
|
deep_union_pydantic_dicts(value, node)
|
205
|
+
# Note: we do not do this same processing for sets given we do not have sets of models
|
206
|
+
# and given the sets are unordered, the processing of the set and matching objects would
|
207
|
+
# be non-trivial.
|
208
|
+
elif isinstance(value, list):
|
209
|
+
destination[key] = _union_list_of_pydantic_dicts(value, node)
|
187
210
|
else:
|
188
211
|
destination[key] = value
|
189
212
|
|
vellum/types/__init__.py
CHANGED
@@ -13,9 +13,12 @@ from .array_chat_message_content import ArrayChatMessageContent
|
|
13
13
|
from .array_chat_message_content_item import ArrayChatMessageContentItem
|
14
14
|
from .array_chat_message_content_item_request import ArrayChatMessageContentItemRequest
|
15
15
|
from .array_chat_message_content_request import ArrayChatMessageContentRequest
|
16
|
+
from .array_variable_value import ArrayVariableValue
|
16
17
|
from .array_variable_value_item import ArrayVariableValueItem
|
18
|
+
from .array_vellum_value import ArrayVellumValue
|
17
19
|
from .array_vellum_value_item import ArrayVellumValueItem
|
18
20
|
from .array_vellum_value_item_request import ArrayVellumValueItemRequest
|
21
|
+
from .array_vellum_value_request import ArrayVellumValueRequest
|
19
22
|
from .basic_vectorizer_intfloat_multilingual_e_5_large import BasicVectorizerIntfloatMultilingualE5Large
|
20
23
|
from .basic_vectorizer_intfloat_multilingual_e_5_large_request import BasicVectorizerIntfloatMultilingualE5LargeRequest
|
21
24
|
from .basic_vectorizer_sentence_transformers_multi_qa_mpnet_base_cos_v_1 import (
|
@@ -31,6 +34,9 @@ from .basic_vectorizer_sentence_transformers_multi_qa_mpnet_base_dot_v_1_request
|
|
31
34
|
BasicVectorizerSentenceTransformersMultiQaMpnetBaseDotV1Request,
|
32
35
|
)
|
33
36
|
from .chat_history_input_request import ChatHistoryInputRequest
|
37
|
+
from .chat_history_variable_value import ChatHistoryVariableValue
|
38
|
+
from .chat_history_vellum_value import ChatHistoryVellumValue
|
39
|
+
from .chat_history_vellum_value_request import ChatHistoryVellumValueRequest
|
34
40
|
from .chat_message import ChatMessage
|
35
41
|
from .chat_message_content import ChatMessageContent
|
36
42
|
from .chat_message_content_request import ChatMessageContentRequest
|
@@ -265,6 +271,9 @@ from .search_result_merging_request import SearchResultMergingRequest
|
|
265
271
|
from .search_result_meta import SearchResultMeta
|
266
272
|
from .search_result_meta_request import SearchResultMetaRequest
|
267
273
|
from .search_result_request import SearchResultRequest
|
274
|
+
from .search_results_variable_value import SearchResultsVariableValue
|
275
|
+
from .search_results_vellum_value import SearchResultsVellumValue
|
276
|
+
from .search_results_vellum_value_request import SearchResultsVellumValueRequest
|
268
277
|
from .search_weights_request import SearchWeightsRequest
|
269
278
|
from .sentence_chunker_config import SentenceChunkerConfig
|
270
279
|
from .sentence_chunker_config_request import SentenceChunkerConfigRequest
|
@@ -443,9 +452,12 @@ __all__ = [
|
|
443
452
|
"ArrayChatMessageContentItem",
|
444
453
|
"ArrayChatMessageContentItemRequest",
|
445
454
|
"ArrayChatMessageContentRequest",
|
455
|
+
"ArrayVariableValue",
|
446
456
|
"ArrayVariableValueItem",
|
457
|
+
"ArrayVellumValue",
|
447
458
|
"ArrayVellumValueItem",
|
448
459
|
"ArrayVellumValueItemRequest",
|
460
|
+
"ArrayVellumValueRequest",
|
449
461
|
"BasicVectorizerIntfloatMultilingualE5Large",
|
450
462
|
"BasicVectorizerIntfloatMultilingualE5LargeRequest",
|
451
463
|
"BasicVectorizerSentenceTransformersMultiQaMpnetBaseCosV1",
|
@@ -453,6 +465,9 @@ __all__ = [
|
|
453
465
|
"BasicVectorizerSentenceTransformersMultiQaMpnetBaseDotV1",
|
454
466
|
"BasicVectorizerSentenceTransformersMultiQaMpnetBaseDotV1Request",
|
455
467
|
"ChatHistoryInputRequest",
|
468
|
+
"ChatHistoryVariableValue",
|
469
|
+
"ChatHistoryVellumValue",
|
470
|
+
"ChatHistoryVellumValueRequest",
|
456
471
|
"ChatMessage",
|
457
472
|
"ChatMessageContent",
|
458
473
|
"ChatMessageContentRequest",
|
@@ -687,6 +702,9 @@ __all__ = [
|
|
687
702
|
"SearchResultMeta",
|
688
703
|
"SearchResultMetaRequest",
|
689
704
|
"SearchResultRequest",
|
705
|
+
"SearchResultsVariableValue",
|
706
|
+
"SearchResultsVellumValue",
|
707
|
+
"SearchResultsVellumValueRequest",
|
690
708
|
"SearchWeightsRequest",
|
691
709
|
"SentenceChunkerConfig",
|
692
710
|
"SentenceChunkerConfigRequest",
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
5
|
+
import typing
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
7
|
+
import pydantic
|
8
|
+
from ..core.pydantic_utilities import update_forward_refs
|
9
|
+
|
10
|
+
|
11
|
+
class ArrayVariableValue(UniversalBaseModel):
|
12
|
+
type: typing.Literal["ARRAY"] = "ARRAY"
|
13
|
+
value: typing.Optional[typing.List["ArrayVariableValueItem"]] = None
|
14
|
+
|
15
|
+
if IS_PYDANTIC_V2:
|
16
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
17
|
+
else:
|
18
|
+
|
19
|
+
class Config:
|
20
|
+
frozen = True
|
21
|
+
smart_union = True
|
22
|
+
extra = pydantic.Extra.allow
|
23
|
+
|
24
|
+
|
25
|
+
from .array_variable_value_item import ArrayVariableValueItem # noqa: E402
|
26
|
+
|
27
|
+
update_forward_refs(ArrayVariableValue)
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
2
2
|
|
3
|
+
from __future__ import annotations
|
3
4
|
import typing
|
4
5
|
from .string_variable_value import StringVariableValue
|
5
6
|
from .number_variable_value import NumberVariableValue
|
@@ -7,7 +8,12 @@ from .json_variable_value import JsonVariableValue
|
|
7
8
|
from .error_variable_value import ErrorVariableValue
|
8
9
|
from .function_call_variable_value import FunctionCallVariableValue
|
9
10
|
from .image_variable_value import ImageVariableValue
|
11
|
+
from .chat_history_variable_value import ChatHistoryVariableValue
|
12
|
+
from .search_results_variable_value import SearchResultsVariableValue
|
13
|
+
import typing
|
10
14
|
|
15
|
+
if typing.TYPE_CHECKING:
|
16
|
+
from .array_variable_value import ArrayVariableValue
|
11
17
|
ArrayVariableValueItem = typing.Union[
|
12
18
|
StringVariableValue,
|
13
19
|
NumberVariableValue,
|
@@ -15,4 +21,7 @@ ArrayVariableValueItem = typing.Union[
|
|
15
21
|
ErrorVariableValue,
|
16
22
|
FunctionCallVariableValue,
|
17
23
|
ImageVariableValue,
|
24
|
+
ChatHistoryVariableValue,
|
25
|
+
SearchResultsVariableValue,
|
26
|
+
"ArrayVariableValue",
|
18
27
|
]
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
5
|
+
import typing
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
7
|
+
import pydantic
|
8
|
+
from ..core.pydantic_utilities import update_forward_refs
|
9
|
+
|
10
|
+
|
11
|
+
class ArrayVellumValue(UniversalBaseModel):
|
12
|
+
"""
|
13
|
+
A value representing an array of Vellum variable values.
|
14
|
+
"""
|
15
|
+
|
16
|
+
type: typing.Literal["ARRAY"] = "ARRAY"
|
17
|
+
value: typing.Optional[typing.List["ArrayVellumValueItem"]] = None
|
18
|
+
|
19
|
+
if IS_PYDANTIC_V2:
|
20
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
21
|
+
else:
|
22
|
+
|
23
|
+
class Config:
|
24
|
+
frozen = True
|
25
|
+
smart_union = True
|
26
|
+
extra = pydantic.Extra.allow
|
27
|
+
|
28
|
+
|
29
|
+
from .array_vellum_value_item import ArrayVellumValueItem # noqa: E402
|
30
|
+
|
31
|
+
update_forward_refs(ArrayVellumValue)
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
2
2
|
|
3
|
+
from __future__ import annotations
|
3
4
|
import typing
|
4
5
|
from .string_vellum_value import StringVellumValue
|
5
6
|
from .number_vellum_value import NumberVellumValue
|
@@ -7,7 +8,20 @@ from .json_vellum_value import JsonVellumValue
|
|
7
8
|
from .image_vellum_value import ImageVellumValue
|
8
9
|
from .function_call_vellum_value import FunctionCallVellumValue
|
9
10
|
from .error_vellum_value import ErrorVellumValue
|
11
|
+
from .chat_history_vellum_value import ChatHistoryVellumValue
|
12
|
+
from .search_results_vellum_value import SearchResultsVellumValue
|
13
|
+
import typing
|
10
14
|
|
15
|
+
if typing.TYPE_CHECKING:
|
16
|
+
from .array_vellum_value import ArrayVellumValue
|
11
17
|
ArrayVellumValueItem = typing.Union[
|
12
|
-
StringVellumValue,
|
18
|
+
StringVellumValue,
|
19
|
+
NumberVellumValue,
|
20
|
+
JsonVellumValue,
|
21
|
+
ImageVellumValue,
|
22
|
+
FunctionCallVellumValue,
|
23
|
+
ErrorVellumValue,
|
24
|
+
ChatHistoryVellumValue,
|
25
|
+
SearchResultsVellumValue,
|
26
|
+
"ArrayVellumValue",
|
13
27
|
]
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
2
2
|
|
3
|
+
from __future__ import annotations
|
3
4
|
import typing
|
4
5
|
from .string_vellum_value_request import StringVellumValueRequest
|
5
6
|
from .number_vellum_value_request import NumberVellumValueRequest
|
@@ -7,7 +8,12 @@ from .json_vellum_value_request import JsonVellumValueRequest
|
|
7
8
|
from .image_vellum_value_request import ImageVellumValueRequest
|
8
9
|
from .function_call_vellum_value_request import FunctionCallVellumValueRequest
|
9
10
|
from .error_vellum_value_request import ErrorVellumValueRequest
|
11
|
+
from .chat_history_vellum_value_request import ChatHistoryVellumValueRequest
|
12
|
+
from .search_results_vellum_value_request import SearchResultsVellumValueRequest
|
13
|
+
import typing
|
10
14
|
|
15
|
+
if typing.TYPE_CHECKING:
|
16
|
+
from .array_vellum_value_request import ArrayVellumValueRequest
|
11
17
|
ArrayVellumValueItemRequest = typing.Union[
|
12
18
|
StringVellumValueRequest,
|
13
19
|
NumberVellumValueRequest,
|
@@ -15,4 +21,7 @@ ArrayVellumValueItemRequest = typing.Union[
|
|
15
21
|
ImageVellumValueRequest,
|
16
22
|
FunctionCallVellumValueRequest,
|
17
23
|
ErrorVellumValueRequest,
|
24
|
+
ChatHistoryVellumValueRequest,
|
25
|
+
SearchResultsVellumValueRequest,
|
26
|
+
"ArrayVellumValueRequest",
|
18
27
|
]
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
5
|
+
import typing
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
7
|
+
import pydantic
|
8
|
+
from ..core.pydantic_utilities import update_forward_refs
|
9
|
+
|
10
|
+
|
11
|
+
class ArrayVellumValueRequest(UniversalBaseModel):
|
12
|
+
"""
|
13
|
+
A value representing an array of Vellum variable values.
|
14
|
+
"""
|
15
|
+
|
16
|
+
type: typing.Literal["ARRAY"] = "ARRAY"
|
17
|
+
value: typing.Optional[typing.List["ArrayVellumValueItemRequest"]] = None
|
18
|
+
|
19
|
+
if IS_PYDANTIC_V2:
|
20
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
21
|
+
else:
|
22
|
+
|
23
|
+
class Config:
|
24
|
+
frozen = True
|
25
|
+
smart_union = True
|
26
|
+
extra = pydantic.Extra.allow
|
27
|
+
|
28
|
+
|
29
|
+
from .array_vellum_value_item_request import ArrayVellumValueItemRequest # noqa: E402
|
30
|
+
|
31
|
+
update_forward_refs(ArrayVellumValueRequest)
|
@@ -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
|
+
import typing
|
5
|
+
from .chat_message import ChatMessage
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
7
|
+
import pydantic
|
8
|
+
|
9
|
+
|
10
|
+
class ChatHistoryVariableValue(UniversalBaseModel):
|
11
|
+
type: typing.Literal["CHAT_HISTORY"] = "CHAT_HISTORY"
|
12
|
+
value: typing.Optional[typing.List[ChatMessage]] = None
|
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
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
4
|
+
import typing
|
5
|
+
from .chat_message import ChatMessage
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
7
|
+
import pydantic
|
8
|
+
|
9
|
+
|
10
|
+
class ChatHistoryVellumValue(UniversalBaseModel):
|
11
|
+
"""
|
12
|
+
A value representing Chat History.
|
13
|
+
"""
|
14
|
+
|
15
|
+
type: typing.Literal["CHAT_HISTORY"] = "CHAT_HISTORY"
|
16
|
+
value: typing.Optional[typing.List[ChatMessage]] = None
|
17
|
+
|
18
|
+
if IS_PYDANTIC_V2:
|
19
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
20
|
+
else:
|
21
|
+
|
22
|
+
class Config:
|
23
|
+
frozen = True
|
24
|
+
smart_union = True
|
25
|
+
extra = pydantic.Extra.allow
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
4
|
+
import typing
|
5
|
+
from .chat_message_request import ChatMessageRequest
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
7
|
+
import pydantic
|
8
|
+
|
9
|
+
|
10
|
+
class ChatHistoryVellumValueRequest(UniversalBaseModel):
|
11
|
+
"""
|
12
|
+
A value representing Chat History.
|
13
|
+
"""
|
14
|
+
|
15
|
+
type: typing.Literal["CHAT_HISTORY"] = "CHAT_HISTORY"
|
16
|
+
value: typing.Optional[typing.List[ChatMessageRequest]] = None
|
17
|
+
|
18
|
+
if IS_PYDANTIC_V2:
|
19
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
20
|
+
else:
|
21
|
+
|
22
|
+
class Config:
|
23
|
+
frozen = True
|
24
|
+
smart_union = True
|
25
|
+
extra = pydantic.Extra.allow
|
@@ -1,10 +1,13 @@
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
2
2
|
|
3
|
+
from __future__ import annotations
|
3
4
|
from ..core.pydantic_utilities import UniversalBaseModel
|
5
|
+
from .array_variable_value import ArrayVariableValue
|
4
6
|
import typing
|
5
7
|
from .array_variable_value_item import ArrayVariableValueItem
|
6
8
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
7
9
|
import pydantic
|
10
|
+
from ..core.pydantic_utilities import update_forward_refs
|
8
11
|
|
9
12
|
|
10
13
|
class CodeExecutionNodeArrayResult(UniversalBaseModel):
|
@@ -20,3 +23,6 @@ class CodeExecutionNodeArrayResult(UniversalBaseModel):
|
|
20
23
|
frozen = True
|
21
24
|
smart_union = True
|
22
25
|
extra = pydantic.Extra.allow
|
26
|
+
|
27
|
+
|
28
|
+
update_forward_refs(ArrayVariableValue, CodeExecutionNodeArrayResult=CodeExecutionNodeArrayResult)
|
@@ -1,10 +1,13 @@
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
2
2
|
|
3
|
+
from __future__ import annotations
|
3
4
|
from ..core.pydantic_utilities import UniversalBaseModel
|
5
|
+
from .array_variable_value import ArrayVariableValue
|
4
6
|
import typing
|
5
7
|
from .code_execution_node_result_data import CodeExecutionNodeResultData
|
6
8
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
7
9
|
import pydantic
|
10
|
+
from ..core.pydantic_utilities import update_forward_refs
|
8
11
|
|
9
12
|
|
10
13
|
class CodeExecutionNodeResult(UniversalBaseModel):
|
@@ -23,3 +26,6 @@ class CodeExecutionNodeResult(UniversalBaseModel):
|
|
23
26
|
frozen = True
|
24
27
|
smart_union = True
|
25
28
|
extra = pydantic.Extra.allow
|
29
|
+
|
30
|
+
|
31
|
+
update_forward_refs(ArrayVariableValue, CodeExecutionNodeResult=CodeExecutionNodeResult)
|
@@ -1,10 +1,13 @@
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
2
2
|
|
3
|
+
from __future__ import annotations
|
3
4
|
from ..core.pydantic_utilities import UniversalBaseModel
|
5
|
+
from .array_variable_value import ArrayVariableValue
|
4
6
|
from .code_execution_node_result_output import CodeExecutionNodeResultOutput
|
5
7
|
import typing
|
6
8
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
7
9
|
import pydantic
|
10
|
+
from ..core.pydantic_utilities import update_forward_refs
|
8
11
|
|
9
12
|
|
10
13
|
class CodeExecutionNodeResultData(UniversalBaseModel):
|
@@ -19,3 +22,6 @@ class CodeExecutionNodeResultData(UniversalBaseModel):
|
|
19
22
|
frozen = True
|
20
23
|
smart_union = True
|
21
24
|
extra = pydantic.Extra.allow
|
25
|
+
|
26
|
+
|
27
|
+
update_forward_refs(ArrayVariableValue, CodeExecutionNodeResultData=CodeExecutionNodeResultData)
|
@@ -1,10 +1,13 @@
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
2
2
|
|
3
|
+
from __future__ import annotations
|
3
4
|
from ..core.pydantic_utilities import UniversalBaseModel
|
5
|
+
from .array_vellum_value_request import ArrayVellumValueRequest
|
4
6
|
import typing
|
5
7
|
import pydantic
|
6
8
|
from .named_test_case_variable_value_request import NamedTestCaseVariableValueRequest
|
7
9
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
10
|
+
from ..core.pydantic_utilities import update_forward_refs
|
8
11
|
|
9
12
|
|
10
13
|
class CreateTestSuiteTestCaseRequest(UniversalBaseModel):
|
@@ -40,3 +43,6 @@ class CreateTestSuiteTestCaseRequest(UniversalBaseModel):
|
|
40
43
|
frozen = True
|
41
44
|
smart_union = True
|
42
45
|
extra = pydantic.Extra.allow
|
46
|
+
|
47
|
+
|
48
|
+
update_forward_refs(ArrayVellumValueRequest, CreateTestSuiteTestCaseRequest=CreateTestSuiteTestCaseRequest)
|