vellum-ai 0.1.13__py3-none-any.whl → 0.2.1__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- vellum/__init__.py +172 -4
- vellum/client.py +214 -10
- vellum/core/client_wrapper.py +1 -1
- vellum/resources/__init__.py +15 -1
- vellum/resources/deployments/__init__.py +3 -0
- vellum/resources/deployments/client.py +113 -2
- vellum/resources/deployments/types/__init__.py +5 -0
- vellum/resources/deployments/types/deployments_list_request_status.py +17 -0
- vellum/resources/document_indexes/client.py +55 -9
- vellum/resources/documents/client.py +22 -2
- vellum/resources/model_versions/client.py +18 -0
- vellum/resources/registered_prompts/client.py +104 -0
- vellum/resources/sandboxes/client.py +66 -4
- vellum/resources/test_suites/client.py +6 -6
- vellum/resources/workflow_deployments/__init__.py +5 -0
- vellum/resources/workflow_deployments/client.py +116 -0
- vellum/resources/workflow_deployments/types/__init__.py +5 -0
- vellum/resources/workflow_deployments/types/workflow_deployments_list_request_status.py +17 -0
- vellum/types/__init__.py +180 -4
- vellum/types/array_chat_message_content.py +33 -0
- vellum/types/array_chat_message_content_item.py +43 -0
- vellum/types/array_chat_message_content_item_request.py +45 -0
- vellum/types/array_chat_message_content_request.py +33 -0
- vellum/types/array_enum.py +5 -0
- vellum/types/array_variable_value.py +35 -0
- vellum/types/chat_history_enum.py +5 -0
- vellum/types/chat_history_input_request.py +4 -0
- vellum/types/chat_history_variable_value.py +29 -0
- vellum/types/chat_message.py +3 -1
- vellum/types/chat_message_content.py +53 -0
- vellum/types/chat_message_content_request.py +56 -0
- vellum/types/chat_message_request.py +3 -1
- vellum/types/deployment_read.py +5 -11
- vellum/types/document_index_read.py +2 -2
- vellum/types/{document_index_status.py → entity_status.py} +3 -3
- vellum/types/error_enum.py +5 -0
- vellum/types/execute_workflow_error_response.py +28 -0
- vellum/types/execute_workflow_response.py +32 -0
- vellum/types/execute_workflow_workflow_result_event.py +33 -0
- vellum/types/fulfilled_execute_workflow_workflow_result_event.py +35 -0
- vellum/types/function_call_chat_message_content.py +33 -0
- vellum/types/function_call_chat_message_content_request.py +33 -0
- vellum/types/function_call_chat_message_content_value.py +34 -0
- vellum/types/function_call_chat_message_content_value_request.py +34 -0
- vellum/types/function_call_enum.py +5 -0
- vellum/types/image_chat_message_content.py +33 -0
- vellum/types/image_chat_message_content_request.py +33 -0
- vellum/types/image_enum.py +5 -0
- vellum/types/json_enum.py +5 -0
- vellum/types/json_input_request.py +4 -0
- vellum/types/model_version_exec_config_parameters.py +1 -0
- vellum/types/number_enum.py +5 -0
- vellum/types/number_variable_value.py +28 -0
- vellum/types/paginated_slim_deployment_read_list.py +32 -0
- vellum/types/paginated_slim_workflow_deployment_list.py +32 -0
- vellum/types/register_prompt_model_parameters_request.py +1 -0
- vellum/types/rejected_execute_workflow_workflow_result_event.py +35 -0
- vellum/types/scenario_input_type_enum.py +2 -2
- vellum/types/search_results_enum.py +5 -0
- vellum/types/search_results_variable_value.py +29 -0
- vellum/types/slim_deployment_read.py +48 -0
- vellum/types/slim_workflow_deployment.py +57 -0
- vellum/types/string_chat_message_content.py +32 -0
- vellum/types/string_chat_message_content_request.py +32 -0
- vellum/types/string_enum.py +5 -0
- vellum/types/string_input_request.py +4 -0
- vellum/types/variable_value.py +102 -0
- vellum/types/vellum_image.py +29 -0
- vellum/types/vellum_image_request.py +29 -0
- vellum/types/vellum_variable_type.py +5 -0
- vellum/types/workflow_output.py +111 -0
- vellum/types/workflow_output_array.py +35 -0
- vellum/types/workflow_output_chat_history.py +35 -0
- vellum/types/workflow_output_error.py +35 -0
- vellum/types/workflow_output_function_call.py +35 -0
- vellum/types/workflow_output_image.py +35 -0
- vellum/types/workflow_output_json.py +34 -0
- vellum/types/workflow_output_number.py +34 -0
- vellum/types/workflow_output_search_results.py +35 -0
- vellum/types/workflow_output_string.py +34 -0
- vellum/types/workflow_result_event.py +2 -0
- {vellum_ai-0.1.13.dist-info → vellum_ai-0.2.1.dist-info}/METADATA +1 -1
- {vellum_ai-0.1.13.dist-info → vellum_ai-0.2.1.dist-info}/RECORD +85 -31
- vellum/types/deployment_status.py +0 -31
- {vellum_ai-0.1.13.dist-info → vellum_ai-0.2.1.dist-info}/LICENSE +0 -0
- {vellum_ai-0.1.13.dist-info → vellum_ai-0.2.1.dist-info}/WHEEL +0 -0
vellum/types/__init__.py
CHANGED
@@ -2,9 +2,41 @@
|
|
2
2
|
|
3
3
|
from .api_node_result import ApiNodeResult
|
4
4
|
from .api_node_result_data import ApiNodeResultData
|
5
|
+
from .array_chat_message_content import ArrayChatMessageContent
|
6
|
+
from .array_chat_message_content_item import (
|
7
|
+
ArrayChatMessageContentItem,
|
8
|
+
ArrayChatMessageContentItem_FunctionCall,
|
9
|
+
ArrayChatMessageContentItem_Image,
|
10
|
+
ArrayChatMessageContentItem_String,
|
11
|
+
)
|
12
|
+
from .array_chat_message_content_item_request import (
|
13
|
+
ArrayChatMessageContentItemRequest,
|
14
|
+
ArrayChatMessageContentItemRequest_FunctionCall,
|
15
|
+
ArrayChatMessageContentItemRequest_Image,
|
16
|
+
ArrayChatMessageContentItemRequest_String,
|
17
|
+
)
|
18
|
+
from .array_chat_message_content_request import ArrayChatMessageContentRequest
|
19
|
+
from .array_enum import ArrayEnum
|
20
|
+
from .array_variable_value import ArrayVariableValue
|
5
21
|
from .block_type_enum import BlockTypeEnum
|
22
|
+
from .chat_history_enum import ChatHistoryEnum
|
6
23
|
from .chat_history_input_request import ChatHistoryInputRequest
|
24
|
+
from .chat_history_variable_value import ChatHistoryVariableValue
|
7
25
|
from .chat_message import ChatMessage
|
26
|
+
from .chat_message_content import (
|
27
|
+
ChatMessageContent,
|
28
|
+
ChatMessageContent_Array,
|
29
|
+
ChatMessageContent_FunctionCall,
|
30
|
+
ChatMessageContent_Image,
|
31
|
+
ChatMessageContent_String,
|
32
|
+
)
|
33
|
+
from .chat_message_content_request import (
|
34
|
+
ChatMessageContentRequest,
|
35
|
+
ChatMessageContentRequest_Array,
|
36
|
+
ChatMessageContentRequest_FunctionCall,
|
37
|
+
ChatMessageContentRequest_Image,
|
38
|
+
ChatMessageContentRequest_String,
|
39
|
+
)
|
8
40
|
from .chat_message_request import ChatMessageRequest
|
9
41
|
from .chat_message_role import ChatMessageRole
|
10
42
|
from .code_execution_node_chat_history_result import CodeExecutionNodeChatHistoryResult
|
@@ -28,14 +60,14 @@ from .conditional_node_result import ConditionalNodeResult
|
|
28
60
|
from .conditional_node_result_data import ConditionalNodeResultData
|
29
61
|
from .deployment_provider_payload_response import DeploymentProviderPayloadResponse
|
30
62
|
from .deployment_read import DeploymentRead
|
31
|
-
from .deployment_status import DeploymentStatus
|
32
63
|
from .document_document_to_document_index import DocumentDocumentToDocumentIndex
|
33
64
|
from .document_index_read import DocumentIndexRead
|
34
|
-
from .document_index_status import DocumentIndexStatus
|
35
65
|
from .document_read import DocumentRead
|
36
66
|
from .document_status import DocumentStatus
|
37
67
|
from .enriched_normalized_completion import EnrichedNormalizedCompletion
|
68
|
+
from .entity_status import EntityStatus
|
38
69
|
from .environment_enum import EnvironmentEnum
|
70
|
+
from .error_enum import ErrorEnum
|
39
71
|
from .error_variable_value import ErrorVariableValue
|
40
72
|
from .evaluation_params import EvaluationParams
|
41
73
|
from .evaluation_params_request import EvaluationParamsRequest
|
@@ -52,14 +84,27 @@ from .execute_prompt_response import (
|
|
52
84
|
ExecutePromptResponse_Fulfilled,
|
53
85
|
ExecutePromptResponse_Rejected,
|
54
86
|
)
|
87
|
+
from .execute_workflow_error_response import ExecuteWorkflowErrorResponse
|
88
|
+
from .execute_workflow_response import ExecuteWorkflowResponse
|
55
89
|
from .execute_workflow_stream_error_response import ExecuteWorkflowStreamErrorResponse
|
90
|
+
from .execute_workflow_workflow_result_event import (
|
91
|
+
ExecuteWorkflowWorkflowResultEvent,
|
92
|
+
ExecuteWorkflowWorkflowResultEvent_Fulfilled,
|
93
|
+
ExecuteWorkflowWorkflowResultEvent_Rejected,
|
94
|
+
)
|
56
95
|
from .finish_reason_enum import FinishReasonEnum
|
57
96
|
from .fulfilled_enum import FulfilledEnum
|
58
97
|
from .fulfilled_execute_prompt_event import FulfilledExecutePromptEvent
|
59
98
|
from .fulfilled_execute_prompt_response import FulfilledExecutePromptResponse
|
99
|
+
from .fulfilled_execute_workflow_workflow_result_event import FulfilledExecuteWorkflowWorkflowResultEvent
|
60
100
|
from .fulfilled_function_call import FulfilledFunctionCall
|
61
101
|
from .fulfilled_prompt_execution_meta import FulfilledPromptExecutionMeta
|
62
102
|
from .function_call import FunctionCall, FunctionCall_Fulfilled, FunctionCall_Rejected
|
103
|
+
from .function_call_chat_message_content import FunctionCallChatMessageContent
|
104
|
+
from .function_call_chat_message_content_request import FunctionCallChatMessageContentRequest
|
105
|
+
from .function_call_chat_message_content_value import FunctionCallChatMessageContentValue
|
106
|
+
from .function_call_chat_message_content_value_request import FunctionCallChatMessageContentValueRequest
|
107
|
+
from .function_call_enum import FunctionCallEnum
|
63
108
|
from .function_call_variable_value import FunctionCallVariableValue
|
64
109
|
from .generate_error_response import GenerateErrorResponse
|
65
110
|
from .generate_options_request import GenerateOptionsRequest
|
@@ -71,10 +116,14 @@ from .generate_result_error import GenerateResultError
|
|
71
116
|
from .generate_stream_response import GenerateStreamResponse
|
72
117
|
from .generate_stream_result import GenerateStreamResult
|
73
118
|
from .generate_stream_result_data import GenerateStreamResultData
|
119
|
+
from .image_chat_message_content import ImageChatMessageContent
|
120
|
+
from .image_chat_message_content_request import ImageChatMessageContentRequest
|
121
|
+
from .image_enum import ImageEnum
|
74
122
|
from .indexing_state_enum import IndexingStateEnum
|
75
123
|
from .initiated_enum import InitiatedEnum
|
76
124
|
from .initiated_execute_prompt_event import InitiatedExecutePromptEvent
|
77
125
|
from .initiated_prompt_execution_meta import InitiatedPromptExecutionMeta
|
126
|
+
from .json_enum import JsonEnum
|
78
127
|
from .json_input_request import JsonInputRequest
|
79
128
|
from .json_variable_value import JsonVariableValue
|
80
129
|
from .logical_operator import LogicalOperator
|
@@ -120,7 +169,11 @@ from .node_input_variable_compiled_value import (
|
|
120
169
|
)
|
121
170
|
from .normalized_log_probs import NormalizedLogProbs
|
122
171
|
from .normalized_token_log_probs import NormalizedTokenLogProbs
|
172
|
+
from .number_enum import NumberEnum
|
173
|
+
from .number_variable_value import NumberVariableValue
|
174
|
+
from .paginated_slim_deployment_read_list import PaginatedSlimDeploymentReadList
|
123
175
|
from .paginated_slim_document_list import PaginatedSlimDocumentList
|
176
|
+
from .paginated_slim_workflow_deployment_list import PaginatedSlimWorkflowDeploymentList
|
124
177
|
from .processing_failure_reason_enum import ProcessingFailureReasonEnum
|
125
178
|
from .processing_state_enum import ProcessingStateEnum
|
126
179
|
from .prompt_deployment_expand_meta_request_request import PromptDeploymentExpandMetaRequestRequest
|
@@ -161,6 +214,7 @@ from .registered_prompt_sandbox_snapshot import RegisteredPromptSandboxSnapshot
|
|
161
214
|
from .rejected_enum import RejectedEnum
|
162
215
|
from .rejected_execute_prompt_event import RejectedExecutePromptEvent
|
163
216
|
from .rejected_execute_prompt_response import RejectedExecutePromptResponse
|
217
|
+
from .rejected_execute_workflow_workflow_result_event import RejectedExecuteWorkflowWorkflowResultEvent
|
164
218
|
from .rejected_function_call import RejectedFunctionCall
|
165
219
|
from .rejected_prompt_execution_meta import RejectedPromptExecutionMeta
|
166
220
|
from .sandbox_metric_input_params import SandboxMetricInputParams
|
@@ -180,11 +234,18 @@ from .search_result_document import SearchResultDocument
|
|
180
234
|
from .search_result_document_request import SearchResultDocumentRequest
|
181
235
|
from .search_result_merging_request import SearchResultMergingRequest
|
182
236
|
from .search_result_request import SearchResultRequest
|
237
|
+
from .search_results_enum import SearchResultsEnum
|
238
|
+
from .search_results_variable_value import SearchResultsVariableValue
|
183
239
|
from .search_weights_request import SearchWeightsRequest
|
240
|
+
from .slim_deployment_read import SlimDeploymentRead
|
184
241
|
from .slim_document import SlimDocument
|
242
|
+
from .slim_workflow_deployment import SlimWorkflowDeployment
|
185
243
|
from .streaming_enum import StreamingEnum
|
186
244
|
from .streaming_execute_prompt_event import StreamingExecutePromptEvent
|
187
245
|
from .streaming_prompt_execution_meta import StreamingPromptExecutionMeta
|
246
|
+
from .string_chat_message_content import StringChatMessageContent
|
247
|
+
from .string_chat_message_content_request import StringChatMessageContentRequest
|
248
|
+
from .string_enum import StringEnum
|
188
249
|
from .string_input_request import StringInputRequest
|
189
250
|
from .string_variable_value import StringVariableValue
|
190
251
|
from .submit_completion_actual_request import SubmitCompletionActualRequest
|
@@ -247,9 +308,22 @@ from .test_case_variable_value import (
|
|
247
308
|
from .test_suite_test_case import TestSuiteTestCase
|
248
309
|
from .upload_document_error_response import UploadDocumentErrorResponse
|
249
310
|
from .upload_document_response import UploadDocumentResponse
|
311
|
+
from .variable_value import (
|
312
|
+
VariableValue,
|
313
|
+
VariableValue_Array,
|
314
|
+
VariableValue_ChatHistory,
|
315
|
+
VariableValue_Error,
|
316
|
+
VariableValue_FunctionCall,
|
317
|
+
VariableValue_Json,
|
318
|
+
VariableValue_Number,
|
319
|
+
VariableValue_SearchResults,
|
320
|
+
VariableValue_String,
|
321
|
+
)
|
250
322
|
from .vellum_error import VellumError
|
251
323
|
from .vellum_error_code_enum import VellumErrorCodeEnum
|
252
324
|
from .vellum_error_request import VellumErrorRequest
|
325
|
+
from .vellum_image import VellumImage
|
326
|
+
from .vellum_image_request import VellumImageRequest
|
253
327
|
from .vellum_variable import VellumVariable
|
254
328
|
from .vellum_variable_type import VellumVariableType
|
255
329
|
from .workflow_event_error import WorkflowEventError
|
@@ -272,6 +346,27 @@ from .workflow_node_result_data import (
|
|
272
346
|
)
|
273
347
|
from .workflow_node_result_event import WorkflowNodeResultEvent
|
274
348
|
from .workflow_node_result_event_state import WorkflowNodeResultEventState
|
349
|
+
from .workflow_output import (
|
350
|
+
WorkflowOutput,
|
351
|
+
WorkflowOutput_Array,
|
352
|
+
WorkflowOutput_ChatHistory,
|
353
|
+
WorkflowOutput_Error,
|
354
|
+
WorkflowOutput_FunctionCall,
|
355
|
+
WorkflowOutput_Image,
|
356
|
+
WorkflowOutput_Json,
|
357
|
+
WorkflowOutput_Number,
|
358
|
+
WorkflowOutput_SearchResults,
|
359
|
+
WorkflowOutput_String,
|
360
|
+
)
|
361
|
+
from .workflow_output_array import WorkflowOutputArray
|
362
|
+
from .workflow_output_chat_history import WorkflowOutputChatHistory
|
363
|
+
from .workflow_output_error import WorkflowOutputError
|
364
|
+
from .workflow_output_function_call import WorkflowOutputFunctionCall
|
365
|
+
from .workflow_output_image import WorkflowOutputImage
|
366
|
+
from .workflow_output_json import WorkflowOutputJson
|
367
|
+
from .workflow_output_number import WorkflowOutputNumber
|
368
|
+
from .workflow_output_search_results import WorkflowOutputSearchResults
|
369
|
+
from .workflow_output_string import WorkflowOutputString
|
275
370
|
from .workflow_request_chat_history_input_request import WorkflowRequestChatHistoryInputRequest
|
276
371
|
from .workflow_request_input_request import (
|
277
372
|
WorkflowRequestInputRequest,
|
@@ -304,9 +399,33 @@ from .workflow_stream_event import WorkflowStreamEvent, WorkflowStreamEvent_Node
|
|
304
399
|
__all__ = [
|
305
400
|
"ApiNodeResult",
|
306
401
|
"ApiNodeResultData",
|
402
|
+
"ArrayChatMessageContent",
|
403
|
+
"ArrayChatMessageContentItem",
|
404
|
+
"ArrayChatMessageContentItemRequest",
|
405
|
+
"ArrayChatMessageContentItemRequest_FunctionCall",
|
406
|
+
"ArrayChatMessageContentItemRequest_Image",
|
407
|
+
"ArrayChatMessageContentItemRequest_String",
|
408
|
+
"ArrayChatMessageContentItem_FunctionCall",
|
409
|
+
"ArrayChatMessageContentItem_Image",
|
410
|
+
"ArrayChatMessageContentItem_String",
|
411
|
+
"ArrayChatMessageContentRequest",
|
412
|
+
"ArrayEnum",
|
413
|
+
"ArrayVariableValue",
|
307
414
|
"BlockTypeEnum",
|
415
|
+
"ChatHistoryEnum",
|
308
416
|
"ChatHistoryInputRequest",
|
417
|
+
"ChatHistoryVariableValue",
|
309
418
|
"ChatMessage",
|
419
|
+
"ChatMessageContent",
|
420
|
+
"ChatMessageContentRequest",
|
421
|
+
"ChatMessageContentRequest_Array",
|
422
|
+
"ChatMessageContentRequest_FunctionCall",
|
423
|
+
"ChatMessageContentRequest_Image",
|
424
|
+
"ChatMessageContentRequest_String",
|
425
|
+
"ChatMessageContent_Array",
|
426
|
+
"ChatMessageContent_FunctionCall",
|
427
|
+
"ChatMessageContent_Image",
|
428
|
+
"ChatMessageContent_String",
|
310
429
|
"ChatMessageRequest",
|
311
430
|
"ChatMessageRole",
|
312
431
|
"CodeExecutionNodeChatHistoryResult",
|
@@ -328,14 +447,14 @@ __all__ = [
|
|
328
447
|
"ConditionalNodeResultData",
|
329
448
|
"DeploymentProviderPayloadResponse",
|
330
449
|
"DeploymentRead",
|
331
|
-
"DeploymentStatus",
|
332
450
|
"DocumentDocumentToDocumentIndex",
|
333
451
|
"DocumentIndexRead",
|
334
|
-
"DocumentIndexStatus",
|
335
452
|
"DocumentRead",
|
336
453
|
"DocumentStatus",
|
337
454
|
"EnrichedNormalizedCompletion",
|
455
|
+
"EntityStatus",
|
338
456
|
"EnvironmentEnum",
|
457
|
+
"ErrorEnum",
|
339
458
|
"ErrorVariableValue",
|
340
459
|
"EvaluationParams",
|
341
460
|
"EvaluationParamsRequest",
|
@@ -348,14 +467,25 @@ __all__ = [
|
|
348
467
|
"ExecutePromptResponse",
|
349
468
|
"ExecutePromptResponse_Fulfilled",
|
350
469
|
"ExecutePromptResponse_Rejected",
|
470
|
+
"ExecuteWorkflowErrorResponse",
|
471
|
+
"ExecuteWorkflowResponse",
|
351
472
|
"ExecuteWorkflowStreamErrorResponse",
|
473
|
+
"ExecuteWorkflowWorkflowResultEvent",
|
474
|
+
"ExecuteWorkflowWorkflowResultEvent_Fulfilled",
|
475
|
+
"ExecuteWorkflowWorkflowResultEvent_Rejected",
|
352
476
|
"FinishReasonEnum",
|
353
477
|
"FulfilledEnum",
|
354
478
|
"FulfilledExecutePromptEvent",
|
355
479
|
"FulfilledExecutePromptResponse",
|
480
|
+
"FulfilledExecuteWorkflowWorkflowResultEvent",
|
356
481
|
"FulfilledFunctionCall",
|
357
482
|
"FulfilledPromptExecutionMeta",
|
358
483
|
"FunctionCall",
|
484
|
+
"FunctionCallChatMessageContent",
|
485
|
+
"FunctionCallChatMessageContentRequest",
|
486
|
+
"FunctionCallChatMessageContentValue",
|
487
|
+
"FunctionCallChatMessageContentValueRequest",
|
488
|
+
"FunctionCallEnum",
|
359
489
|
"FunctionCallVariableValue",
|
360
490
|
"FunctionCall_Fulfilled",
|
361
491
|
"FunctionCall_Rejected",
|
@@ -369,10 +499,14 @@ __all__ = [
|
|
369
499
|
"GenerateStreamResponse",
|
370
500
|
"GenerateStreamResult",
|
371
501
|
"GenerateStreamResultData",
|
502
|
+
"ImageChatMessageContent",
|
503
|
+
"ImageChatMessageContentRequest",
|
504
|
+
"ImageEnum",
|
372
505
|
"IndexingStateEnum",
|
373
506
|
"InitiatedEnum",
|
374
507
|
"InitiatedExecutePromptEvent",
|
375
508
|
"InitiatedPromptExecutionMeta",
|
509
|
+
"JsonEnum",
|
376
510
|
"JsonInputRequest",
|
377
511
|
"JsonVariableValue",
|
378
512
|
"LogicalOperator",
|
@@ -414,7 +548,11 @@ __all__ = [
|
|
414
548
|
"NodeInputVariableCompiledValue_String",
|
415
549
|
"NormalizedLogProbs",
|
416
550
|
"NormalizedTokenLogProbs",
|
551
|
+
"NumberEnum",
|
552
|
+
"NumberVariableValue",
|
553
|
+
"PaginatedSlimDeploymentReadList",
|
417
554
|
"PaginatedSlimDocumentList",
|
555
|
+
"PaginatedSlimWorkflowDeploymentList",
|
418
556
|
"ProcessingFailureReasonEnum",
|
419
557
|
"ProcessingStateEnum",
|
420
558
|
"PromptDeploymentExpandMetaRequestRequest",
|
@@ -451,6 +589,7 @@ __all__ = [
|
|
451
589
|
"RejectedEnum",
|
452
590
|
"RejectedExecutePromptEvent",
|
453
591
|
"RejectedExecutePromptResponse",
|
592
|
+
"RejectedExecuteWorkflowWorkflowResultEvent",
|
454
593
|
"RejectedFunctionCall",
|
455
594
|
"RejectedPromptExecutionMeta",
|
456
595
|
"SandboxMetricInputParams",
|
@@ -470,11 +609,18 @@ __all__ = [
|
|
470
609
|
"SearchResultDocumentRequest",
|
471
610
|
"SearchResultMergingRequest",
|
472
611
|
"SearchResultRequest",
|
612
|
+
"SearchResultsEnum",
|
613
|
+
"SearchResultsVariableValue",
|
473
614
|
"SearchWeightsRequest",
|
615
|
+
"SlimDeploymentRead",
|
474
616
|
"SlimDocument",
|
617
|
+
"SlimWorkflowDeployment",
|
475
618
|
"StreamingEnum",
|
476
619
|
"StreamingExecutePromptEvent",
|
477
620
|
"StreamingPromptExecutionMeta",
|
621
|
+
"StringChatMessageContent",
|
622
|
+
"StringChatMessageContentRequest",
|
623
|
+
"StringEnum",
|
478
624
|
"StringInputRequest",
|
479
625
|
"StringVariableValue",
|
480
626
|
"SubmitCompletionActualRequest",
|
@@ -529,9 +675,20 @@ __all__ = [
|
|
529
675
|
"TestSuiteTestCase",
|
530
676
|
"UploadDocumentErrorResponse",
|
531
677
|
"UploadDocumentResponse",
|
678
|
+
"VariableValue",
|
679
|
+
"VariableValue_Array",
|
680
|
+
"VariableValue_ChatHistory",
|
681
|
+
"VariableValue_Error",
|
682
|
+
"VariableValue_FunctionCall",
|
683
|
+
"VariableValue_Json",
|
684
|
+
"VariableValue_Number",
|
685
|
+
"VariableValue_SearchResults",
|
686
|
+
"VariableValue_String",
|
532
687
|
"VellumError",
|
533
688
|
"VellumErrorCodeEnum",
|
534
689
|
"VellumErrorRequest",
|
690
|
+
"VellumImage",
|
691
|
+
"VellumImageRequest",
|
535
692
|
"VellumVariable",
|
536
693
|
"VellumVariableType",
|
537
694
|
"WorkflowEventError",
|
@@ -552,6 +709,25 @@ __all__ = [
|
|
552
709
|
"WorkflowNodeResultData_Terminal",
|
553
710
|
"WorkflowNodeResultEvent",
|
554
711
|
"WorkflowNodeResultEventState",
|
712
|
+
"WorkflowOutput",
|
713
|
+
"WorkflowOutputArray",
|
714
|
+
"WorkflowOutputChatHistory",
|
715
|
+
"WorkflowOutputError",
|
716
|
+
"WorkflowOutputFunctionCall",
|
717
|
+
"WorkflowOutputImage",
|
718
|
+
"WorkflowOutputJson",
|
719
|
+
"WorkflowOutputNumber",
|
720
|
+
"WorkflowOutputSearchResults",
|
721
|
+
"WorkflowOutputString",
|
722
|
+
"WorkflowOutput_Array",
|
723
|
+
"WorkflowOutput_ChatHistory",
|
724
|
+
"WorkflowOutput_Error",
|
725
|
+
"WorkflowOutput_FunctionCall",
|
726
|
+
"WorkflowOutput_Image",
|
727
|
+
"WorkflowOutput_Json",
|
728
|
+
"WorkflowOutput_Number",
|
729
|
+
"WorkflowOutput_SearchResults",
|
730
|
+
"WorkflowOutput_String",
|
555
731
|
"WorkflowRequestChatHistoryInputRequest",
|
556
732
|
"WorkflowRequestInputRequest",
|
557
733
|
"WorkflowRequestInputRequest_ChatHistory",
|
@@ -0,0 +1,33 @@
|
|
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 .array_chat_message_content_item import ArrayChatMessageContentItem
|
8
|
+
|
9
|
+
try:
|
10
|
+
import pydantic.v1 as pydantic # type: ignore
|
11
|
+
except ImportError:
|
12
|
+
import pydantic # type: ignore
|
13
|
+
|
14
|
+
|
15
|
+
class ArrayChatMessageContent(pydantic.BaseModel):
|
16
|
+
"""
|
17
|
+
A list of chat message content items.
|
18
|
+
"""
|
19
|
+
|
20
|
+
value: typing.List[ArrayChatMessageContentItem]
|
21
|
+
|
22
|
+
def json(self, **kwargs: typing.Any) -> str:
|
23
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
24
|
+
return super().json(**kwargs_with_defaults)
|
25
|
+
|
26
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
27
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
28
|
+
return super().dict(**kwargs_with_defaults)
|
29
|
+
|
30
|
+
class Config:
|
31
|
+
frozen = True
|
32
|
+
smart_union = True
|
33
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -0,0 +1,43 @@
|
|
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 .function_call_chat_message_content import FunctionCallChatMessageContent
|
10
|
+
from .image_chat_message_content import ImageChatMessageContent
|
11
|
+
from .string_chat_message_content import StringChatMessageContent
|
12
|
+
|
13
|
+
|
14
|
+
class ArrayChatMessageContentItem_String(StringChatMessageContent):
|
15
|
+
type: typing_extensions.Literal["STRING"]
|
16
|
+
|
17
|
+
class Config:
|
18
|
+
frozen = True
|
19
|
+
smart_union = True
|
20
|
+
allow_population_by_field_name = True
|
21
|
+
|
22
|
+
|
23
|
+
class ArrayChatMessageContentItem_FunctionCall(FunctionCallChatMessageContent):
|
24
|
+
type: typing_extensions.Literal["FUNCTION_CALL"]
|
25
|
+
|
26
|
+
class Config:
|
27
|
+
frozen = True
|
28
|
+
smart_union = True
|
29
|
+
allow_population_by_field_name = True
|
30
|
+
|
31
|
+
|
32
|
+
class ArrayChatMessageContentItem_Image(ImageChatMessageContent):
|
33
|
+
type: typing_extensions.Literal["IMAGE"]
|
34
|
+
|
35
|
+
class Config:
|
36
|
+
frozen = True
|
37
|
+
smart_union = True
|
38
|
+
allow_population_by_field_name = True
|
39
|
+
|
40
|
+
|
41
|
+
ArrayChatMessageContentItem = typing.Union[
|
42
|
+
ArrayChatMessageContentItem_String, ArrayChatMessageContentItem_FunctionCall, ArrayChatMessageContentItem_Image
|
43
|
+
]
|
@@ -0,0 +1,45 @@
|
|
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 .function_call_chat_message_content_request import FunctionCallChatMessageContentRequest
|
10
|
+
from .image_chat_message_content_request import ImageChatMessageContentRequest
|
11
|
+
from .string_chat_message_content_request import StringChatMessageContentRequest
|
12
|
+
|
13
|
+
|
14
|
+
class ArrayChatMessageContentItemRequest_String(StringChatMessageContentRequest):
|
15
|
+
type: typing_extensions.Literal["STRING"]
|
16
|
+
|
17
|
+
class Config:
|
18
|
+
frozen = True
|
19
|
+
smart_union = True
|
20
|
+
allow_population_by_field_name = True
|
21
|
+
|
22
|
+
|
23
|
+
class ArrayChatMessageContentItemRequest_FunctionCall(FunctionCallChatMessageContentRequest):
|
24
|
+
type: typing_extensions.Literal["FUNCTION_CALL"]
|
25
|
+
|
26
|
+
class Config:
|
27
|
+
frozen = True
|
28
|
+
smart_union = True
|
29
|
+
allow_population_by_field_name = True
|
30
|
+
|
31
|
+
|
32
|
+
class ArrayChatMessageContentItemRequest_Image(ImageChatMessageContentRequest):
|
33
|
+
type: typing_extensions.Literal["IMAGE"]
|
34
|
+
|
35
|
+
class Config:
|
36
|
+
frozen = True
|
37
|
+
smart_union = True
|
38
|
+
allow_population_by_field_name = True
|
39
|
+
|
40
|
+
|
41
|
+
ArrayChatMessageContentItemRequest = typing.Union[
|
42
|
+
ArrayChatMessageContentItemRequest_String,
|
43
|
+
ArrayChatMessageContentItemRequest_FunctionCall,
|
44
|
+
ArrayChatMessageContentItemRequest_Image,
|
45
|
+
]
|
@@ -0,0 +1,33 @@
|
|
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 .array_chat_message_content_item_request import ArrayChatMessageContentItemRequest
|
8
|
+
|
9
|
+
try:
|
10
|
+
import pydantic.v1 as pydantic # type: ignore
|
11
|
+
except ImportError:
|
12
|
+
import pydantic # type: ignore
|
13
|
+
|
14
|
+
|
15
|
+
class ArrayChatMessageContentRequest(pydantic.BaseModel):
|
16
|
+
"""
|
17
|
+
A list of chat message content items.
|
18
|
+
"""
|
19
|
+
|
20
|
+
value: typing.List[ArrayChatMessageContentItemRequest]
|
21
|
+
|
22
|
+
def json(self, **kwargs: typing.Any) -> str:
|
23
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
24
|
+
return super().json(**kwargs_with_defaults)
|
25
|
+
|
26
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
27
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
28
|
+
return super().dict(**kwargs_with_defaults)
|
29
|
+
|
30
|
+
class Config:
|
31
|
+
frozen = True
|
32
|
+
smart_union = True
|
33
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
import datetime as dt
|
6
|
+
import typing
|
7
|
+
|
8
|
+
from ..core.datetime_utils import serialize_datetime
|
9
|
+
|
10
|
+
try:
|
11
|
+
import pydantic.v1 as pydantic # type: ignore
|
12
|
+
except ImportError:
|
13
|
+
import pydantic # type: ignore
|
14
|
+
|
15
|
+
|
16
|
+
class ArrayVariableValue(pydantic.BaseModel):
|
17
|
+
value: typing.List[VariableValue]
|
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}
|
31
|
+
|
32
|
+
|
33
|
+
from .variable_value import VariableValue # noqa: E402
|
34
|
+
|
35
|
+
ArrayVariableValue.update_forward_refs()
|
@@ -13,6 +13,10 @@ except ImportError:
|
|
13
13
|
|
14
14
|
|
15
15
|
class ChatHistoryInputRequest(pydantic.BaseModel):
|
16
|
+
"""
|
17
|
+
A user input representing a list of chat messages
|
18
|
+
"""
|
19
|
+
|
16
20
|
name: str = pydantic.Field(description="The variable's name, as defined in the deployment.")
|
17
21
|
value: typing.List[ChatMessageRequest]
|
18
22
|
|
@@ -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 .chat_message import ChatMessage
|
8
|
+
|
9
|
+
try:
|
10
|
+
import pydantic.v1 as pydantic # type: ignore
|
11
|
+
except ImportError:
|
12
|
+
import pydantic # type: ignore
|
13
|
+
|
14
|
+
|
15
|
+
class ChatHistoryVariableValue(pydantic.BaseModel):
|
16
|
+
value: typing.Optional[typing.List[ChatMessage]]
|
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}
|
vellum/types/chat_message.py
CHANGED
@@ -4,6 +4,7 @@ import datetime as dt
|
|
4
4
|
import typing
|
5
5
|
|
6
6
|
from ..core.datetime_utils import serialize_datetime
|
7
|
+
from .chat_message_content import ChatMessageContent
|
7
8
|
from .chat_message_role import ChatMessageRole
|
8
9
|
|
9
10
|
try:
|
@@ -13,8 +14,9 @@ except ImportError:
|
|
13
14
|
|
14
15
|
|
15
16
|
class ChatMessage(pydantic.BaseModel):
|
16
|
-
text: str
|
17
|
+
text: typing.Optional[str]
|
17
18
|
role: ChatMessageRole
|
19
|
+
content: typing.Optional[ChatMessageContent]
|
18
20
|
|
19
21
|
def json(self, **kwargs: typing.Any) -> str:
|
20
22
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -0,0 +1,53 @@
|
|
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 .array_chat_message_content import ArrayChatMessageContent
|
10
|
+
from .function_call_chat_message_content import FunctionCallChatMessageContent
|
11
|
+
from .image_chat_message_content import ImageChatMessageContent
|
12
|
+
from .string_chat_message_content import StringChatMessageContent
|
13
|
+
|
14
|
+
|
15
|
+
class ChatMessageContent_String(StringChatMessageContent):
|
16
|
+
type: typing_extensions.Literal["STRING"]
|
17
|
+
|
18
|
+
class Config:
|
19
|
+
frozen = True
|
20
|
+
smart_union = True
|
21
|
+
allow_population_by_field_name = True
|
22
|
+
|
23
|
+
|
24
|
+
class ChatMessageContent_FunctionCall(FunctionCallChatMessageContent):
|
25
|
+
type: typing_extensions.Literal["FUNCTION_CALL"]
|
26
|
+
|
27
|
+
class Config:
|
28
|
+
frozen = True
|
29
|
+
smart_union = True
|
30
|
+
allow_population_by_field_name = True
|
31
|
+
|
32
|
+
|
33
|
+
class ChatMessageContent_Array(ArrayChatMessageContent):
|
34
|
+
type: typing_extensions.Literal["ARRAY"]
|
35
|
+
|
36
|
+
class Config:
|
37
|
+
frozen = True
|
38
|
+
smart_union = True
|
39
|
+
allow_population_by_field_name = True
|
40
|
+
|
41
|
+
|
42
|
+
class ChatMessageContent_Image(ImageChatMessageContent):
|
43
|
+
type: typing_extensions.Literal["IMAGE"]
|
44
|
+
|
45
|
+
class Config:
|
46
|
+
frozen = True
|
47
|
+
smart_union = True
|
48
|
+
allow_population_by_field_name = True
|
49
|
+
|
50
|
+
|
51
|
+
ChatMessageContent = typing.Union[
|
52
|
+
ChatMessageContent_String, ChatMessageContent_FunctionCall, ChatMessageContent_Array, ChatMessageContent_Image
|
53
|
+
]
|