vellum-ai 0.8.5__py3-none-any.whl → 0.8.7__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. vellum/__init__.py +64 -104
  2. vellum/client.py +39 -17
  3. vellum/core/client_wrapper.py +1 -1
  4. vellum/resources/__init__.py +2 -2
  5. vellum/resources/ad_hoc/client.py +372 -0
  6. vellum/types/__init__.py +62 -102
  7. vellum/types/ad_hoc_execute_prompt_event.py +14 -0
  8. vellum/types/ad_hoc_expand_meta_request.py +33 -0
  9. vellum/types/ad_hoc_fulfilled_prompt_execution_meta.py +27 -0
  10. vellum/types/{open_api_const_property_request.py → ad_hoc_initiated_prompt_execution_meta.py} +4 -6
  11. vellum/types/{open_api_boolean_property_request.py → ad_hoc_rejected_prompt_execution_meta.py} +5 -6
  12. vellum/types/{tik_token_tokenizer_config_request.py → ad_hoc_streaming_prompt_execution_meta.py} +3 -4
  13. vellum/types/{open_api_one_of_property.py → chat_message_prompt_block_properties_request.py} +10 -9
  14. vellum/types/chat_message_prompt_block_request.py +36 -0
  15. vellum/types/{ml_model_developer_enum_value_label.py → ephemeral_prompt_cache_config_request.py} +4 -5
  16. vellum/types/ephemeral_prompt_cache_config_type_enum.py +5 -0
  17. vellum/types/fulfilled_ad_hoc_execute_prompt_event.py +28 -0
  18. vellum/types/function_definition_prompt_block_properties_request.py +42 -0
  19. vellum/types/function_definition_prompt_block_request.py +30 -0
  20. vellum/types/{hugging_face_tokenizer_config.py → initiated_ad_hoc_execute_prompt_event.py} +6 -5
  21. vellum/types/{ml_model_display_tag_enum_value_label.py → jinja_prompt_block_properties_request.py} +5 -5
  22. vellum/types/jinja_prompt_block_request.py +30 -0
  23. vellum/types/ml_model_usage.py +2 -0
  24. vellum/types/plain_text_prompt_block_request.py +29 -0
  25. vellum/types/prompt_block_request.py +19 -0
  26. vellum/types/prompt_block_state.py +5 -0
  27. vellum/types/{prompt_deployment_expand_meta_request_request.py → prompt_deployment_expand_meta_request.py} +1 -1
  28. vellum/types/prompt_parameters_request.py +27 -0
  29. vellum/types/{open_api_boolean_property.py → prompt_request_chat_history_input_request.py} +7 -7
  30. vellum/types/prompt_request_input_request.py +10 -0
  31. vellum/types/{hugging_face_tokenizer_config_request.py → prompt_request_json_input_request.py} +6 -6
  32. vellum/types/{tik_token_tokenizer_config.py → prompt_request_string_input_request.py} +6 -5
  33. vellum/types/rejected_ad_hoc_execute_prompt_event.py +28 -0
  34. vellum/types/rich_text_child_block_request.py +7 -0
  35. vellum/types/rich_text_prompt_block_request.py +30 -0
  36. vellum/types/streaming_ad_hoc_execute_prompt_event.py +33 -0
  37. vellum/types/variable_prompt_block_request.py +29 -0
  38. vellum/types/{ml_model_family_enum_value_label.py → vellum_variable_request.py} +5 -4
  39. {vellum_ai-0.8.5.dist-info → vellum_ai-0.8.7.dist-info}/METADATA +1 -1
  40. {vellum_ai-0.8.5.dist-info → vellum_ai-0.8.7.dist-info}/RECORD +43 -63
  41. vellum/resources/ml_models/client.py +0 -948
  42. vellum/types/hosted_by_enum.py +0 -26
  43. vellum/types/ml_model_developer.py +0 -27
  44. vellum/types/ml_model_display_config_labelled.py +0 -26
  45. vellum/types/ml_model_display_config_request.py +0 -26
  46. vellum/types/ml_model_display_tag.py +0 -7
  47. vellum/types/ml_model_exec_config.py +0 -34
  48. vellum/types/ml_model_exec_config_request.py +0 -34
  49. vellum/types/ml_model_family.py +0 -29
  50. vellum/types/ml_model_feature.py +0 -18
  51. vellum/types/ml_model_parameter_config.py +0 -32
  52. vellum/types/ml_model_parameter_config_request.py +0 -32
  53. vellum/types/ml_model_read.py +0 -92
  54. vellum/types/ml_model_request_authorization_config.py +0 -20
  55. vellum/types/ml_model_request_authorization_config_request.py +0 -20
  56. vellum/types/ml_model_request_authorization_config_type_enum.py +0 -5
  57. vellum/types/ml_model_request_config.py +0 -22
  58. vellum/types/ml_model_request_config_request.py +0 -22
  59. vellum/types/ml_model_response_config.py +0 -21
  60. vellum/types/ml_model_response_config_request.py +0 -21
  61. vellum/types/ml_model_tokenizer_config.py +0 -7
  62. vellum/types/ml_model_tokenizer_config_request.py +0 -7
  63. vellum/types/open_api_array_property.py +0 -41
  64. vellum/types/open_api_array_property_request.py +0 -41
  65. vellum/types/open_api_const_property.py +0 -26
  66. vellum/types/open_api_integer_property.py +0 -30
  67. vellum/types/open_api_integer_property_request.py +0 -30
  68. vellum/types/open_api_number_property.py +0 -31
  69. vellum/types/open_api_number_property_request.py +0 -31
  70. vellum/types/open_api_object_property.py +0 -40
  71. vellum/types/open_api_object_property_request.py +0 -40
  72. vellum/types/open_api_one_of_property_request.py +0 -33
  73. vellum/types/open_api_property.py +0 -27
  74. vellum/types/open_api_property_request.py +0 -27
  75. vellum/types/open_api_ref_property.py +0 -26
  76. vellum/types/open_api_ref_property_request.py +0 -26
  77. vellum/types/open_api_string_property.py +0 -30
  78. vellum/types/open_api_string_property_request.py +0 -30
  79. vellum/types/paginated_ml_model_read_list.py +0 -23
  80. vellum/types/visibility_enum.py +0 -5
  81. /vellum/resources/{ml_models → ad_hoc}/__init__.py +0 -0
  82. {vellum_ai-0.8.5.dist-info → vellum_ai-0.8.7.dist-info}/LICENSE +0 -0
  83. {vellum_ai-0.8.5.dist-info → vellum_ai-0.8.7.dist-info}/WHEEL +0 -0
