vellum-ai 0.9.5__py3-none-any.whl → 0.9.9__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. vellum/__init__.py +32 -42
  2. vellum/core/client_wrapper.py +1 -1
  3. vellum/resources/ad_hoc/client.py +86 -98
  4. vellum/types/__init__.py +32 -42
  5. vellum/types/{ad_hoc_expand_meta_request.py → ad_hoc_expand_meta.py} +1 -1
  6. vellum/types/{chat_message_prompt_block_request.py → chat_message_prompt_block.py} +11 -11
  7. vellum/types/{ephemeral_prompt_cache_config_request.py → ephemeral_prompt_cache_config.py} +1 -1
  8. vellum/types/{function_definition_prompt_block_request.py → function_definition_prompt_block.py} +7 -7
  9. vellum/types/{jinja_prompt_block_request.py → jinja_prompt_block.py} +7 -7
  10. vellum/types/{plain_text_prompt_block_request.py → plain_text_prompt_block.py} +4 -5
  11. vellum/types/prompt_block.py +15 -0
  12. vellum/types/{prompt_parameters_request.py → prompt_parameters.py} +1 -1
  13. vellum/types/{prompt_request_chat_history_input_request.py → prompt_request_chat_history_input.py} +3 -3
  14. vellum/types/prompt_request_input.py +8 -0
  15. vellum/types/{prompt_request_json_input_request.py → prompt_request_json_input.py} +1 -1
  16. vellum/types/{prompt_request_string_input_request.py → prompt_request_string_input.py} +1 -1
  17. vellum/types/{prompt_settings_request.py → prompt_settings.py} +1 -1
  18. vellum/types/rich_text_child_block.py +7 -0
  19. vellum/types/{rich_text_prompt_block_request.py → rich_text_prompt_block.py} +6 -7
  20. vellum/types/{variable_prompt_block_request.py → variable_prompt_block.py} +4 -5
  21. {vellum_ai-0.9.5.dist-info → vellum_ai-0.9.9.dist-info}/METADATA +1 -1
  22. {vellum_ai-0.9.5.dist-info → vellum_ai-0.9.9.dist-info}/RECORD +24 -29
  23. vellum/types/chat_message_prompt_block_properties_request.py +0 -38
  24. vellum/types/function_definition_prompt_block_properties_request.py +0 -42
  25. vellum/types/jinja_prompt_block_properties_request.py +0 -21
  26. vellum/types/prompt_block_request.py +0 -19
  27. vellum/types/prompt_request_input_request.py +0 -10
  28. vellum/types/rich_text_child_block_request.py +0 -7
  29. vellum/types/vellum_variable_extensions_request.py +0 -23
  30. vellum/types/vellum_variable_request.py +0 -33
  31. {vellum_ai-0.9.5.dist-info → vellum_ai-0.9.9.dist-info}/LICENSE +0 -0
  32. {vellum_ai-0.9.5.dist-info → vellum_ai-0.9.9.dist-info}/WHEEL +0 -0
vellum/types/__init__.py CHANGED
@@ -1,7 +1,7 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
3
  from .ad_hoc_execute_prompt_event import AdHocExecutePromptEvent
4
- from .ad_hoc_expand_meta_request import AdHocExpandMetaRequest
4
+ from .ad_hoc_expand_meta import AdHocExpandMeta
5
5
  from .ad_hoc_fulfilled_prompt_execution_meta import AdHocFulfilledPromptExecutionMeta
6
6
  from .ad_hoc_initiated_prompt_execution_meta import AdHocInitiatedPromptExecutionMeta
7
7
  from .ad_hoc_rejected_prompt_execution_meta import AdHocRejectedPromptExecutionMeta
@@ -44,8 +44,7 @@ from .chat_history_vellum_value_request import ChatHistoryVellumValueRequest
44
44
  from .chat_message import ChatMessage
45
45
  from .chat_message_content import ChatMessageContent
46
46
  from .chat_message_content_request import ChatMessageContentRequest
47
- from .chat_message_prompt_block_properties_request import ChatMessagePromptBlockPropertiesRequest
48
- from .chat_message_prompt_block_request import ChatMessagePromptBlockRequest
47
+ from .chat_message_prompt_block import ChatMessagePromptBlock
49
48
  from .chat_message_request import ChatMessageRequest
50
49
  from .chat_message_role import ChatMessageRole
51
50
  from .code_execution_node_array_result import CodeExecutionNodeArrayResult
