vellum-ai 0.9.11__py3-none-any.whl → 0.9.13__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. vellum/__init__.py +28 -22
  2. vellum/client.py +20 -20
  3. vellum/core/client_wrapper.py +1 -1
  4. vellum/resources/ad_hoc/client.py +39 -2
  5. vellum/resources/metric_definitions/client.py +11 -11
  6. vellum/types/__init__.py +28 -22
  7. vellum/types/{array_input_request.py → array_input.py} +5 -5
  8. vellum/types/chat_history_input.py +30 -0
  9. vellum/types/{code_execution_package_request.py → code_execution_package.py} +1 -1
  10. vellum/types/code_executor_input.py +24 -0
  11. vellum/types/{code_executor_secret_input_request.py → code_executor_secret_input.py} +1 -1
  12. vellum/types/document_processing_state.py +7 -0
  13. vellum/types/document_read.py +2 -11
  14. vellum/types/{error_input_request.py → error_input.py} +3 -3
  15. vellum/types/{function_call_input_request.py → function_call_input.py} +3 -3
  16. vellum/types/{function_definition_prompt_block.py → function_definition.py} +6 -7
  17. vellum/types/json_input.py +29 -0
  18. vellum/types/metric_definition_input.py +9 -0
  19. vellum/types/{number_input_request.py → number_input.py} +1 -1
  20. vellum/types/prompt_block.py +1 -4
  21. vellum/types/{search_results_input_request.py → search_results_input.py} +3 -3
  22. vellum/types/slim_document.py +2 -11
  23. vellum/types/string_input.py +29 -0
  24. vellum/types/vellum_error_code_enum.py +6 -1
  25. {vellum_ai-0.9.11.dist-info → vellum_ai-0.9.13.dist-info}/METADATA +1 -1
  26. {vellum_ai-0.9.11.dist-info → vellum_ai-0.9.13.dist-info}/RECORD +28 -25
  27. vellum/types/code_executor_input_request.py +0 -24
  28. vellum/types/metric_definition_input_request.py +0 -11
  29. vellum/types/processing_state_enum.py +0 -5
  30. {vellum_ai-0.9.11.dist-info → vellum_ai-0.9.13.dist-info}/LICENSE +0 -0
  31. {vellum_ai-0.9.11.dist-info → vellum_ai-0.9.13.dist-info}/WHEEL +0 -0
vellum/types/__init__.py CHANGED
@@ -13,7 +13,7 @@ from .array_chat_message_content import ArrayChatMessageContent
13
13
  from .array_chat_message_content_item import ArrayChatMessageContentItem
14
14
  from .array_chat_message_content_item_request import ArrayChatMessageContentItemRequest
15
15
  from .array_chat_message_content_request import ArrayChatMessageContentRequest
16
- from .array_input_request import ArrayInputRequest
16
+ from .array_input import ArrayInput
17
17
  from .array_variable_value import ArrayVariableValue
18
18
  from .array_variable_value_item import ArrayVariableValueItem
19
19
  from .array_vellum_value import ArrayVellumValue
@@ -37,6 +37,7 @@ from .basic_vectorizer_sentence_transformers_multi_qa_mpnet_base_dot_v_1 import
37
37
  from .basic_vectorizer_sentence_transformers_multi_qa_mpnet_base_dot_v_1_request import (
38
38
  BasicVectorizerSentenceTransformersMultiQaMpnetBaseDotV1Request,
39
39
  )
40
+ from .chat_history_input import ChatHistoryInput
40
41
  from .chat_history_input_request import ChatHistoryInputRequest
41
42
  from .chat_history_variable_value import ChatHistoryVariableValue
42
43
  from .chat_history_vellum_value import ChatHistoryVellumValue
@@ -58,11 +59,11 @@ from .code_execution_node_result_data import CodeExecutionNodeResultData
58
59
  from .code_execution_node_result_output import CodeExecutionNodeResultOutput
59
60
  from .code_execution_node_search_results_result import CodeExecutionNodeSearchResultsResult
60
61
  from .code_execution_node_string_result import CodeExecutionNodeStringResult
61
- from .code_execution_package_request import CodeExecutionPackageRequest
62
+ from .code_execution_package import CodeExecutionPackage
62
63
  from .code_execution_runtime import CodeExecutionRuntime