@@ -0,0 +1,28 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.pydantic_utilities import UniversalBaseModel
4
+ import typing
5
+ from .prompt_output import PromptOutput
6
+ from .ad_hoc_fulfilled_prompt_execution_meta import AdHocFulfilledPromptExecutionMeta
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
8
+ import pydantic
9
+
10
+
11
+ class FulfilledAdHocExecutePromptEvent(UniversalBaseModel):
12
+ """
13
+ The final data event returned indicating that the stream has ended and all final resolved values from the model can be found.
14
+ """
15
+
16
+ state: typing.Literal["FULFILLED"] = "FULFILLED"
17
+ outputs: typing.List[PromptOutput]
18
+ execution_id: str
19
+ meta: typing.Optional[AdHocFulfilledPromptExecutionMeta] = None
20
+
21
+ if IS_PYDANTIC_V2:
22
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
23
+ else:
24
+
25
+ class Config:
26
+ frozen = True
27
+ smart_union = True
28
+ extra = pydantic.Extra.allow
@@ -0,0 +1,42 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.pydantic_utilities import UniversalBaseModel
4
+ import typing
5
+ import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
+
8
+
9
+ class FunctionDefinitionPromptBlockPropertiesRequest(UniversalBaseModel):
10
+ function_name: typing.Optional[str] = pydantic.Field(default=None)
11
+ """
12
+ The name identifying the function.
13
+ """
14
+
15
+ function_description: typing.Optional[str] = pydantic.Field(default=None)
16
+ """
17
+ A description to help guide the model when to invoke this function.
18
+ """
19
+
20
+ function_parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
21
+ """
22
+ An OpenAPI specification of parameters that are supported by this function.
23
+ """
24
+
25
+ function_forced: typing.Optional[bool] = pydantic.Field(default=None)
26
+ """
27
+ Set this option to true to force the model to return a function call of this function.
28
+ """
29
+
30
+ function_strict: typing.Optional[bool] = pydantic.Field(default=None)
31
+ """
32
+ Set this option to use strict schema decoding when available.
33
+ """
34
+
35
+ if IS_PYDANTIC_V2:
36
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
37
+ else:
38
+
39
+ class Config:
40
+ frozen = True
41
+ smart_union = True
42
+ extra = pydantic.Extra.allow
@@ -0,0 +1,30 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.pydantic_utilities import UniversalBaseModel
4
+ import typing
5
+ from .function_definition_prompt_block_properties_request import FunctionDefinitionPromptBlockPropertiesRequest
6
+ from .prompt_block_state import PromptBlockState
7
+ from .ephemeral_prompt_cache_config_request import EphemeralPromptCacheConfigRequest
8
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
9
+ import pydantic
10
+
11
+
12
+ class FunctionDefinitionPromptBlockRequest(UniversalBaseModel):
13
+ """
14
+ A block that represents a function definition in a prompt template.
15
+ """
16
+
17
+ block_type: typing.Literal["FUNCTION_DEFINITION"] = "FUNCTION_DEFINITION"
18
+ properties: FunctionDefinitionPromptBlockPropertiesRequest
19
+ id: str
20
+ state: typing.Optional[PromptBlockState] = None
21
+ cache_config: typing.Optional[EphemeralPromptCacheConfigRequest] = None
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
@@ -2,18 +2,19 @@
2
2
 