@@ -91,7 +90,7 @@ from .enriched_normalized_completion import EnrichedNormalizedCompletion
91
90
  from .entity_status import EntityStatus
92
91
  from .entity_visibility import EntityVisibility
93
92
  from .environment_enum import EnvironmentEnum
94
- from .ephemeral_prompt_cache_config_request import EphemeralPromptCacheConfigRequest
93
+ from .ephemeral_prompt_cache_config import EphemeralPromptCacheConfig
95
94
  from .ephemeral_prompt_cache_config_type_enum import EphemeralPromptCacheConfigTypeEnum
96
95
  from .error_input_request import ErrorInputRequest
97
96
  from .error_variable_value import ErrorVariableValue
@@ -141,8 +140,7 @@ from .function_call_request import FunctionCallRequest
141
140
  from .function_call_variable_value import FunctionCallVariableValue
142
141
  from .function_call_vellum_value import FunctionCallVellumValue
143
142
  from .function_call_vellum_value_request import FunctionCallVellumValueRequest
144
- from .function_definition_prompt_block_properties_request import FunctionDefinitionPromptBlockPropertiesRequest
145
- from .function_definition_prompt_block_request import FunctionDefinitionPromptBlockRequest
143
+ from .function_definition_prompt_block import FunctionDefinitionPromptBlock
146
144
  from .generate_options_request import GenerateOptionsRequest
147
145
  from .generate_request import GenerateRequest
148
146
  from .generate_response import GenerateResponse
@@ -179,8 +177,7 @@ from .initiated_workflow_node_result_event import InitiatedWorkflowNodeResultEve
179
177
  from .instructor_vectorizer_config import InstructorVectorizerConfig
180
178
  from .instructor_vectorizer_config_request import InstructorVectorizerConfigRequest
181
179
  from .iteration_state_enum import IterationStateEnum
182
- from .jinja_prompt_block_properties_request import JinjaPromptBlockPropertiesRequest
183
- from .jinja_prompt_block_request import JinjaPromptBlockRequest
180
+ from .jinja_prompt_block import JinjaPromptBlock
184
181
  from .json_input_request import JsonInputRequest
185
182
  from .json_variable_value import JsonVariableValue
186
183
  from .json_vellum_value import JsonVellumValue
@@ -265,11 +262,11 @@ from .paginated_test_suite_test_case_list import PaginatedTestSuiteTestCaseList
265
262
  from .paginated_workflow_release_tag_read_list import PaginatedWorkflowReleaseTagReadList
266
263
  from .pdf_search_result_meta_source import PdfSearchResultMetaSource
267
264
  from .pdf_search_result_meta_source_request import PdfSearchResultMetaSourceRequest
268
- from .plain_text_prompt_block_request import PlainTextPromptBlockRequest
265
+ from .plain_text_prompt_block import PlainTextPromptBlock
269
266
  from .price import Price
270
267
  from .processing_failure_reason_enum import ProcessingFailureReasonEnum
271
268
  from .processing_state_enum import ProcessingStateEnum
272
- from .prompt_block_request import PromptBlockRequest
269
+ from .prompt_block import PromptBlock
273
270
  from .prompt_block_state import PromptBlockState
274
271
  from .prompt_deployment_expand_meta_request import PromptDeploymentExpandMetaRequest
275
272
  from .prompt_deployment_input_request import PromptDeploymentInputRequest
@@ -278,12 +275,12 @@ from .prompt_node_execution_meta import PromptNodeExecutionMeta
278
275
  from .prompt_node_result import PromptNodeResult
279
276
  from .prompt_node_result_data import PromptNodeResultData
280
277
  from .prompt_output import PromptOutput
281
- from .prompt_parameters_request import PromptParametersRequest
282
- from .prompt_request_chat_history_input_request import PromptRequestChatHistoryInputRequest
283
- from .prompt_request_input_request import PromptRequestInputRequest
284
- from .prompt_request_json_input_request import PromptRequestJsonInputRequest
285
- from .prompt_request_string_input_request import PromptRequestStringInputRequest
286
- from .prompt_settings_request import PromptSettingsRequest
278
+ from .prompt_parameters import PromptParameters
279
+ from .prompt_request_chat_history_input import PromptRequestChatHistoryInput
280
+ from .prompt_request_input import PromptRequestInput
281
+ from .prompt_request_json_input import PromptRequestJsonInput
282
+ from .prompt_request_string_input import PromptRequestStringInput
283
+ from .prompt_settings import PromptSettings
287
284
  from .raw_prompt_execution_overrides_request import RawPromptExecutionOverridesRequest