63
- from .code_executor_input_request import CodeExecutorInputRequest
64
+ from .code_executor_input import CodeExecutorInput
64
65
  from .code_executor_response import CodeExecutorResponse
65
- from .code_executor_secret_input_request import CodeExecutorSecretInputRequest
66
+ from .code_executor_secret_input import CodeExecutorSecretInput
66
67
  from .compile_prompt_deployment_expand_meta_request import CompilePromptDeploymentExpandMetaRequest
67
68
  from .compile_prompt_meta import CompilePromptMeta
68
69
  from .components_schemas_pdf_search_result_meta_source import ComponentsSchemasPdfSearchResultMetaSource
@@ -84,6 +85,7 @@ from .document_index_chunking_request import DocumentIndexChunkingRequest
84
85
  from .document_index_indexing_config import DocumentIndexIndexingConfig
85
86
  from .document_index_indexing_config_request import DocumentIndexIndexingConfigRequest
86
87
  from .document_index_read import DocumentIndexRead
88
+ from .document_processing_state import DocumentProcessingState
87
89
  from .document_read import DocumentRead
88
90
  from .document_status import DocumentStatus
89
91
  from .enriched_normalized_completion import EnrichedNormalizedCompletion
@@ -92,7 +94,7 @@ from .entity_visibility import EntityVisibility
92
94
  from .environment_enum import EnvironmentEnum
93
95
  from .ephemeral_prompt_cache_config import EphemeralPromptCacheConfig
94
96
  from .ephemeral_prompt_cache_config_type_enum import EphemeralPromptCacheConfigTypeEnum
95
- from .error_input_request import ErrorInputRequest
97
+ from .error_input import ErrorInput
96
98
  from .error_variable_value import ErrorVariableValue
97
99
  from .error_vellum_value import ErrorVellumValue
98
100
  from .error_vellum_value_request import ErrorVellumValueRequest
@@ -135,12 +137,12 @@ from .function_call_chat_message_content import FunctionCallChatMessageContent
135
137
  from .function_call_chat_message_content_request import FunctionCallChatMessageContentRequest
136
138
  from .function_call_chat_message_content_value import FunctionCallChatMessageContentValue
137
139
  from .function_call_chat_message_content_value_request import FunctionCallChatMessageContentValueRequest
138
- from .function_call_input_request import FunctionCallInputRequest
140
+ from .function_call_input import FunctionCallInput
139
141
  from .function_call_request import FunctionCallRequest
140
142
  from .function_call_variable_value import FunctionCallVariableValue
141
143
  from .function_call_vellum_value import FunctionCallVellumValue
142
144
  from .function_call_vellum_value_request import FunctionCallVellumValueRequest
143
- from .function_definition_prompt_block import FunctionDefinitionPromptBlock
145
+ from .function_definition import FunctionDefinition
144
146
  from .generate_options_request import GenerateOptionsRequest
145
147
  from .generate_request import GenerateRequest
146
148
  from .generate_response import GenerateResponse
@@ -178,6 +180,7 @@ from .instructor_vectorizer_config import InstructorVectorizerConfig
178
180
  from .instructor_vectorizer_config_request import InstructorVectorizerConfigRequest
179
181
  from .iteration_state_enum import IterationStateEnum
180
182
  from .jinja_prompt_block import JinjaPromptBlock
183
+ from .json_input import JsonInput
181
184
  from .json_input_request import JsonInputRequest
182
185
  from .json_variable_value import JsonVariableValue
183
186
  from .json_vellum_value import JsonVellumValue
@@ -193,7 +196,7 @@ from .metadata_filter_rule_combinator import MetadataFilterRuleCombinator
193
196
  from .metadata_filter_rule_request import MetadataFilterRuleRequest
194
197
  from .metadata_filters_request import MetadataFiltersRequest
195
198
  from .metric_definition_execution import MetricDefinitionExecution
196
- from .metric_definition_input_request import MetricDefinitionInputRequest
199
+ from .metric_definition_input import MetricDefinitionInput
197
200
  from .metric_node_result import MetricNodeResult
198
201
  from .ml_model_usage import MlModelUsage