3
3
  from ..core.pydantic_utilities import UniversalBaseModel
4
4
  import typing
5
+ from .ad_hoc_initiated_prompt_execution_meta import AdHocInitiatedPromptExecutionMeta
5
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
7
  import pydantic
7
8
 
8
9
 
9
- class HuggingFaceTokenizerConfig(UniversalBaseModel):
10
+ class InitiatedAdHocExecutePromptEvent(UniversalBaseModel):
10
11
  """
11
- Tokenizer config for Hugging Face type tokenizers.
12
+ The initial data returned indicating that the response from the model has returned and begun streaming.
12
13
  """
13
14
 
14
- type: typing.Literal["HUGGING_FACE"] = "HUGGING_FACE"
15
- name: str
16
- path: typing.Optional[str] = None
15
+ state: typing.Literal["INITIATED"] = "INITIATED"
16
+ meta: typing.Optional[AdHocInitiatedPromptExecutionMeta] = None
17
+ execution_id: str
17
18
 
18
19
  if IS_PYDANTIC_V2:
19
20
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -1,15 +1,15 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
3
  from ..core.pydantic_utilities import UniversalBaseModel
4
- from .ml_model_display_tag import MlModelDisplayTag
5
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
4
  import typing
5
+ from .vellum_variable_type import VellumVariableType
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
7
  import pydantic
8
8
 
9
9
 
10
- class MlModelDisplayTagEnumValueLabel(UniversalBaseModel):
11
- label: str
12
- value: MlModelDisplayTag
10
+ class JinjaPromptBlockPropertiesRequest(UniversalBaseModel):
11
+ template: typing.Optional[str] = None
12
+ template_type: typing.Optional[VellumVariableType] = None
13
13
 
14
14
  if IS_PYDANTIC_V2:
15
15
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -0,0 +1,30 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.pydantic_utilities import UniversalBaseModel
4
+ import typing
5
+ from .jinja_prompt_block_properties_request import JinjaPromptBlockPropertiesRequest
6
+ from .prompt_block_state import PromptBlockState
7
+ from .ephemeral_prompt_cache_config_request import EphemeralPromptCacheConfigRequest
8
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
9
+ import pydantic
10
+
11
+
12
+ class JinjaPromptBlockRequest(UniversalBaseModel):
13
+ """
14
+ A block of Jinja template code that is used to generate a prompt
15
+ """
16
+
17
+ block_type: typing.Literal["JINJA"] = "JINJA"
18
+ properties: JinjaPromptBlockPropertiesRequest
19
+ id: str
20
+ state: typing.Optional[PromptBlockState] = None
21
+ cache_config: typing.Optional[EphemeralPromptCacheConfigRequest] = None
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
@@ -12,6 +12,8 @@ class MlModelUsage(UniversalBaseModel):
12
12
  input_char_count: typing.Optional[int] = None