288
285
  from .reducto_chunker_config import ReductoChunkerConfig
289
286
  from .reducto_chunker_config_request import ReductoChunkerConfigRequest
@@ -297,8 +294,8 @@ from .rejected_prompt_execution_meta import RejectedPromptExecutionMeta
297
294
  from .rejected_workflow_node_result_event import RejectedWorkflowNodeResultEvent
298
295
  from .release_tag_source import ReleaseTagSource
299
296
  from .replace_test_suite_test_case_request import ReplaceTestSuiteTestCaseRequest
300
- from .rich_text_child_block_request import RichTextChildBlockRequest
301
- from .rich_text_prompt_block_request import RichTextPromptBlockRequest
297
+ from .rich_text_child_block import RichTextChildBlock
298
+ from .rich_text_prompt_block import RichTextPromptBlock
302
299
  from .sandbox_scenario import SandboxScenario
303
300
  from .scenario_input import ScenarioInput
304
301
  from .scenario_input_chat_history_variable_value import ScenarioInputChatHistoryVariableValue
@@ -434,7 +431,7 @@ from .token_overlapping_window_chunking_request import TokenOverlappingWindowChu
434
431
  from .unit_enum import UnitEnum
435
432
  from .upload_document_response import UploadDocumentResponse
436
433
  from .upsert_test_suite_test_case_request import UpsertTestSuiteTestCaseRequest
437
- from .variable_prompt_block_request import VariablePromptBlockRequest
434
+ from .variable_prompt_block import VariablePromptBlock
438
435
  from .vellum_audio import VellumAudio
439
436
  from .vellum_audio_request import VellumAudioRequest
440
437
  from .vellum_error import VellumError
@@ -449,8 +446,6 @@ from .vellum_value_logical_expression_request import VellumValueLogicalExpressio
449
446
  from .vellum_value_request import VellumValueRequest
450
447
  from .vellum_variable import VellumVariable
451
448
  from .vellum_variable_extensions import VellumVariableExtensions
452
- from .vellum_variable_extensions_request import VellumVariableExtensionsRequest
453
- from .vellum_variable_request import VellumVariableRequest
454
449
  from .vellum_variable_type import VellumVariableType
455
450
  from .workflow_deployment_read import WorkflowDeploymentRead
456
451
  from .workflow_event_error import WorkflowEventError
@@ -500,7 +495,7 @@ from .workspace_secret_read import WorkspaceSecretRead
500
495
 