199
202
  from .named_scenario_input_chat_history_variable_value_request import NamedScenarioInputChatHistoryVariableValueRequest
@@ -238,7 +241,7 @@ from .node_output_compiled_string_value import NodeOutputCompiledStringValue
238
241
  from .node_output_compiled_value import NodeOutputCompiledValue
239
242
  from .normalized_log_probs import NormalizedLogProbs
240
243
  from .normalized_token_log_probs import NormalizedTokenLogProbs
241
- from .number_input_request import NumberInputRequest
244
+ from .number_input import NumberInput
242
245
  from .number_variable_value import NumberVariableValue
243
246
  from .number_vellum_value import NumberVellumValue
244
247
  from .number_vellum_value_request import NumberVellumValueRequest
@@ -265,7 +268,6 @@ from .pdf_search_result_meta_source_request import PdfSearchResultMetaSourceRequ
265
268
  from .plain_text_prompt_block import PlainTextPromptBlock
266
269
  from .price import Price
267
270
  from .processing_failure_reason_enum import ProcessingFailureReasonEnum
268
- from .processing_state_enum import ProcessingStateEnum
269
271
  from .prompt_block import PromptBlock
270
272
  from .prompt_block_state import PromptBlockState
271
273
  from .prompt_deployment_expand_meta_request import PromptDeploymentExpandMetaRequest
@@ -313,7 +315,7 @@ from .search_result_merging_request import SearchResultMergingRequest
313
315
  from .search_result_meta import SearchResultMeta
314
316
  from .search_result_meta_request import SearchResultMetaRequest
315
317
  from .search_result_request import SearchResultRequest
316
- from .search_results_input_request import SearchResultsInputRequest
318
+ from .search_results_input import SearchResultsInput
317
319
  from .search_results_variable_value import SearchResultsVariableValue
318
320
  from .search_results_vellum_value import SearchResultsVellumValue
319
321
  from .search_results_vellum_value_request import SearchResultsVellumValueRequest
@@ -332,6 +334,7 @@ from .streaming_prompt_execution_meta import StreamingPromptExecutionMeta
332
334
  from .streaming_workflow_node_result_event import StreamingWorkflowNodeResultEvent
333
335
  from .string_chat_message_content import StringChatMessageContent
334
336
  from .string_chat_message_content_request import StringChatMessageContentRequest
337
+ from .string_input import StringInput
335
338
  from .string_input_request import StringInputRequest
336
339
  from .string_variable_value import StringVariableValue
337
340
  from .string_vellum_value import StringVellumValue