13
13
  output_char_count: typing.Optional[int] = None
14
14
  compute_nanos: typing.Optional[int] = None
15
+ cache_creation_input_tokens: typing.Optional[int] = None
16
+ cache_read_input_tokens: typing.Optional[int] = None
15
17
 
16
18
  if IS_PYDANTIC_V2:
17
19
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -0,0 +1,29 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.pydantic_utilities import UniversalBaseModel
4
+ import typing
5
+ from .prompt_block_state import PromptBlockState
6
+ from .ephemeral_prompt_cache_config_request import EphemeralPromptCacheConfigRequest
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
8
+ import pydantic
9
+
10
+
11
+ class PlainTextPromptBlockRequest(UniversalBaseModel):
12
+ """
13
+ A block that holds a plain text string value.
14
+ """
15
+
16
+ block_type: typing.Literal["PLAIN_TEXT"] = "PLAIN_TEXT"
17
+ text: str
18
+ id: str
19
+ state: typing.Optional[PromptBlockState] = None
20
+ cache_config: typing.Optional[EphemeralPromptCacheConfigRequest] = None
21
+
22
+ if IS_PYDANTIC_V2:
23
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
24
+ else:
25
+
26
+ class Config:
27
+ frozen = True
28
+ smart_union = True
29
+ extra = pydantic.Extra.allow
@@ -0,0 +1,19 @@
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_request import JinjaPromptBlockRequest
6
+ from .function_definition_prompt_block_request import FunctionDefinitionPromptBlockRequest
7
+ from .variable_prompt_block_request import VariablePromptBlockRequest
8
+ from .rich_text_prompt_block_request import RichTextPromptBlockRequest
9
+ import typing
10
+
11
+ if typing.TYPE_CHECKING:
12
+ from .chat_message_prompt_block_request import ChatMessagePromptBlockRequest
13
+ PromptBlockRequest = typing.Union[
14
+ JinjaPromptBlockRequest,
15
+ "ChatMessagePromptBlockRequest",
16
+ FunctionDefinitionPromptBlockRequest,
17
+ VariablePromptBlockRequest,
18
+ RichTextPromptBlockRequest,
19
+ ]
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ PromptBlockState = typing.Union[typing.Literal["ENABLED", "DISABLED"], typing.Any]
@@ -6,7 +6,7 @@ import pydantic
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
7
 
8
8
 
9
- class PromptDeploymentExpandMetaRequestRequest(UniversalBaseModel):
9
+ class PromptDeploymentExpandMetaRequest(UniversalBaseModel):
10
10
  model_name: typing.Optional[bool] = pydantic.Field(default=None)
11
11
  """
12
12
  If enabled, the response will include the model identifier representing the ML Model invoked by the Prompt.
@@ -0,0 +1,27 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.pydantic_utilities import UniversalBaseModel
4
+ import typing
5
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
+ import pydantic
7
+
8
+
9
+ class PromptParametersRequest(UniversalBaseModel):
10
+ stop: typing.Optional[typing.List[str]] = None
11
+ temperature: typing.Optional[float] = None
12
+ max_tokens: typing.Optional[int] = None
13
+ top_p: typing.Optional[float] = None
14
+ top_k: typing.Optional[int] = None
15
+ frequency_penalty: typing.Optional[float] = None
16
+ presence_penalty: typing.Optional[float] = None
17
+ logit_bias: typing.Optional[typing.Dict[str, typing.Optional[float]]] = None
18
+ custom_parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
19
+
20
+ if IS_PYDANTIC_V2:
21
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
22
+ else:
23
+
24
+ class Config:
25
+ frozen = True
26
+ smart_union = True
27
+ extra = pydantic.Extra.allow
@@ -1,20 +1,20 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
3
  from ..core.pydantic_utilities import UniversalBaseModel
4
+ import pydantic
4
5
  import typing
6
+ from .chat_message_request import ChatMessageRequest
5
7
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
- import pydantic
7
8
 
8
9
 
9
- class OpenApiBooleanProperty(UniversalBaseModel):
10
+ class PromptRequestChatHistoryInputRequest(UniversalBaseModel):
11
+ key: str = pydantic.Field()
10
12
  """