501
496
  __all__ = [
502
497
  "AdHocExecutePromptEvent",
503
- "AdHocExpandMetaRequest",
498
+ "AdHocExpandMeta",
504
499
  "AdHocFulfilledPromptExecutionMeta",
505
500
  "AdHocInitiatedPromptExecutionMeta",
506
501
  "AdHocRejectedPromptExecutionMeta",
@@ -535,8 +530,7 @@ __all__ = [
535
530
  "ChatMessage",
536
531
  "ChatMessageContent",
537
532
  "ChatMessageContentRequest",
538
- "ChatMessagePromptBlockPropertiesRequest",
539
- "ChatMessagePromptBlockRequest",
533
+ "ChatMessagePromptBlock",
540
534
  "ChatMessageRequest",
541
535
  "ChatMessageRole",
542
536
  "CodeExecutionNodeArrayResult",
@@ -582,7 +576,7 @@ __all__ = [
582
576
  "EntityStatus",
583
577
  "EntityVisibility",
584
578
  "EnvironmentEnum",
585
- "EphemeralPromptCacheConfigRequest",
579
+ "EphemeralPromptCacheConfig",
586
580
  "EphemeralPromptCacheConfigTypeEnum",
587
581
  "ErrorInputRequest",
588
582
  "ErrorVariableValue",
@@ -632,8 +626,7 @@ __all__ = [
632
626
  "FunctionCallVariableValue",
633
627
  "FunctionCallVellumValue",
634
628
  "FunctionCallVellumValueRequest",
635
- "FunctionDefinitionPromptBlockPropertiesRequest",
636
- "FunctionDefinitionPromptBlockRequest",
629
+ "FunctionDefinitionPromptBlock",
637
630
  "GenerateOptionsRequest",
638
631
  "GenerateRequest",
639
632
  "GenerateResponse",
@@ -666,8 +659,7 @@ __all__ = [
666
659
  "InstructorVectorizerConfig",
667
660
  "InstructorVectorizerConfigRequest",
668
661
  "IterationStateEnum",
669
- "JinjaPromptBlockPropertiesRequest",
670
- "JinjaPromptBlockRequest",
662
+ "JinjaPromptBlock",
671
663
  "JsonInputRequest",
672
664
  "JsonVariableValue",
673
665
  "JsonVellumValue",
@@ -752,11 +744,11 @@ __all__ = [
752
744
  "PaginatedWorkflowReleaseTagReadList",
753
745
  "PdfSearchResultMetaSource",
754
746
  "PdfSearchResultMetaSourceRequest",
755
- "PlainTextPromptBlockRequest",
747
+ "PlainTextPromptBlock",
756
748
  "Price",
757
749
  "ProcessingFailureReasonEnum",
758
750
  "ProcessingStateEnum",
759
- "PromptBlockRequest",
751
+ "PromptBlock",
760
752
  "PromptBlockState",
761
753
  "PromptDeploymentExpandMetaRequest",
762
754
  "PromptDeploymentInputRequest",
@@ -765,12 +757,12 @@ __all__ = [
765
757
  "PromptNodeResult",
766
758
  "PromptNodeResultData",
767
759
  "PromptOutput",
768
- "PromptParametersRequest",
769
- "PromptRequestChatHistoryInputRequest",
770
- "PromptRequestInputRequest",
771
- "PromptRequestJsonInputRequest",
772
- "PromptRequestStringInputRequest",
773
- "PromptSettingsRequest",
760
+ "PromptParameters",
761
+ "PromptRequestChatHistoryInput",
762
+ "PromptRequestInput",
763
+ "PromptRequestJsonInput",
764
+ "PromptRequestStringInput",
765
+ "PromptSettings",
774
766
  "RawPromptExecutionOverridesRequest",
775
767
  "ReductoChunkerConfig",
776
768
  "ReductoChunkerConfigRequest",
@@ -784,8 +776,8 @@ __all__ = [
784
776
  "RejectedWorkflowNodeResultEvent",
785
777
  "ReleaseTagSource",
786
778
  "ReplaceTestSuiteTestCaseRequest",
787
- "RichTextChildBlockRequest",
788
- "RichTextPromptBlockRequest",
779
+ "RichTextChildBlock",
780
+ "RichTextPromptBlock",
789
781
  "SandboxScenario",
790
782
  "ScenarioInput",
791
783
  "ScenarioInputChatHistoryVariableValue",
@@ -917,7 +909,7 @@ __all__ = [
917
909
  "UnitEnum",
918
910
  "UploadDocumentResponse",
919
911
  "UpsertTestSuiteTestCaseRequest",
920
- "VariablePromptBlockRequest",
912
+ "VariablePromptBlock",
921
913
  "VellumAudio",
922
914
  "VellumAudioRequest",
923
915
  "VellumError",
@@ -932,8 +924,6 @@ __all__ = [
932
924
  "VellumValueRequest",
933
925
  "VellumVariable",
934
926
  "VellumVariableExtensions",
935
- "VellumVariableExtensionsRequest",
936
- "VellumVariableRequest",
937
927
  "VellumVariableType",
938
928
  "WorkflowDeploymentRead",
939
929
  "WorkflowEventError",
@@ -6,7 +6,7 @@ import pydantic
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
7
 
8
8
 
9
- class AdHocExpandMetaRequest(UniversalBaseModel):
9
+ class AdHocExpandMeta(UniversalBaseModel):
10
10
  cost: typing.Optional[bool] = pydantic.Field(default=None)
11
11
  """
12
12
  If enabled, the response will include model host cost tracking. This may increase latency for some model hosts.
@@ -4,22 +4,25 @@ from __future__ import annotations
4
4
  from ..core.pydantic_utilities import UniversalBaseModel
5
5
  import typing
6
6
  from .prompt_block_state import PromptBlockState
7
- from .ephemeral_prompt_cache_config_request import EphemeralPromptCacheConfigRequest
7
+ from .ephemeral_prompt_cache_config import EphemeralPromptCacheConfig
8
+ from .chat_message_role import ChatMessageRole
8
9
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
9
10
  import pydantic
10
11
  from ..core.pydantic_utilities import update_forward_refs
11
12
 
12
13
 
13
- class ChatMessagePromptBlockRequest(UniversalBaseModel):
14
+ class ChatMessagePromptBlock(UniversalBaseModel):
14
15
  """
15
16
  A block that represents a chat message in a prompt template.
16
17
  """
17
18
 
18
- block_type: typing.Literal["CHAT_MESSAGE"] = "CHAT_MESSAGE"
19
- properties: "ChatMessagePromptBlockPropertiesRequest"
20
- id: str
21
19
  state: typing.Optional[PromptBlockState] = None
22
- cache_config: typing.Optional[EphemeralPromptCacheConfigRequest] = None
20
+ cache_config: typing.Optional[EphemeralPromptCacheConfig] = None
21
+ block_type: typing.Literal["CHAT_MESSAGE"] = "CHAT_MESSAGE"
22
+ chat_role: ChatMessageRole
23
+ chat_source: typing.Optional[str] = None
24
+ chat_message_unterminated: typing.Optional[bool] = None
25
+ blocks: typing.List["PromptBlock"]
23
26
 
24
27
  if IS_PYDANTIC_V2:
25
28
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -31,9 +34,6 @@ class ChatMessagePromptBlockRequest(UniversalBaseModel):
31
34
  extra = pydantic.Extra.allow
32
35
 
33
36
 
34
- from .chat_message_prompt_block_properties_request import ChatMessagePromptBlockPropertiesRequest # noqa: E402
37
+ from .prompt_block import PromptBlock # noqa: E402
35
38
 
36
- update_forward_refs(
37
- ChatMessagePromptBlockPropertiesRequest, ChatMessagePromptBlockRequest=ChatMessagePromptBlockRequest
38
- )
39
- update_forward_refs(ChatMessagePromptBlockRequest)
39
+ update_forward_refs(ChatMessagePromptBlock)
@@ -7,7 +7,7 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
7
  import pydantic
8
8
 
9
9
 
10
- class EphemeralPromptCacheConfigRequest(UniversalBaseModel):
10
+ class EphemeralPromptCacheConfig(UniversalBaseModel):
11
11
  type: typing.Optional[EphemeralPromptCacheConfigTypeEnum] = None
12
12
 
13
13
  if IS_PYDANTIC_V2:
@@ -2,23 +2,23 @@
2
2
 
3
3
  from ..core.pydantic_utilities import UniversalBaseModel
4
4
  import typing
5
- from .function_definition_prompt_block_properties_request import FunctionDefinitionPromptBlockPropertiesRequest
6
5
  from .prompt_block_state import PromptBlockState
7
- from .ephemeral_prompt_cache_config_request import EphemeralPromptCacheConfigRequest
6
+ from .ephemeral_prompt_cache_config import EphemeralPromptCacheConfig
8
7
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
9
8
  import pydantic
10
9
 
11
10
 
12
- class FunctionDefinitionPromptBlockRequest(UniversalBaseModel):
11
+ class FunctionDefinitionPromptBlock(UniversalBaseModel):
13
12
  """
14
13
  A block that represents a function definition in a prompt template.
15
14
  """
16
15
 
17
- block_type: typing.Literal["FUNCTION_DEFINITION"] = "FUNCTION_DEFINITION"
18
- properties: FunctionDefinitionPromptBlockPropertiesRequest
19
- id: str
20
16
  state: typing.Optional[PromptBlockState] = None
21
- cache_config: typing.Optional[EphemeralPromptCacheConfigRequest] = None
17
+ cache_config: typing.Optional[EphemeralPromptCacheConfig] = None
18
+ block_type: typing.Literal["FUNCTION_DEFINITION"] = "FUNCTION_DEFINITION"
19
+ function_name: typing.Optional[str] = None
20
+ function_description: typing.Optional[str] = None
21
+ function_parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
22
22
 
23
23
  if IS_PYDANTIC_V2:
24
24
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -2,23 +2,23 @@
2
2
 
3
3
  from ..core.pydantic_utilities import UniversalBaseModel
4
4
  import typing
5
- from .jinja_prompt_block_properties_request import JinjaPromptBlockPropertiesRequest
6
5
  from .prompt_block_state import PromptBlockState
7
- from .ephemeral_prompt_cache_config_request import EphemeralPromptCacheConfigRequest
6
+ from .ephemeral_prompt_cache_config import EphemeralPromptCacheConfig
7
+ from .vellum_variable_type import VellumVariableType
8
8
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
9
9
  import pydantic
10
10
 
11
11
 
12
- class JinjaPromptBlockRequest(UniversalBaseModel):
12
+ class JinjaPromptBlock(UniversalBaseModel):
13
13
  """
14
14
  A block of Jinja template code that is used to generate a prompt
15
15
  """
16
16
 
17
- block_type: typing.Literal["JINJA"] = "JINJA"
18
- properties: JinjaPromptBlockPropertiesRequest
19
- id: str
20
17
  state: typing.Optional[PromptBlockState] = None
21
- cache_config: typing.Optional[EphemeralPromptCacheConfigRequest] = None
18
+ cache_config: typing.Optional[EphemeralPromptCacheConfig] = None
19
+ block_type: typing.Literal["JINJA"] = "JINJA"
20
+ template: str
21
+ template_type: VellumVariableType
22
22
 
23
23
  if IS_PYDANTIC_V2:
24
24
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -3,21 +3,20 @@
3
3
  from ..core.pydantic_utilities import UniversalBaseModel
4
4
  import typing
5
5
  from .prompt_block_state import PromptBlockState
6
- from .ephemeral_prompt_cache_config_request import EphemeralPromptCacheConfigRequest
6
+ from .ephemeral_prompt_cache_config import EphemeralPromptCacheConfig
7
7
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
8
8
  import pydantic
9
9
 
10
10
 
11
- class PlainTextPromptBlockRequest(UniversalBaseModel):
11
+ class PlainTextPromptBlock(UniversalBaseModel):
12
12
  """
13
13
  A block that holds a plain text string value.
14
14
  """
15
15
 
16
+ state: typing.Optional[PromptBlockState] = None
17
+ cache_config: typing.Optional[EphemeralPromptCacheConfig] = None
16
18
  block_type: typing.Literal["PLAIN_TEXT"] = "PLAIN_TEXT"
17
19
  text: str
18
- id: str
19
- state: typing.Optional[PromptBlockState] = None
20
- cache_config: typing.Optional[EphemeralPromptCacheConfigRequest] = None
21
20
 
22
21
  if IS_PYDANTIC_V2:
23
22
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -0,0 +1,15 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from __future__ import annotations
4
+ import typing
5
+ from .jinja_prompt_block import JinjaPromptBlock
6
+ from .function_definition_prompt_block import FunctionDefinitionPromptBlock
7
+ from .variable_prompt_block import VariablePromptBlock
8
+ from .rich_text_prompt_block import RichTextPromptBlock
9
+ import typing
10
+
11
+ if typing.TYPE_CHECKING:
12
+ from .chat_message_prompt_block import ChatMessagePromptBlock
13
+ PromptBlock = typing.Union[
14
+ JinjaPromptBlock, "ChatMessagePromptBlock", FunctionDefinitionPromptBlock, VariablePromptBlock, RichTextPromptBlock
15
+ ]
@@ -6,7 +6,7 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
6
  import pydantic
7
7
 
8
8
 
9
- class PromptParametersRequest(UniversalBaseModel):
9
+ class PromptParameters(UniversalBaseModel):
10
10
  stop: typing.Optional[typing.List[str]] = None
11
11
  temperature: typing.Optional[float] = None
12
12
  max_tokens: typing.Optional[int] = None
@@ -3,18 +3,18 @@
3
3
  from ..core.pydantic_utilities import UniversalBaseModel
4
4
  import pydantic
5
5
  import typing
6
- from .chat_message_request import ChatMessageRequest
6
+ from .chat_message import ChatMessage
7
7
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
8
8
 
9
9
 
10
- class PromptRequestChatHistoryInputRequest(UniversalBaseModel):
10
+ class PromptRequestChatHistoryInput(UniversalBaseModel):
11
11
  key: str = pydantic.Field()
12
12
  """
13
13
  The variable's name, as defined in the Prompt.
14
14
  """
15
15
 
16
16
  type: typing.Literal["CHAT_HISTORY"] = "CHAT_HISTORY"
17
- value: typing.List[ChatMessageRequest]
17
+ value: typing.List[ChatMessage]
18
18
 
19
19
  if IS_PYDANTIC_V2:
20
20
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -0,0 +1,8 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+ from .prompt_request_string_input import PromptRequestStringInput
5
+ from .prompt_request_json_input import PromptRequestJsonInput
6
+ from .prompt_request_chat_history_input import PromptRequestChatHistoryInput
7
+
8
+ PromptRequestInput = typing.Union[PromptRequestStringInput, PromptRequestJsonInput, PromptRequestChatHistoryInput]
@@ -6,7 +6,7 @@ import typing
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
7
 
8
8
 
9
- class PromptRequestJsonInputRequest(UniversalBaseModel):
9
+ class PromptRequestJsonInput(UniversalBaseModel):
10
10
  key: str = pydantic.Field()
11
11
  """
12
12
  The variable's name, as defined in the Prompt.
@@ -6,7 +6,7 @@ import typing
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
7
 
8
8
 
9
- class PromptRequestStringInputRequest(UniversalBaseModel):
9
+ class PromptRequestStringInput(UniversalBaseModel):
10
10
  key: str = pydantic.Field()
11
11
  """
12
12
  The variable's name, as defined in the Prompt.
@@ -6,7 +6,7 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
6
  import pydantic
7
7
 
8
8
 
9
- class PromptSettingsRequest(UniversalBaseModel):
9
+ class PromptSettings(UniversalBaseModel):
10
10
  timeout: typing.Optional[float] = None
11
11
 
12
12
  if IS_PYDANTIC_V2:
@@ -0,0 +1,7 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+ from .variable_prompt_block import VariablePromptBlock
5
+ from .plain_text_prompt_block import PlainTextPromptBlock
6
+
7
+ RichTextChildBlock = typing.Union[VariablePromptBlock, PlainTextPromptBlock]
@@ -2,23 +2,22 @@
2
2
 
3
3
  from ..core.pydantic_utilities import UniversalBaseModel
4
4
  import typing
5
- from .rich_text_child_block_request import RichTextChildBlockRequest
6
5
  from .prompt_block_state import PromptBlockState
7
- from .ephemeral_prompt_cache_config_request import EphemeralPromptCacheConfigRequest
6
+ from .ephemeral_prompt_cache_config import EphemeralPromptCacheConfig
7
+ from .rich_text_child_block import RichTextChildBlock
8
8
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
9
9
  import pydantic
10
10
 
11
11
 
12
- class RichTextPromptBlockRequest(UniversalBaseModel):
12
+ class RichTextPromptBlock(UniversalBaseModel):
13
13
  """
14
14
  A block that includes a combination of plain text and variable blocks.
15
15
  """
16
16
 
17
- block_type: typing.Literal["RICH_TEXT"] = "RICH_TEXT"
18
- blocks: typing.List[RichTextChildBlockRequest]
19
- id: str
20
17
  state: typing.Optional[PromptBlockState] = None
21
- cache_config: typing.Optional[EphemeralPromptCacheConfigRequest] = None
18
+ cache_config: typing.Optional[EphemeralPromptCacheConfig] = None
19
+ block_type: typing.Literal["RICH_TEXT"] = "RICH_TEXT"
20
+ blocks: typing.List[RichTextChildBlock]
22
21
 
23
22
  if IS_PYDANTIC_V2:
24
23
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -3,20 +3,19 @@
3
3
  from ..core.pydantic_utilities import UniversalBaseModel
4
4
  import typing
5
5
  from .prompt_block_state import PromptBlockState
6
- from .ephemeral_prompt_cache_config_request import EphemeralPromptCacheConfigRequest
6
+ from .ephemeral_prompt_cache_config import EphemeralPromptCacheConfig
7
7
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
8
8
  import pydantic
9
9
 
10
10
 
11
- class VariablePromptBlockRequest(UniversalBaseModel):
11
+ class VariablePromptBlock(UniversalBaseModel):
12
12
  """
13
13
  A block that represents a variable in a prompt template.
14
14
  """
15
15
 
16
- block_type: typing.Literal["VARIABLE"] = "VARIABLE"
17
- id: str
18
16
  state: typing.Optional[PromptBlockState] = None
19
- cache_config: typing.Optional[EphemeralPromptCacheConfigRequest] = None
17
+ cache_config: typing.Optional[EphemeralPromptCacheConfig] = None
18
+ block_type: typing.Literal["VARIABLE"] = "VARIABLE"
20
19
  input_variable_id: str
21
20
 
22
21
  if IS_PYDANTIC_V2:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vellum-ai
3
- Version: 0.9.5
3
+ Version: 0.9.9
4
4
  Summary:
5
5
  License: MIT
6
6
  Requires-Python: >=3.8,<4.0