@@ -507,7 +510,7 @@ __all__ = [
507
510
  "ArrayChatMessageContentItem",
508
511
  "ArrayChatMessageContentItemRequest",
509
512
  "ArrayChatMessageContentRequest",
510
- "ArrayInputRequest",
513
+ "ArrayInput",
511
514
  "ArrayVariableValue",
512
515
  "ArrayVariableValueItem",
513
516
  "ArrayVellumValue",
@@ -523,6 +526,7 @@ __all__ = [
523
526
  "BasicVectorizerSentenceTransformersMultiQaMpnetBaseCosV1Request",
524
527
  "BasicVectorizerSentenceTransformersMultiQaMpnetBaseDotV1",
525
528
  "BasicVectorizerSentenceTransformersMultiQaMpnetBaseDotV1Request",
529
+ "ChatHistoryInput",
526
530
  "ChatHistoryInputRequest",
527
531
  "ChatHistoryVariableValue",
528
532
  "ChatHistoryVellumValue",
@@ -544,11 +548,11 @@ __all__ = [
544
548
  "CodeExecutionNodeResultOutput",
545
549
  "CodeExecutionNodeSearchResultsResult",
546
550
  "CodeExecutionNodeStringResult",
547
- "CodeExecutionPackageRequest",
551
+ "CodeExecutionPackage",
548
552
  "CodeExecutionRuntime",
549
- "CodeExecutorInputRequest",
553
+ "CodeExecutorInput",
550
554
  "CodeExecutorResponse",
551
- "CodeExecutorSecretInputRequest",
555
+ "CodeExecutorSecretInput",
552
556
  "CompilePromptDeploymentExpandMetaRequest",
553
557
  "CompilePromptMeta",
554
558
  "ComponentsSchemasPdfSearchResultMetaSource",
@@ -570,6 +574,7 @@ __all__ = [
570
574
  "DocumentIndexIndexingConfig",
571
575
  "DocumentIndexIndexingConfigRequest",
572
576
  "DocumentIndexRead",
577
+ "DocumentProcessingState",
573
578
  "DocumentRead",
574
579
  "DocumentStatus",
575
580
  "EnrichedNormalizedCompletion",
@@ -578,7 +583,7 @@ __all__ = [
578
583
  "EnvironmentEnum",
579
584
  "EphemeralPromptCacheConfig",
580
585
  "EphemeralPromptCacheConfigTypeEnum",
581
- "ErrorInputRequest",
586
+ "ErrorInput",
582
587
  "ErrorVariableValue",
583
588
  "ErrorVellumValue",
584
589
  "ErrorVellumValueRequest",
@@ -621,12 +626,12 @@ __all__ = [
621
626
  "FunctionCallChatMessageContentRequest",
622
627
  "FunctionCallChatMessageContentValue",
623
628
  "FunctionCallChatMessageContentValueRequest",
624
- "FunctionCallInputRequest",
629
+ "FunctionCallInput",
625
630
  "FunctionCallRequest",
626
631
  "FunctionCallVariableValue",
627
632
  "FunctionCallVellumValue",
628
633
  "FunctionCallVellumValueRequest",
629
- "FunctionDefinitionPromptBlock",
634
+ "FunctionDefinition",
630
635
  "GenerateOptionsRequest",
631
636
  "GenerateRequest",
632
637
  "GenerateResponse",
@@ -660,6 +665,7 @@ __all__ = [
660
665
  "InstructorVectorizerConfigRequest",
661
666
  "IterationStateEnum",
662
667
  "JinjaPromptBlock",
668
+ "JsonInput",
663
669
  "JsonInputRequest",
664
670
  "JsonVariableValue",
665
671
  "JsonVellumValue",
@@ -675,7 +681,7 @@ __all__ = [
675
681
  "MetadataFilterRuleRequest",
676
682
  "MetadataFiltersRequest",
677
683
  "MetricDefinitionExecution",
678
- "MetricDefinitionInputRequest",
684
+ "MetricDefinitionInput",
679
685
  "MetricNodeResult",
680
686
  "MlModelUsage",
681
687
  "NamedScenarioInputChatHistoryVariableValueRequest",
@@ -720,7 +726,7 @@ __all__ = [
720
726
  "NodeOutputCompiledValue",
721
727
  "NormalizedLogProbs",
722
728
  "NormalizedTokenLogProbs",
723
- "NumberInputRequest",
729
+ "NumberInput",
724
730
  "NumberVariableValue",
725
731
  "NumberVellumValue",
726
732
  "NumberVellumValueRequest",
@@ -747,7 +753,6 @@ __all__ = [
747
753
  "PlainTextPromptBlock",
748
754
  "Price",
749
755
  "ProcessingFailureReasonEnum",
750
- "ProcessingStateEnum",
751
756
  "PromptBlock",
752
757
  "PromptBlockState",
753
758
  "PromptDeploymentExpandMetaRequest",
@@ -795,7 +800,7 @@ __all__ = [
795
800
  "SearchResultMeta",
796
801
  "SearchResultMetaRequest",
797
802
  "SearchResultRequest",
798
- "SearchResultsInputRequest",
803
+ "SearchResultsInput",
799
804
  "SearchResultsVariableValue",
800
805
  "SearchResultsVellumValue",
801
806
  "SearchResultsVellumValueRequest",
@@ -814,6 +819,7 @@ __all__ = [
814
819
  "StreamingWorkflowNodeResultEvent",
815
820
  "StringChatMessageContent",
816
821
  "StringChatMessageContentRequest",
822
+ "StringInput",
817
823
  "StringInputRequest",
818
824
  "StringVariableValue",
819
825
  "StringVellumValue",
@@ -2,15 +2,15 @@
2
2
 
3
3
  from __future__ import annotations
4
4
  from ..core.pydantic_utilities import UniversalBaseModel
5
- from .array_vellum_value_request import ArrayVellumValueRequest
5
+ from .array_vellum_value import ArrayVellumValue
6
6
  import pydantic
7
7
  import typing
8
- from .vellum_value_request import VellumValueRequest
8
+ from .vellum_value import VellumValue
9
9
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
10
10
  from ..core.pydantic_utilities import update_forward_refs
11
11
 
12
12
 
13
- class ArrayInputRequest(UniversalBaseModel):
13
+ class ArrayInput(UniversalBaseModel):
14
14
  """
15
15
  A user input representing a Vellum Array value
16
16
  """
@@ -21,7 +21,7 @@ class ArrayInputRequest(UniversalBaseModel):
21
21
  """
22
22
 
23
23
  type: typing.Literal["ARRAY"] = "ARRAY"
24
- value: typing.List[VellumValueRequest]
24
+ value: typing.List[VellumValue]
25
25
 
26
26
  if IS_PYDANTIC_V2:
27
27
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -33,4 +33,4 @@ class ArrayInputRequest(UniversalBaseModel):
33
33
  extra = pydantic.Extra.allow
34
34
 
35
35
 
36
- update_forward_refs(ArrayVellumValueRequest, ArrayInputRequest=ArrayInputRequest)
36
+ update_forward_refs(ArrayVellumValue, ArrayInput=ArrayInput)
@@ -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 pydantic
5
+ import typing
6
+ from .chat_message import ChatMessage
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
8
+
9
+
10
+ class ChatHistoryInput(UniversalBaseModel):
11
+ """
12
+ A user input representing a list of chat messages
13
+ """
14
+
15
+ name: str = pydantic.Field()
16
+ """
17
+ The variable's name, as defined in the deployment.
18
+ """
19
+
20
+ type: typing.Literal["CHAT_HISTORY"] = "CHAT_HISTORY"
21
+ value: typing.List[ChatMessage]
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
@@ -6,7 +6,7 @@ import typing
6
6
  import pydantic
7
7
 
8
8
 
9
- class CodeExecutionPackageRequest(UniversalBaseModel):
9
+ class CodeExecutionPackage(UniversalBaseModel):
10
10
  version: str
11
11
  name: str
12
12
 
@@ -0,0 +1,24 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+ from .string_input import StringInput
5
+ from .json_input import JsonInput
6
+ from .chat_history_input import ChatHistoryInput
7
+ from .number_input import NumberInput
8
+ from .search_results_input import SearchResultsInput
9
+ from .error_input import ErrorInput
10
+ from .array_input import ArrayInput
11
+ from .function_call_input import FunctionCallInput
12
+ from .code_executor_secret_input import CodeExecutorSecretInput
13
+
14
+ CodeExecutorInput = typing.Union[
15
+ StringInput,
16
+ JsonInput,
17
+ ChatHistoryInput,
18
+ NumberInput,
19
+ SearchResultsInput,
20
+ ErrorInput,
21
+ ArrayInput,
22
+ FunctionCallInput,
23
+ CodeExecutorSecretInput,
24
+ ]
@@ -6,7 +6,7 @@ import typing
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
7
 
8
8
 
9
- class CodeExecutorSecretInputRequest(UniversalBaseModel):
9
+ class CodeExecutorSecretInput(UniversalBaseModel):
10
10
  """
11
11
  A user input representing a Vellum Workspace Secret value
12
12
  """
@@ -0,0 +1,7 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ DocumentProcessingState = typing.Union[
6
+ typing.Literal["QUEUED", "PROCESSING", "PROCESSED", "FAILED", "UNKNOWN"], typing.Any
7
+ ]
@@ -4,7 +4,7 @@ from ..core.pydantic_utilities import UniversalBaseModel
4
4
  import typing
5
5
  import pydantic
6
6
  import datetime as dt
7
- from .processing_state_enum import ProcessingStateEnum
7
+ from .document_processing_state import DocumentProcessingState
8
8
  from .document_status import DocumentStatus
9
9
  from .document_document_to_document_index import DocumentDocumentToDocumentIndex
10
10
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
@@ -23,16 +23,7 @@ class DocumentRead(UniversalBaseModel):
23
23
  A human-readable label for the document. Defaults to the originally uploaded file's file name.
24
24
  """
25
25
 
26
- processing_state: typing.Optional[ProcessingStateEnum] = pydantic.Field(default=None)
27
- """
28
- The current processing state of the document
29
-
30
- - `QUEUED` - Queued
31
- - `PROCESSING` - Processing
32
- - `PROCESSED` - Processed
33
- - `FAILED` - Failed
34
- """
35
-
26
+ processing_state: DocumentProcessingState
36
27
  status: typing.Optional[DocumentStatus] = pydantic.Field(default=None)
37
28
  """
38
29
  The current status of the document
@@ -3,11 +3,11 @@
3
3
  from ..core.pydantic_utilities import UniversalBaseModel
4
4
  import pydantic
5
5
  import typing
6
- from .vellum_error_request import VellumErrorRequest
6
+ from .vellum_error import VellumError
7
7
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
8
8
 
9
9
 
10
- class ErrorInputRequest(UniversalBaseModel):
10
+ class ErrorInput(UniversalBaseModel):
11
11
  """
12
12
  A user input representing a Vellum Error value
13
13
  """
@@ -18,7 +18,7 @@ class ErrorInputRequest(UniversalBaseModel):
18
18
  """
19
19
 
20
20
  type: typing.Literal["ERROR"] = "ERROR"
21
- value: VellumErrorRequest
21
+ value: VellumError
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,11 +3,11 @@
3
3
  from ..core.pydantic_utilities import UniversalBaseModel
4
4
  import pydantic
5
5
  import typing
6
- from .function_call_request import FunctionCallRequest
6
+ from .function_call import FunctionCall
7
7
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
8
8
 
9
9
 
10
- class FunctionCallInputRequest(UniversalBaseModel):
10
+ class FunctionCallInput(UniversalBaseModel):
11
11
  """
12
12
  A user input representing a Vellum Function Call value
13
13
  """
@@ -18,7 +18,7 @@ class FunctionCallInputRequest(UniversalBaseModel):
18
18
  """
19
19
 
20
20
  type: typing.Literal["FUNCTION_CALL"] = "FUNCTION_CALL"
21
- value: FunctionCallRequest
21
+ value: FunctionCall
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
@@ -8,19 +8,18 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2
8
8
  import pydantic
9
9
 
10
10
 
11
- class FunctionDefinitionPromptBlock(UniversalBaseModel):
11
+ class FunctionDefinition(UniversalBaseModel):
12
12
  """
13
13
  A block that represents a function definition in a prompt template.
14
14
  """
15
15
 
16
16
  state: typing.Optional[PromptBlockState] = None
17
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
- function_forced: typing.Optional[bool] = None
23
- function_strict: typing.Optional[bool] = None
18
+ name: typing.Optional[str] = None
19
+ description: typing.Optional[str] = None
20
+ parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
21
+ forced: typing.Optional[bool] = None
22
+ strict: typing.Optional[bool] = None
24
23
 
25
24
  if IS_PYDANTIC_V2:
26
25
  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 pydantic
5
+ import typing
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
+
8
+
9
+ class JsonInput(UniversalBaseModel):
10
+ """
11
+ A user input representing a JSON object
12
+ """
13
+
14
+ name: str = pydantic.Field()
15
+ """
16
+ The variable's name
17
+ """
18
+
19
+ type: typing.Literal["JSON"] = "JSON"
20
+ value: typing.Optional[typing.Any] = 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,9 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+ from .string_input import StringInput
5
+ from .json_input import JsonInput
6
+ from .chat_history_input import ChatHistoryInput
7
+ from .number_input import NumberInput
8
+
9
+ MetricDefinitionInput = typing.Union[StringInput, JsonInput, ChatHistoryInput, NumberInput]
@@ -6,7 +6,7 @@ import typing
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
7
 
8
8
 
9
- class NumberInputRequest(UniversalBaseModel):
9
+ class NumberInput(UniversalBaseModel):
10
10
  """
11
11
  A user input representing a number value
12
12
  """
@@ -3,13 +3,10 @@
3
3
  from __future__ import annotations
4
4
  import typing
5
5
  from .jinja_prompt_block import JinjaPromptBlock
6
- from .function_definition_prompt_block import FunctionDefinitionPromptBlock
7
6
  from .variable_prompt_block import VariablePromptBlock
8
7
  from .rich_text_prompt_block import RichTextPromptBlock
9
8
  import typing
10
9
 
11
10
  if typing.TYPE_CHECKING:
12
11
  from .chat_message_prompt_block import ChatMessagePromptBlock
13
- PromptBlock = typing.Union[
14
- JinjaPromptBlock, "ChatMessagePromptBlock", FunctionDefinitionPromptBlock, VariablePromptBlock, RichTextPromptBlock
15
- ]
12
+ PromptBlock = typing.Union[JinjaPromptBlock, "ChatMessagePromptBlock", VariablePromptBlock, RichTextPromptBlock]
@@ -3,11 +3,11 @@
3
3
  from ..core.pydantic_utilities import UniversalBaseModel
4
4
  import pydantic
5
5
  import typing
6
- from .search_result_request import SearchResultRequest
6
+ from .search_result import SearchResult
7
7
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
8
8
 
9
9
 
10
- class SearchResultsInputRequest(UniversalBaseModel):
10
+ class SearchResultsInput(UniversalBaseModel):
11
11
  """
12
12
  A user input representing a search results value
13
13
  """
@@ -18,7 +18,7 @@ class SearchResultsInputRequest(UniversalBaseModel):
18
18
  """
19
19
 
20
20
  type: typing.Literal["SEARCH_RESULTS"] = "SEARCH_RESULTS"
21
- value: typing.List[SearchResultRequest]
21
+ value: typing.List[SearchResult]
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
@@ -4,7 +4,7 @@ from ..core.pydantic_utilities import UniversalBaseModel
4
4
  import pydantic
5
5
  import typing
6
6
  import datetime as dt
7
- from .processing_state_enum import ProcessingStateEnum
7
+ from .document_processing_state import DocumentProcessingState
8
8
  from .processing_failure_reason_enum import ProcessingFailureReasonEnum
9
9
  from .document_status import DocumentStatus
10
10
  from .document_document_to_document_index import DocumentDocumentToDocumentIndex
@@ -32,16 +32,7 @@ class SlimDocument(UniversalBaseModel):
32
32
  Human-friendly name for this document.
33
33
  """
34
34
 
35
- processing_state: typing.Optional[ProcessingStateEnum] = pydantic.Field(default=None)
36
- """
37
- An enum value representing where this document is along its processing lifecycle. Note that this is different than its indexing lifecycle.
38
-
39
- - `QUEUED` - Queued
40
- - `PROCESSING` - Processing
41
- - `PROCESSED` - Processed
42
- - `FAILED` - Failed
43
- """
44
-
35
+ processing_state: DocumentProcessingState
45
36
  processing_failure_reason: typing.Optional[ProcessingFailureReasonEnum] = pydantic.Field(default=None)
46
37
  """
47
38
  An enum value representing why the document could not be processed. Is null unless processing_state is FAILED.
@@ -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 pydantic
5
+ import typing
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
+
8
+
9
+ class StringInput(UniversalBaseModel):
10
+ """
11
+ A user input representing a string value
12
+ """
13
+
14
+ name: str = pydantic.Field()
15
+ """
16
+ The variable's name
17
+ """
18
+
19
+ type: typing.Literal["STRING"] = "STRING"
20
+ value: 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
@@ -4,7 +4,12 @@ import typing
4
4
 
5
5
  VellumErrorCodeEnum = typing.Union[
6
6
  typing.Literal[
7
- "INVALID_REQUEST", "PROVIDER_ERROR", "REQUEST_TIMEOUT", "INTERNAL_SERVER_ERROR", "USER_DEFINED_ERROR"
7
+ "INVALID_REQUEST",
8
+ "INVALID_INPUTS",
9
+ "PROVIDER_ERROR",
10
+ "REQUEST_TIMEOUT",
11
+ "INTERNAL_SERVER_ERROR",
12
+ "USER_DEFINED_ERROR",
8
13
  ],
9
14
  typing.Any,
10
15
  ]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vellum-ai
3
- Version: 0.9.11
3
+ Version: 0.9.13
4
4
  Summary:
5
5
  License: MIT
6
6
  Requires-Python: >=3.8,<4.0