11
- An OpenAPI specification of a property with type 'boolean'
13
+ The variable's name, as defined in the Prompt.
12
14
  """
13
15
 
14
- type: typing.Literal["boolean"] = "boolean"
15
- default: typing.Optional[bool] = None
16
- title: typing.Optional[str] = None
17
- description: typing.Optional[str] = None
16
+ type: typing.Literal["CHAT_HISTORY"] = "CHAT_HISTORY"
17
+ value: typing.List[ChatMessageRequest]
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,10 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+ from .prompt_request_string_input_request import PromptRequestStringInputRequest
5
+ from .prompt_request_json_input_request import PromptRequestJsonInputRequest
6
+ from .prompt_request_chat_history_input_request import PromptRequestChatHistoryInputRequest
7
+
8
+ PromptRequestInputRequest = typing.Union[
9
+ PromptRequestStringInputRequest, PromptRequestJsonInputRequest, PromptRequestChatHistoryInputRequest
10
+ ]
@@ -1,19 +1,19 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
3
  from ..core.pydantic_utilities import UniversalBaseModel
4
+ import pydantic
4
5
  import typing
5
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
- import pydantic
7
7
 
8
8
 
9
- class HuggingFaceTokenizerConfigRequest(UniversalBaseModel):
9
+ class PromptRequestJsonInputRequest(UniversalBaseModel):
10
+ key: str = pydantic.Field()
10
11
  """
11
- Tokenizer config for Hugging Face type tokenizers.
12
+ The variable's name, as defined in the Prompt.
12
13
  """
13
14
 
14
- type: typing.Literal["HUGGING_FACE"] = "HUGGING_FACE"
15
- name: str
16
- path: typing.Optional[str] = None
15
+ type: typing.Literal["JSON"] = "JSON"
16
+ value: typing.Dict[str, typing.Optional[typing.Any]]
17
17
 
18
18
  if IS_PYDANTIC_V2:
19
19
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -1,18 +1,19 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
3
  from ..core.pydantic_utilities import UniversalBaseModel
4
+ import pydantic
4
5
  import typing
5
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
- import pydantic
7
7
 
8
8
 
9
- class TikTokenTokenizerConfig(UniversalBaseModel):
9
+ class PromptRequestStringInputRequest(UniversalBaseModel):
10
+ key: str = pydantic.Field()
10
11
  """
