vellum-ai 1.2.1__py3-none-any.whl → 1.2.3__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.
Files changed (128) hide show
  1. vellum/__init__.py +40 -0
  2. vellum/client/core/client_wrapper.py +2 -2
  3. vellum/client/core/pydantic_utilities.py +3 -2
  4. vellum/client/reference.md +16 -0
  5. vellum/client/resources/workflow_executions/client.py +28 -4
  6. vellum/client/resources/workflow_executions/raw_client.py +32 -2
  7. vellum/client/types/__init__.py +40 -0
  8. vellum/client/types/audio_input_request.py +30 -0
  9. vellum/client/types/delimiter_chunker_config.py +20 -0
  10. vellum/client/types/delimiter_chunker_config_request.py +20 -0
  11. vellum/client/types/delimiter_chunking.py +21 -0
  12. vellum/client/types/delimiter_chunking_request.py +21 -0
  13. vellum/client/types/document_index_chunking.py +4 -1
  14. vellum/client/types/document_index_chunking_request.py +2 -1
  15. vellum/client/types/document_input_request.py +30 -0
  16. vellum/client/types/execution_audio_vellum_value.py +31 -0
  17. vellum/client/types/execution_document_vellum_value.py +31 -0
  18. vellum/client/types/execution_image_vellum_value.py +31 -0
  19. vellum/client/types/execution_vellum_value.py +8 -0
  20. vellum/client/types/execution_video_vellum_value.py +31 -0
  21. vellum/client/types/image_input_request.py +30 -0
  22. vellum/client/types/logical_operator.py +1 -0
  23. vellum/client/types/node_input_compiled_audio_value.py +23 -0
  24. vellum/client/types/node_input_compiled_document_value.py +23 -0
  25. vellum/client/types/node_input_compiled_image_value.py +23 -0
  26. vellum/client/types/node_input_compiled_video_value.py +23 -0
  27. vellum/client/types/node_input_variable_compiled_value.py +8 -0
  28. vellum/client/types/prompt_deployment_input_request.py +13 -1
  29. vellum/client/types/prompt_request_audio_input.py +26 -0
  30. vellum/client/types/prompt_request_document_input.py +26 -0
  31. vellum/client/types/prompt_request_image_input.py +26 -0
  32. vellum/client/types/prompt_request_input.py +13 -1
  33. vellum/client/types/prompt_request_video_input.py +26 -0
  34. vellum/client/types/video_input_request.py +30 -0
  35. vellum/prompts/blocks/compilation.py +13 -11
  36. vellum/types/audio_input_request.py +3 -0
  37. vellum/types/delimiter_chunker_config.py +3 -0
  38. vellum/types/delimiter_chunker_config_request.py +3 -0
  39. vellum/types/delimiter_chunking.py +3 -0
  40. vellum/types/delimiter_chunking_request.py +3 -0
  41. vellum/types/document_input_request.py +3 -0
  42. vellum/types/execution_audio_vellum_value.py +3 -0
  43. vellum/types/execution_document_vellum_value.py +3 -0
  44. vellum/types/execution_image_vellum_value.py +3 -0
  45. vellum/types/execution_video_vellum_value.py +3 -0
  46. vellum/types/image_input_request.py +3 -0
  47. vellum/types/node_input_compiled_audio_value.py +3 -0
  48. vellum/types/node_input_compiled_document_value.py +3 -0
  49. vellum/types/node_input_compiled_image_value.py +3 -0
  50. vellum/types/node_input_compiled_video_value.py +3 -0
  51. vellum/types/prompt_request_audio_input.py +3 -0
  52. vellum/types/prompt_request_document_input.py +3 -0
  53. vellum/types/prompt_request_image_input.py +3 -0
  54. vellum/types/prompt_request_video_input.py +3 -0
  55. vellum/types/video_input_request.py +3 -0
  56. vellum/workflows/context.py +27 -9
  57. vellum/workflows/emitters/vellum_emitter.py +16 -69
  58. vellum/workflows/events/context.py +53 -78
  59. vellum/workflows/events/node.py +5 -5
  60. vellum/workflows/events/relational_threads.py +41 -0
  61. vellum/workflows/events/tests/test_basic_workflow.py +50 -0
  62. vellum/workflows/events/tests/test_event.py +1 -0
  63. vellum/workflows/events/workflow.py +15 -1
  64. vellum/workflows/expressions/contains.py +7 -0
  65. vellum/workflows/expressions/tests/test_contains.py +175 -0
  66. vellum/workflows/graph/graph.py +52 -8
  67. vellum/workflows/graph/tests/test_graph.py +17 -0
  68. vellum/workflows/integrations/mcp_service.py +35 -5
  69. vellum/workflows/integrations/tests/test_mcp_service.py +81 -0
  70. vellum/workflows/nodes/bases/base.py +0 -1
  71. vellum/workflows/nodes/core/error_node/node.py +4 -0
  72. vellum/workflows/nodes/core/inline_subworkflow_node/tests/test_node.py +35 -0
  73. vellum/workflows/nodes/core/map_node/node.py +7 -0
  74. vellum/workflows/nodes/core/map_node/tests/test_node.py +19 -0
  75. vellum/workflows/nodes/displayable/bases/utils.py +4 -2
  76. vellum/workflows/nodes/displayable/final_output_node/node.py +4 -0
  77. vellum/workflows/nodes/displayable/subworkflow_deployment_node/node.py +88 -2
  78. vellum/workflows/nodes/displayable/tool_calling_node/node.py +1 -0
  79. vellum/workflows/nodes/displayable/tool_calling_node/tests/test_node.py +85 -1
  80. vellum/workflows/nodes/displayable/tool_calling_node/tests/test_utils.py +12 -0
  81. vellum/workflows/nodes/displayable/tool_calling_node/utils.py +5 -2
  82. vellum/workflows/ports/node_ports.py +3 -0
  83. vellum/workflows/ports/port.py +8 -11
  84. vellum/workflows/state/context.py +47 -2
  85. vellum/workflows/types/definition.py +4 -4
  86. vellum/workflows/utils/uuids.py +15 -0
  87. vellum/workflows/utils/vellum_variables.py +5 -3
  88. vellum/workflows/workflows/base.py +1 -0
  89. {vellum_ai-1.2.1.dist-info → vellum_ai-1.2.3.dist-info}/METADATA +1 -1
  90. {vellum_ai-1.2.1.dist-info → vellum_ai-1.2.3.dist-info}/RECORD +128 -82
  91. vellum_ee/workflows/display/nodes/base_node_display.py +19 -10
  92. vellum_ee/workflows/display/nodes/vellum/api_node.py +1 -4
  93. vellum_ee/workflows/display/nodes/vellum/code_execution_node.py +1 -4
  94. vellum_ee/workflows/display/nodes/vellum/conditional_node.py +1 -4
  95. vellum_ee/workflows/display/nodes/vellum/error_node.py +1 -3
  96. vellum_ee/workflows/display/nodes/vellum/final_output_node.py +1 -3
  97. vellum_ee/workflows/display/nodes/vellum/guardrail_node.py +1 -4
  98. vellum_ee/workflows/display/nodes/vellum/inline_prompt_node.py +1 -8
  99. vellum_ee/workflows/display/nodes/vellum/inline_subworkflow_node.py +1 -4
  100. vellum_ee/workflows/display/nodes/vellum/map_node.py +1 -4
  101. vellum_ee/workflows/display/nodes/vellum/merge_node.py +1 -4
  102. vellum_ee/workflows/display/nodes/vellum/note_node.py +2 -4
  103. vellum_ee/workflows/display/nodes/vellum/prompt_deployment_node.py +1 -4
  104. vellum_ee/workflows/display/nodes/vellum/search_node.py +1 -4
  105. vellum_ee/workflows/display/nodes/vellum/subworkflow_deployment_node.py +1 -4
  106. vellum_ee/workflows/display/nodes/vellum/templating_node.py +1 -4
  107. vellum_ee/workflows/display/nodes/vellum/tests/test_code_execution_node.py +1 -0
  108. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_api_node_serialization.py +4 -0
  109. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_code_execution_node_serialization.py +12 -0
  110. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_conditional_node_serialization.py +16 -0
  111. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_error_node_serialization.py +5 -0
  112. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_guardrail_node_serialization.py +4 -0
  113. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_inline_subworkflow_serialization.py +4 -0
  114. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_map_node_serialization.py +4 -0
  115. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_merge_node_serialization.py +4 -0
  116. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_prompt_deployment_serialization.py +12 -0
  117. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_search_node_serialization.py +4 -0
  118. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_subworkflow_deployment_serialization.py +4 -0
  119. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_templating_node_serialization.py +4 -0
  120. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_terminal_node_serialization.py +5 -0
  121. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_composio_serialization.py +1 -0
  122. vellum_ee/workflows/display/tests/workflow_serialization/test_complex_terminal_node_serialization.py +5 -0
  123. vellum_ee/workflows/display/utils/events.py +24 -0
  124. vellum_ee/workflows/display/utils/tests/test_events.py +69 -0
  125. vellum_ee/workflows/tests/test_server.py +95 -0
  126. {vellum_ai-1.2.1.dist-info → vellum_ai-1.2.3.dist-info}/LICENSE +0 -0
  127. {vellum_ai-1.2.1.dist-info → vellum_ai-1.2.3.dist-info}/WHEEL +0 -0
  128. {vellum_ai-1.2.1.dist-info → vellum_ai-1.2.3.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,21 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .delimiter_chunker_config_request import DelimiterChunkerConfigRequest
8
+
9
+
10
+ class DelimiterChunkingRequest(UniversalBaseModel):
11
+ chunker_name: typing.Literal["delimiter-chunker"] = "delimiter-chunker"
12
+ chunker_config: typing.Optional[DelimiterChunkerConfigRequest] = 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
@@ -2,8 +2,11 @@
2
2
 
3
3
  import typing
4
4
 
5
+ from .delimiter_chunking import DelimiterChunking
5
6
  from .reducto_chunking import ReductoChunking
6
7
  from .sentence_chunking import SentenceChunking
7
8
  from .token_overlapping_window_chunking import TokenOverlappingWindowChunking
8
9
 
9
- DocumentIndexChunking = typing.Union[ReductoChunking, SentenceChunking, TokenOverlappingWindowChunking]
10
+ DocumentIndexChunking = typing.Union[
11
+ ReductoChunking, SentenceChunking, TokenOverlappingWindowChunking, DelimiterChunking
12
+ ]
@@ -2,10 +2,11 @@
2
2
 
3
3
  import typing
4
4
 
5
+ from .delimiter_chunking_request import DelimiterChunkingRequest
5
6
  from .reducto_chunking_request import ReductoChunkingRequest
6
7
  from .sentence_chunking_request import SentenceChunkingRequest
7
8
  from .token_overlapping_window_chunking_request import TokenOverlappingWindowChunkingRequest
8
9
 
9
10
  DocumentIndexChunkingRequest = typing.Union[
10
- ReductoChunkingRequest, SentenceChunkingRequest, TokenOverlappingWindowChunkingRequest
11
+ ReductoChunkingRequest, SentenceChunkingRequest, TokenOverlappingWindowChunkingRequest, DelimiterChunkingRequest
11
12
  ]
@@ -0,0 +1,30 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .vellum_document_request import VellumDocumentRequest
8
+
9
+
10
+ class DocumentInputRequest(UniversalBaseModel):
11
+ """
12
+ A user input representing a Vellum Document value
13
+ """
14
+
15
+ name: str = pydantic.Field()
16
+ """
17
+ The variable's name
18
+ """
19
+
20
+ type: typing.Literal["DOCUMENT"] = "DOCUMENT"
21
+ value: VellumDocumentRequest
22
+
23
+ if IS_PYDANTIC_V2:
24
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
25
+ else:
26
+
27
+ class Config:
28
+ frozen = True
29
+ smart_union = True
30
+ extra = pydantic.Extra.allow
@@ -0,0 +1,31 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .vellum_audio import VellumAudio
8
+
9
+
10
+ class ExecutionAudioVellumValue(UniversalBaseModel):
11
+ """
12
+ A base Vellum primitive value representing audio.
13
+ """
14
+
15
+ id: str = pydantic.Field()
16
+ """
17
+ The variable's uniquely identifying internal id.
18
+ """
19
+
20
+ name: str
21
+ type: typing.Literal["AUDIO"] = "AUDIO"
22
+ value: typing.Optional[VellumAudio] = None
23
+
24
+ if IS_PYDANTIC_V2:
25
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
26
+ else:
27
+
28
+ class Config:
29
+ frozen = True
30
+ smart_union = True
31
+ extra = pydantic.Extra.allow
@@ -0,0 +1,31 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .vellum_document import VellumDocument
8
+
9
+
10
+ class ExecutionDocumentVellumValue(UniversalBaseModel):
11
+ """
12
+ A base Vellum primitive value representing a document.
13
+ """
14
+
15
+ id: str = pydantic.Field()
16
+ """
17
+ The variable's uniquely identifying internal id.
18
+ """
19
+
20
+ name: str
21
+ type: typing.Literal["DOCUMENT"] = "DOCUMENT"
22
+ value: typing.Optional[VellumDocument] = None
23
+
24
+ if IS_PYDANTIC_V2:
25
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
26
+ else:
27
+
28
+ class Config:
29
+ frozen = True
30
+ smart_union = True
31
+ extra = pydantic.Extra.allow
@@ -0,0 +1,31 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .vellum_image import VellumImage
8
+
9
+
10
+ class ExecutionImageVellumValue(UniversalBaseModel):
11
+ """
12
+ A base Vellum primitive value representing an image.
13
+ """
14
+
15
+ id: str = pydantic.Field()
16
+ """
17
+ The variable's uniquely identifying internal id.
18
+ """
19
+
20
+ name: str
21
+ type: typing.Literal["IMAGE"] = "IMAGE"
22
+ value: typing.Optional[VellumImage] = None
23
+
24
+ if IS_PYDANTIC_V2:
25
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
26
+ else:
27
+
28
+ class Config:
29
+ frozen = True
30
+ smart_union = True
31
+ extra = pydantic.Extra.allow
@@ -3,14 +3,18 @@
3
3
  import typing
4
4
 
5
5
  from .execution_array_vellum_value import ExecutionArrayVellumValue
6
+ from .execution_audio_vellum_value import ExecutionAudioVellumValue
6
7
  from .execution_chat_history_vellum_value import ExecutionChatHistoryVellumValue
8
+ from .execution_document_vellum_value import ExecutionDocumentVellumValue
7
9
  from .execution_error_vellum_value import ExecutionErrorVellumValue
8
10
  from .execution_function_call_vellum_value import ExecutionFunctionCallVellumValue
11
+ from .execution_image_vellum_value import ExecutionImageVellumValue
9
12
  from .execution_json_vellum_value import ExecutionJsonVellumValue
10
13
  from .execution_number_vellum_value import ExecutionNumberVellumValue
11
14
  from .execution_search_results_vellum_value import ExecutionSearchResultsVellumValue
12
15
  from .execution_string_vellum_value import ExecutionStringVellumValue
13
16
  from .execution_thinking_vellum_value import ExecutionThinkingVellumValue
17
+ from .execution_video_vellum_value import ExecutionVideoVellumValue
14
18
 
15
19
  ExecutionVellumValue = typing.Union[
16
20
  ExecutionStringVellumValue,
@@ -22,4 +26,8 @@ ExecutionVellumValue = typing.Union[
22
26
  ExecutionArrayVellumValue,
23
27
  ExecutionFunctionCallVellumValue,
24
28
  ExecutionThinkingVellumValue,
29
+ ExecutionAudioVellumValue,
30
+ ExecutionVideoVellumValue,
31
+ ExecutionImageVellumValue,
32
+ ExecutionDocumentVellumValue,
25
33
  ]
@@ -0,0 +1,31 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .vellum_video import VellumVideo
8
+
9
+
10
+ class ExecutionVideoVellumValue(UniversalBaseModel):
11
+ """
12
+ A base Vellum primitive value representing a video.
13
+ """
14
+
15
+ id: str = pydantic.Field()
16
+ """
17
+ The variable's uniquely identifying internal id.
18
+ """
19
+
20
+ name: str
21
+ type: typing.Literal["VIDEO"] = "VIDEO"
22
+ value: typing.Optional[VellumVideo] = None
23
+
24
+ if IS_PYDANTIC_V2:
25
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
26
+ else:
27
+
28
+ class Config:
29
+ frozen = True
30
+ smart_union = True
31
+ extra = pydantic.Extra.allow
@@ -0,0 +1,30 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .vellum_image_request import VellumImageRequest
8
+
9
+
10
+ class ImageInputRequest(UniversalBaseModel):
11
+ """
12
+ A user input representing a Vellum Image value
13
+ """
14
+
15
+ name: str = pydantic.Field()
16
+ """
17
+ The variable's name
18
+ """
19
+
20
+ type: typing.Literal["IMAGE"] = "IMAGE"
21
+ value: VellumImageRequest
22
+
23
+ if IS_PYDANTIC_V2:
24
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
25
+ else:
26
+
27
+ class Config:
28
+ frozen = True
29
+ smart_union = True
30
+ extra = pydantic.Extra.allow
@@ -30,6 +30,7 @@ LogicalOperator = typing.Union[
30
30
  "and",
31
31
  "or",
32
32
  "isError",
33
+ "length",
33
34
  ],
34
35
  typing.Any,
35
36
  ]
@@ -0,0 +1,23 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .vellum_audio import VellumAudio
8
+
9
+
10
+ class NodeInputCompiledAudioValue(UniversalBaseModel):
11
+ node_input_id: str
12
+ key: str
13
+ type: typing.Literal["AUDIO"] = "AUDIO"
14
+ value: typing.Optional[VellumAudio] = None
15
+
16
+ if IS_PYDANTIC_V2:
17
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
18
+ else:
19
+
20
+ class Config:
21
+ frozen = True
22
+ smart_union = True
23
+ extra = pydantic.Extra.allow
@@ -0,0 +1,23 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .vellum_document import VellumDocument
8
+
9
+
10
+ class NodeInputCompiledDocumentValue(UniversalBaseModel):
11
+ node_input_id: str
12
+ key: str
13
+ type: typing.Literal["DOCUMENT"] = "DOCUMENT"
14
+ value: typing.Optional[VellumDocument] = None
15
+
16
+ if IS_PYDANTIC_V2:
17
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
18
+ else:
19
+
20
+ class Config:
21
+ frozen = True
22
+ smart_union = True
23
+ extra = pydantic.Extra.allow
@@ -0,0 +1,23 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .vellum_image import VellumImage
8
+
9
+
10
+ class NodeInputCompiledImageValue(UniversalBaseModel):
11
+ node_input_id: str
12
+ key: str
13
+ type: typing.Literal["IMAGE"] = "IMAGE"
14
+ value: typing.Optional[VellumImage] = None
15
+
16
+ if IS_PYDANTIC_V2:
17
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
18
+ else:
19
+
20
+ class Config:
21
+ frozen = True
22
+ smart_union = True
23
+ extra = pydantic.Extra.allow
@@ -0,0 +1,23 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .vellum_video import VellumVideo
8
+
9
+
10
+ class NodeInputCompiledVideoValue(UniversalBaseModel):
11
+ node_input_id: str
12
+ key: str
13
+ type: typing.Literal["VIDEO"] = "VIDEO"
14
+ value: typing.Optional[VellumVideo] = None
15
+
16
+ if IS_PYDANTIC_V2:
17
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
18
+ else:
19
+
20
+ class Config:
21
+ frozen = True
22
+ smart_union = True
23
+ extra = pydantic.Extra.allow
@@ -3,14 +3,18 @@
3
3
  import typing
4
4
 
5
5
  from .node_input_compiled_array_value import NodeInputCompiledArrayValue
6
+ from .node_input_compiled_audio_value import NodeInputCompiledAudioValue
6
7
  from .node_input_compiled_chat_history_value import NodeInputCompiledChatHistoryValue
8
+ from .node_input_compiled_document_value import NodeInputCompiledDocumentValue
7
9
  from .node_input_compiled_error_value import NodeInputCompiledErrorValue
8
10
  from .node_input_compiled_function_call_value import NodeInputCompiledFunctionCallValue
11
+ from .node_input_compiled_image_value import NodeInputCompiledImageValue
9
12
  from .node_input_compiled_json_value import NodeInputCompiledJsonValue
10
13
  from .node_input_compiled_number_value import NodeInputCompiledNumberValue
11
14
  from .node_input_compiled_search_results_value import NodeInputCompiledSearchResultsValue
12
15
  from .node_input_compiled_secret_value import NodeInputCompiledSecretValue
13
16
  from .node_input_compiled_string_value import NodeInputCompiledStringValue
17
+ from .node_input_compiled_video_value import NodeInputCompiledVideoValue
14
18
 
15
19
  NodeInputVariableCompiledValue = typing.Union[
16
20
  NodeInputCompiledStringValue,
@@ -22,4 +26,8 @@ NodeInputVariableCompiledValue = typing.Union[
22
26
  NodeInputCompiledArrayValue,
23
27
  NodeInputCompiledFunctionCallValue,
24
28
  NodeInputCompiledSecretValue,
29
+ NodeInputCompiledAudioValue,
30
+ NodeInputCompiledVideoValue,
31
+ NodeInputCompiledImageValue,
32
+ NodeInputCompiledDocumentValue,
25
33
  ]
@@ -2,8 +2,20 @@
2
2
 
3
3
  import typing
4
4
 
5
+ from .audio_input_request import AudioInputRequest
5
6
  from .chat_history_input_request import ChatHistoryInputRequest
7
+ from .document_input_request import DocumentInputRequest
8
+ from .image_input_request import ImageInputRequest
6
9
  from .json_input_request import JsonInputRequest
7
10
  from .string_input_request import StringInputRequest
11
+ from .video_input_request import VideoInputRequest
8
12
 
9
- PromptDeploymentInputRequest = typing.Union[StringInputRequest, JsonInputRequest, ChatHistoryInputRequest]
13
+ PromptDeploymentInputRequest = typing.Union[
14
+ StringInputRequest,
15
+ JsonInputRequest,
16
+ ChatHistoryInputRequest,
17
+ AudioInputRequest,
18
+ VideoInputRequest,
19
+ ImageInputRequest,
20
+ DocumentInputRequest,
21
+ ]
@@ -0,0 +1,26 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .vellum_audio import VellumAudio
8
+
9
+
10
+ class PromptRequestAudioInput(UniversalBaseModel):
11
+ key: str = pydantic.Field()
12
+ """
13
+ The variable's name, as defined in the Prompt.
14
+ """
15
+
16
+ type: typing.Literal["AUDIO"] = "AUDIO"
17
+ value: VellumAudio
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
@@ -0,0 +1,26 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .vellum_document import VellumDocument
8
+
9
+
10
+ class PromptRequestDocumentInput(UniversalBaseModel):
11
+ key: str = pydantic.Field()
12
+ """
13
+ The variable's name, as defined in the Prompt.
14
+ """
15
+
16
+ type: typing.Literal["DOCUMENT"] = "DOCUMENT"
17
+ value: VellumDocument
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
@@ -0,0 +1,26 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .vellum_image import VellumImage
8
+
9
+
10
+ class PromptRequestImageInput(UniversalBaseModel):
11
+ key: str = pydantic.Field()
12
+ """
13
+ The variable's name, as defined in the Prompt.
14
+ """
15
+
16
+ type: typing.Literal["IMAGE"] = "IMAGE"
17
+ value: VellumImage
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
@@ -2,8 +2,20 @@
2
2
 
3
3
  import typing
4
4
 
5
+ from .prompt_request_audio_input import PromptRequestAudioInput
5
6
  from .prompt_request_chat_history_input import PromptRequestChatHistoryInput
7
+ from .prompt_request_document_input import PromptRequestDocumentInput
8
+ from .prompt_request_image_input import PromptRequestImageInput
6
9
  from .prompt_request_json_input import PromptRequestJsonInput
7
10
  from .prompt_request_string_input import PromptRequestStringInput
11
+ from .prompt_request_video_input import PromptRequestVideoInput
8
12
 
9
- PromptRequestInput = typing.Union[PromptRequestStringInput, PromptRequestJsonInput, PromptRequestChatHistoryInput]
13
+ PromptRequestInput = typing.Union[
14
+ PromptRequestStringInput,
15
+ PromptRequestJsonInput,
16
+ PromptRequestChatHistoryInput,
17
+ PromptRequestAudioInput,
18
+ PromptRequestVideoInput,
19
+ PromptRequestImageInput,
20
+ PromptRequestDocumentInput,
21
+ ]
@@ -0,0 +1,26 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .vellum_video import VellumVideo
8
+
9
+
10
+ class PromptRequestVideoInput(UniversalBaseModel):
11
+ key: str = pydantic.Field()
12
+ """
13
+ The variable's name, as defined in the Prompt.
14
+ """
15
+
16
+ type: typing.Literal["VIDEO"] = "VIDEO"
17
+ value: VellumVideo
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
@@ -0,0 +1,30 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .vellum_video_request import VellumVideoRequest
8
+
9
+
10
+ class VideoInputRequest(UniversalBaseModel):
11
+ """
12
+ A user input representing a Vellum Video value
13
+ """
14
+
15
+ name: str = pydantic.Field()
16
+ """
17
+ The variable's name
18
+ """
19
+
20
+ type: typing.Literal["VIDEO"] = "VIDEO"
21
+ value: VellumVideoRequest
22
+
23
+ if IS_PYDANTIC_V2:
24
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
25
+ else:
26
+
27
+ class Config:
28
+ frozen = True
29
+ smart_union = True
30
+ extra = pydantic.Extra.allow
@@ -19,6 +19,8 @@ from vellum.client.types.image_vellum_value import ImageVellumValue
19
19
  from vellum.client.types.number_input import NumberInput
20
20
  from vellum.client.types.vellum_audio import VellumAudio
21
21
  from vellum.client.types.vellum_image import VellumImage
22
+ from vellum.client.types.vellum_video import VellumVideo
23
+ from vellum.client.types.video_vellum_value import VideoVellumValue
22
24
  from vellum.prompts.blocks.exceptions import PromptCompilationError
23
25
  from vellum.prompts.blocks.types import CompiledChatMessagePromptBlock, CompiledPromptBlock, CompiledValuePromptBlock
24
26
  from vellum.utils.templating.constants import DEFAULT_JINJA_CUSTOM_FILTERS, DEFAULT_JINJA_GLOBALS
@@ -154,17 +156,17 @@ def compile_prompt_blocks(
154
156
  )
155
157
  compiled_blocks.append(audio_block)
156
158
 
157
- # elif block.block_type == "VIDEO":
158
- # video_block = CompiledValuePromptBlock(
159
- # content=VideoVellumValue(
160
- # value=VellumVideo(
161
- # src=block.src,
162
- # metadata=block.metadata,
163
- # ),
164
- # ),
165
- # cache_config=block.cache_config,
166
- # )
167
- # compiled_blocks.append(video_block)
159
+ elif block.block_type == "VIDEO":
160
+ video_block = CompiledValuePromptBlock(
161
+ content=VideoVellumValue(
162
+ value=VellumVideo(
163
+ src=block.src,
164
+ metadata=block.metadata,
165
+ ),
166
+ ),
167
+ cache_config=block.cache_config,
168
+ )
169
+ compiled_blocks.append(video_block)
168
170
 
169
171
  elif block.block_type == "IMAGE":
170
172
  image_block = CompiledValuePromptBlock(
@@ -0,0 +1,3 @@
1
+ # WARNING: This file will be removed in a future release. Please import from "vellum.client" instead.
2
+
3
+ from vellum.client.types.audio_input_request import *
@@ -0,0 +1,3 @@
1
+ # WARNING: This file will be removed in a future release. Please import from "vellum.client" instead.
2
+
3
+ from vellum.client.types.delimiter_chunker_config import *
@@ -0,0 +1,3 @@
1
+ # WARNING: This file will be removed in a future release. Please import from "vellum.client" instead.
2
+
3
+ from vellum.client.types.delimiter_chunker_config_request import *
@@ -0,0 +1,3 @@
1
+ # WARNING: This file will be removed in a future release. Please import from "vellum.client" instead.
2
+
3
+ from vellum.client.types.delimiter_chunking import *
@@ -0,0 +1,3 @@
1
+ # WARNING: This file will be removed in a future release. Please import from "vellum.client" instead.
2
+
3
+ from vellum.client.types.delimiter_chunking_request import *
@@ -0,0 +1,3 @@
1
+ # WARNING: This file will be removed in a future release. Please import from "vellum.client" instead.
2
+
3
+ from vellum.client.types.document_input_request import *
@@ -0,0 +1,3 @@
1
+ # WARNING: This file will be removed in a future release. Please import from "vellum.client" instead.
2
+
3
+ from vellum.client.types.execution_audio_vellum_value import *