11
- Tokenizer config for OpenAI's TikToken type tokenizers.
12
+ The variable's name, as defined in the Prompt.
12
13
  """
13
14
 
14
- type: typing.Literal["TIKTOKEN"] = "TIKTOKEN"
15
- name: str
15
+ type: typing.Literal["STRING"] = "STRING"
16
+ value: str
16
17
 
17
18
  if IS_PYDANTIC_V2:
18
19
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -0,0 +1,28 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.pydantic_utilities import UniversalBaseModel
4
+ import typing
5
+ from .vellum_error import VellumError
6
+ from .ad_hoc_rejected_prompt_execution_meta import AdHocRejectedPromptExecutionMeta
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
8
+ import pydantic
9
+
10
+
11
+ class RejectedAdHocExecutePromptEvent(UniversalBaseModel):
12
+ """
13
+ The final data returned indicating an error occurred during the stream.
14
+ """
15
+
16
+ state: typing.Literal["REJECTED"] = "REJECTED"
17
+ error: VellumError
18
+ execution_id: str
19
+ meta: typing.Optional[AdHocRejectedPromptExecutionMeta] = None
20
+
21
+ if IS_PYDANTIC_V2:
22
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
23
+ else:
24
+
25
+ class Config:
26
+ frozen = True
27
+ smart_union = True
28
+ extra = pydantic.Extra.allow
@@ -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_request import VariablePromptBlockRequest
5
+ from .plain_text_prompt_block_request import PlainTextPromptBlockRequest
6
+
7
+ RichTextChildBlockRequest = typing.Union[VariablePromptBlockRequest, PlainTextPromptBlockRequest]
@@ -0,0 +1,30 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.pydantic_utilities import UniversalBaseModel
4
+ import typing
5
+ from .rich_text_child_block_request import RichTextChildBlockRequest
6
+ from .prompt_block_state import PromptBlockState
7
+ from .ephemeral_prompt_cache_config_request import EphemeralPromptCacheConfigRequest
8
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
9
+ import pydantic
10
+
11
+
12
+ class RichTextPromptBlockRequest(UniversalBaseModel):
13
+ """
14
+ A block that includes a combination of plain text and variable blocks.
15
+ """
16
+
17
+ block_type: typing.Literal["RICH_TEXT"] = "RICH_TEXT"
18
+ blocks: typing.List[RichTextChildBlockRequest]
19
+ id: str
20
+ state: typing.Optional[PromptBlockState] = None
21
+ cache_config: typing.Optional[EphemeralPromptCacheConfigRequest] = None
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,33 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.pydantic_utilities import UniversalBaseModel
4
+ import typing
5
+ from .prompt_output import PromptOutput
6
+ from .ad_hoc_streaming_prompt_execution_meta import AdHocStreamingPromptExecutionMeta
7
+ import pydantic
8
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
9
+
10
+
11
+ class StreamingAdHocExecutePromptEvent(UniversalBaseModel):
12
+ """
13
+ The data returned for each delta during the prompt execution stream.
14
+ """
15
+
16
+ state: typing.Literal["STREAMING"] = "STREAMING"
17
+ output: PromptOutput
18
+ output_index: int
19
+ execution_id: str
20
+ meta: typing.Optional[AdHocStreamingPromptExecutionMeta] = None
21
+ raw: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
22
+ """
23
+ The subset of the raw response from the model that the request opted into with `expand_raw`.
24
+ """
25
+
26
+ if IS_PYDANTIC_V2:
27
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
28
+ else:
29
+
30
+ class Config:
31
+ frozen = True
32
+ smart_union = True
33
+ extra = pydantic.Extra.allow
@@ -0,0 +1,29 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.pydantic_utilities import UniversalBaseModel
4
+ import typing
5
+ from .prompt_block_state import PromptBlockState
6
+ from .ephemeral_prompt_cache_config_request import EphemeralPromptCacheConfigRequest
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
8
+ import pydantic
9
+
10
+
11
+ class VariablePromptBlockRequest(UniversalBaseModel):
12
+ """
13
+ A block that represents a variable in a prompt template.
14
+ """
15
+
16
+ block_type: typing.Literal["VARIABLE"] = "VARIABLE"
17
+ id: str
18
+ state: typing.Optional[PromptBlockState] = None
19
+ cache_config: typing.Optional[EphemeralPromptCacheConfigRequest] = None
20
+ input_variable_id: str
21
+
22
+ if IS_PYDANTIC_V2:
23
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
24
+ else:
25
+
26
+ class Config:
27
+ frozen = True
28
+ smart_union = True
29
+ extra = pydantic.Extra.allow
@@ -1,15 +1,16 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
3
  from ..core.pydantic_utilities import UniversalBaseModel
4
- from .ml_model_family import MlModelFamily
4
+ from .vellum_variable_type import VellumVariableType
5
5
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
6
  import typing
7
7
  import pydantic
8
8
 
9
9
 
10
- class MlModelFamilyEnumValueLabel(UniversalBaseModel):
11
- label: str
12
- value: MlModelFamily
10
+ class VellumVariableRequest(UniversalBaseModel):
11
+ id: str
12
+ key: str
13
+ type: VellumVariableType
13
14
 
14
15
  if IS_PYDANTIC_V2:
15
16
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vellum-ai
3
- Version: 0.8.5
3
+ Version: 0.8.7
4
4
  Summary:
5
5
  License: MIT
6
6
  Requires-Python: >=3.8,<4.0