vellum-ai 0.0.18__py3-none-any.whl → 0.0.25__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. vellum/__init__.py +119 -16
  2. vellum/client.py +341 -77
  3. vellum/core/__init__.py +11 -2
  4. vellum/core/client_wrapper.py +27 -0
  5. vellum/core/remove_none_from_dict.py +11 -0
  6. vellum/errors/__init__.py +2 -1
  7. vellum/errors/forbidden_error.py +9 -0
  8. vellum/resources/deployments/client.py +35 -15
  9. vellum/resources/document_indexes/client.py +64 -16
  10. vellum/resources/documents/client.py +110 -35
  11. vellum/resources/model_versions/client.py +67 -25
  12. vellum/resources/registered_prompts/client.py +80 -16
  13. vellum/resources/sandboxes/client.py +90 -25
  14. vellum/resources/test_suites/client.py +90 -25
  15. vellum/types/__init__.py +108 -0
  16. vellum/types/conditional_node_result.py +25 -0
  17. vellum/types/conditional_node_result_data.py +24 -0
  18. vellum/types/deployment_node_result.py +25 -0
  19. vellum/types/deployment_node_result_data.py +26 -0
  20. vellum/types/deployment_read.py +2 -6
  21. vellum/types/document.py +3 -7
  22. vellum/types/document_document_to_document_index.py +2 -2
  23. vellum/types/document_index_read.py +3 -7
  24. vellum/types/enriched_normalized_completion.py +5 -9
  25. vellum/types/evaluation_params.py +1 -3
  26. vellum/types/evaluation_params_request.py +1 -3
  27. vellum/types/execute_workflow_stream_error_response.py +24 -0
  28. vellum/types/generate_error_response.py +1 -1
  29. vellum/types/generate_request.py +3 -7
  30. vellum/types/generate_result.py +2 -6
  31. vellum/types/generate_result_data.py +1 -1
  32. vellum/types/generate_result_error.py +1 -1
  33. vellum/types/model_version_build_config.py +2 -6
  34. vellum/types/model_version_compile_prompt_response.py +1 -1
  35. vellum/types/model_version_compiled_prompt.py +2 -4
  36. vellum/types/model_version_exec_config.py +3 -3
  37. vellum/types/model_version_read.py +7 -10
  38. vellum/types/model_version_sandbox_snapshot.py +3 -5
  39. vellum/types/prompt_node_result.py +25 -0
  40. vellum/types/prompt_node_result_data.py +26 -0
  41. vellum/types/prompt_template_block_properties.py +1 -0
  42. vellum/types/prompt_template_block_properties_request.py +3 -2
  43. vellum/types/prompt_template_block_request.py +1 -1
  44. vellum/types/prompt_template_input_variable.py +1 -1
  45. vellum/types/prompt_template_input_variable_request.py +1 -1
  46. vellum/types/provider_enum.py +5 -0
  47. vellum/types/register_prompt_error_response.py +1 -1
  48. vellum/types/register_prompt_prompt.py +2 -2
  49. vellum/types/register_prompt_prompt_info_request.py +1 -1
  50. vellum/types/register_prompt_response.py +5 -7
  51. vellum/types/registered_prompt_deployment.py +3 -3
  52. vellum/types/registered_prompt_model_version.py +2 -2
  53. vellum/types/registered_prompt_sandbox.py +2 -2
  54. vellum/types/registered_prompt_sandbox_snapshot.py +1 -1
  55. vellum/types/sandbox_node_result.py +25 -0
  56. vellum/types/sandbox_node_result_data.py +26 -0
  57. vellum/types/sandbox_scenario.py +2 -2
  58. vellum/types/scenario_input_request.py +1 -1
  59. vellum/types/search_error_response.py +1 -1
  60. vellum/types/search_filters_request.py +1 -1
  61. vellum/types/search_node_result.py +25 -0
  62. vellum/types/search_node_result_data.py +27 -0
  63. vellum/types/search_request_options_request.py +4 -6
  64. vellum/types/search_response.py +1 -1
  65. vellum/types/search_result.py +3 -3
  66. vellum/types/search_result_merging_request.py +1 -1
  67. vellum/types/search_weights_request.py +2 -2
  68. vellum/types/slim_document.py +5 -9
  69. vellum/types/submit_completion_actual_request.py +5 -15
  70. vellum/types/terminal_node_chat_history_result.py +26 -0
  71. vellum/types/terminal_node_json_result.py +25 -0
  72. vellum/types/terminal_node_result.py +25 -0
  73. vellum/types/terminal_node_result_data.py +25 -0
  74. vellum/types/terminal_node_result_output.py +40 -0
  75. vellum/types/terminal_node_string_result.py +25 -0
  76. vellum/types/test_suite_test_case.py +4 -8
  77. vellum/types/upload_document_response.py +1 -1
  78. vellum/types/workflow_event_error.py +26 -0
  79. vellum/types/workflow_execution_event_error_code.py +31 -0
  80. vellum/types/workflow_execution_node_result_event.py +27 -0
  81. vellum/types/workflow_execution_workflow_result_event.py +27 -0
  82. vellum/types/workflow_node_result_data.py +72 -0
  83. vellum/types/workflow_node_result_event.py +33 -0
  84. vellum/types/workflow_node_result_event_state.py +36 -0
  85. vellum/types/workflow_request_chat_history_input_request.py +28 -0
  86. vellum/types/workflow_request_input_request.py +40 -0
  87. vellum/types/workflow_request_json_input_request.py +27 -0
  88. vellum/types/workflow_request_string_input_request.py +27 -0
  89. vellum/types/workflow_result_event.py +31 -0
  90. vellum/types/workflow_result_event_output_data.py +40 -0
  91. vellum/types/workflow_result_event_output_data_chat_history.py +32 -0
  92. vellum/types/workflow_result_event_output_data_json.py +31 -0
  93. vellum/types/workflow_result_event_output_data_string.py +33 -0
  94. vellum/types/workflow_stream_event.py +29 -0
  95. {vellum_ai-0.0.18.dist-info → vellum_ai-0.0.25.dist-info}/METADATA +1 -1
  96. vellum_ai-0.0.25.dist-info/RECORD +149 -0
  97. vellum/core/remove_none_from_headers.py +0 -11
  98. vellum_ai-0.0.18.dist-info/RECORD +0 -113
  99. {vellum_ai-0.0.18.dist-info → vellum_ai-0.0.25.dist-info}/WHEEL +0 -0
vellum/types/__init__.py CHANGED
@@ -4,7 +4,11 @@ from .block_type_enum import BlockTypeEnum
4
4
  from .chat_message import ChatMessage
5
5
  from .chat_message_request import ChatMessageRequest
6
6
  from .chat_message_role import ChatMessageRole
7
+ from .conditional_node_result import ConditionalNodeResult
8
+ from .conditional_node_result_data import ConditionalNodeResultData
7
9
  from .content_type import ContentType
10
+ from .deployment_node_result import DeploymentNodeResult
11
+ from .deployment_node_result_data import DeploymentNodeResultData
8
12
  from .deployment_read import DeploymentRead
9
13
  from .deployment_read_status_enum import DeploymentReadStatusEnum
10
14
  from .document import Document
@@ -15,6 +19,7 @@ from .enriched_normalized_completion import EnrichedNormalizedCompletion
15
19
  from .environment_enum import EnvironmentEnum
16
20
  from .evaluation_params import EvaluationParams
17
21
  from .evaluation_params_request import EvaluationParamsRequest
22
+ from .execute_workflow_stream_error_response import ExecuteWorkflowStreamErrorResponse
18
23
  from .finish_reason_enum import FinishReasonEnum
19
24
  from .generate_error_response import GenerateErrorResponse
20
25
  from .generate_options_request import GenerateOptionsRequest
@@ -42,6 +47,8 @@ from .normalized_token_log_probs import NormalizedTokenLogProbs
42
47
  from .paginated_slim_document_list import PaginatedSlimDocumentList
43
48
  from .processing_failure_reason_enum import ProcessingFailureReasonEnum
44
49
  from .processing_state_enum import ProcessingStateEnum
50
+ from .prompt_node_result import PromptNodeResult
51
+ from .prompt_node_result_data import PromptNodeResultData
45
52
  from .prompt_template_block import PromptTemplateBlock
46
53
  from .prompt_template_block_data import PromptTemplateBlockData
47
54
  from .prompt_template_block_data_request import PromptTemplateBlockDataRequest
@@ -62,12 +69,16 @@ from .registered_prompt_sandbox import RegisteredPromptSandbox
62
69
  from .registered_prompt_sandbox_snapshot import RegisteredPromptSandboxSnapshot
63
70
  from .sandbox_metric_input_params import SandboxMetricInputParams
64
71
  from .sandbox_metric_input_params_request import SandboxMetricInputParamsRequest
72
+ from .sandbox_node_result import SandboxNodeResult
73
+ from .sandbox_node_result_data import SandboxNodeResultData
65
74
  from .sandbox_scenario import SandboxScenario
66
75
  from .scenario_input import ScenarioInput
67
76
  from .scenario_input_request import ScenarioInputRequest
68
77
  from .scenario_input_type_enum import ScenarioInputTypeEnum
69
78
  from .search_error_response import SearchErrorResponse
70
79
  from .search_filters_request import SearchFiltersRequest
80
+ from .search_node_result import SearchNodeResult
81
+ from .search_node_result_data import SearchNodeResultData
71
82
  from .search_request_options_request import SearchRequestOptionsRequest
72
83
  from .search_response import SearchResponse
73
84
  from .search_result import SearchResult
@@ -77,16 +88,66 @@ from .slim_document import SlimDocument
77
88
  from .slim_document_status_enum import SlimDocumentStatusEnum
78
89
  from .submit_completion_actual_request import SubmitCompletionActualRequest
79
90
  from .submit_completion_actuals_error_response import SubmitCompletionActualsErrorResponse
91
+ from .terminal_node_chat_history_result import TerminalNodeChatHistoryResult
92
+ from .terminal_node_json_result import TerminalNodeJsonResult
93
+ from .terminal_node_result import TerminalNodeResult
94
+ from .terminal_node_result_data import TerminalNodeResultData
95
+ from .terminal_node_result_output import (
96
+ TerminalNodeResultOutput,
97
+ TerminalNodeResultOutput_ChatHistory,
98
+ TerminalNodeResultOutput_Json,
99
+ TerminalNodeResultOutput_String,
100
+ )
101
+ from .terminal_node_string_result import TerminalNodeStringResult
80
102
  from .test_suite_test_case import TestSuiteTestCase
81
103
  from .upload_document_error_response import UploadDocumentErrorResponse
82
104
  from .upload_document_response import UploadDocumentResponse
105
+ from .workflow_event_error import WorkflowEventError
106
+ from .workflow_execution_event_error_code import WorkflowExecutionEventErrorCode
107
+ from .workflow_execution_node_result_event import WorkflowExecutionNodeResultEvent
108
+ from .workflow_execution_workflow_result_event import WorkflowExecutionWorkflowResultEvent
109
+ from .workflow_node_result_data import (
110
+ WorkflowNodeResultData,
111
+ WorkflowNodeResultData_Conditional,
112
+ WorkflowNodeResultData_Deployment,
113
+ WorkflowNodeResultData_Prompt,
114
+ WorkflowNodeResultData_Sandbox,
115
+ WorkflowNodeResultData_Search,
116
+ WorkflowNodeResultData_Terminal,
117
+ )
118
+ from .workflow_node_result_event import WorkflowNodeResultEvent
119
+ from .workflow_node_result_event_state import WorkflowNodeResultEventState
120
+ from .workflow_request_chat_history_input_request import WorkflowRequestChatHistoryInputRequest
121
+ from .workflow_request_input_request import (
122
+ WorkflowRequestInputRequest,
123
+ WorkflowRequestInputRequest_ChatHistory,
124
+ WorkflowRequestInputRequest_Json,
125
+ WorkflowRequestInputRequest_String,
126
+ )
127
+ from .workflow_request_json_input_request import WorkflowRequestJsonInputRequest
128
+ from .workflow_request_string_input_request import WorkflowRequestStringInputRequest
129
+ from .workflow_result_event import WorkflowResultEvent
130
+ from .workflow_result_event_output_data import (
131
+ WorkflowResultEventOutputData,
132
+ WorkflowResultEventOutputData_ChatHistory,
133
+ WorkflowResultEventOutputData_Json,
134
+ WorkflowResultEventOutputData_String,
135
+ )
136
+ from .workflow_result_event_output_data_chat_history import WorkflowResultEventOutputDataChatHistory
137
+ from .workflow_result_event_output_data_json import WorkflowResultEventOutputDataJson
138
+ from .workflow_result_event_output_data_string import WorkflowResultEventOutputDataString
139
+ from .workflow_stream_event import WorkflowStreamEvent, WorkflowStreamEvent_Node, WorkflowStreamEvent_Workflow
83
140
 
84
141
  __all__ = [
85
142
  "BlockTypeEnum",
86
143
  "ChatMessage",
87
144
  "ChatMessageRequest",
88
145
  "ChatMessageRole",
146
+ "ConditionalNodeResult",
147
+ "ConditionalNodeResultData",
89
148
  "ContentType",
149
+ "DeploymentNodeResult",
150
+ "DeploymentNodeResultData",
90
151
  "DeploymentRead",
91
152
  "DeploymentReadStatusEnum",
92
153
  "Document",
@@ -97,6 +158,7 @@ __all__ = [
97
158
  "EnvironmentEnum",
98
159
  "EvaluationParams",
99
160
  "EvaluationParamsRequest",
161
+ "ExecuteWorkflowStreamErrorResponse",
100
162
  "FinishReasonEnum",
101
163
  "GenerateErrorResponse",
102
164
  "GenerateOptionsRequest",
@@ -124,6 +186,8 @@ __all__ = [
124
186
  "PaginatedSlimDocumentList",
125
187
  "ProcessingFailureReasonEnum",
126
188
  "ProcessingStateEnum",
189
+ "PromptNodeResult",
190
+ "PromptNodeResultData",
127
191
  "PromptTemplateBlock",
128
192
  "PromptTemplateBlockData",
129
193
  "PromptTemplateBlockDataRequest",
@@ -144,12 +208,16 @@ __all__ = [
144
208
  "RegisteredPromptSandboxSnapshot",
145
209
  "SandboxMetricInputParams",
146
210
  "SandboxMetricInputParamsRequest",
211
+ "SandboxNodeResult",
212
+ "SandboxNodeResultData",
147
213
  "SandboxScenario",
148
214
  "ScenarioInput",
149
215
  "ScenarioInputRequest",
150
216
  "ScenarioInputTypeEnum",
151
217
  "SearchErrorResponse",
152
218
  "SearchFiltersRequest",
219
+ "SearchNodeResult",
220
+ "SearchNodeResultData",
153
221
  "SearchRequestOptionsRequest",
154
222
  "SearchResponse",
155
223
  "SearchResult",
@@ -159,7 +227,47 @@ __all__ = [
159
227
  "SlimDocumentStatusEnum",
160
228
  "SubmitCompletionActualRequest",
161
229
  "SubmitCompletionActualsErrorResponse",
230
+ "TerminalNodeChatHistoryResult",
231
+ "TerminalNodeJsonResult",
232
+ "TerminalNodeResult",
233
+ "TerminalNodeResultData",
234
+ "TerminalNodeResultOutput",
235
+ "TerminalNodeResultOutput_ChatHistory",
236
+ "TerminalNodeResultOutput_Json",
237
+ "TerminalNodeResultOutput_String",
238
+ "TerminalNodeStringResult",
162
239
  "TestSuiteTestCase",
163
240
  "UploadDocumentErrorResponse",
164
241
  "UploadDocumentResponse",
242
+ "WorkflowEventError",
243
+ "WorkflowExecutionEventErrorCode",
244
+ "WorkflowExecutionNodeResultEvent",
245
+ "WorkflowExecutionWorkflowResultEvent",
246
+ "WorkflowNodeResultData",
247
+ "WorkflowNodeResultData_Conditional",
248
+ "WorkflowNodeResultData_Deployment",
249
+ "WorkflowNodeResultData_Prompt",
250
+ "WorkflowNodeResultData_Sandbox",
251
+ "WorkflowNodeResultData_Search",
252
+ "WorkflowNodeResultData_Terminal",
253
+ "WorkflowNodeResultEvent",
254
+ "WorkflowNodeResultEventState",
255
+ "WorkflowRequestChatHistoryInputRequest",
256
+ "WorkflowRequestInputRequest",
257
+ "WorkflowRequestInputRequest_ChatHistory",
258
+ "WorkflowRequestInputRequest_Json",
259
+ "WorkflowRequestInputRequest_String",
260
+ "WorkflowRequestJsonInputRequest",
261
+ "WorkflowRequestStringInputRequest",
262
+ "WorkflowResultEvent",
263
+ "WorkflowResultEventOutputData",
264
+ "WorkflowResultEventOutputDataChatHistory",
265
+ "WorkflowResultEventOutputDataJson",
266
+ "WorkflowResultEventOutputDataString",
267
+ "WorkflowResultEventOutputData_ChatHistory",
268
+ "WorkflowResultEventOutputData_Json",
269
+ "WorkflowResultEventOutputData_String",
270
+ "WorkflowStreamEvent",
271
+ "WorkflowStreamEvent_Node",
272
+ "WorkflowStreamEvent_Workflow",
165
273
  ]
@@ -0,0 +1,25 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ import pydantic
7
+
8
+ from ..core.datetime_utils import serialize_datetime
9
+ from .conditional_node_result_data import ConditionalNodeResultData
10
+
11
+
12
+ class ConditionalNodeResult(pydantic.BaseModel):
13
+ data: ConditionalNodeResultData
14
+
15
+ def json(self, **kwargs: typing.Any) -> str:
16
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
17
+ return super().json(**kwargs_with_defaults)
18
+
19
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
20
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
21
+ return super().dict(**kwargs_with_defaults)
22
+
23
+ class Config:
24
+ frozen = True
25
+ json_encoders = {dt.datetime: serialize_datetime}
@@ -0,0 +1,24 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ import pydantic
7
+
8
+ from ..core.datetime_utils import serialize_datetime
9
+
10
+
11
+ class ConditionalNodeResultData(pydantic.BaseModel):
12
+ source_handle_id: typing.Optional[str]
13
+
14
+ def json(self, **kwargs: typing.Any) -> str:
15
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
16
+ return super().json(**kwargs_with_defaults)
17
+
18
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
19
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
20
+ return super().dict(**kwargs_with_defaults)
21
+
22
+ class Config:
23
+ frozen = True
24
+ json_encoders = {dt.datetime: serialize_datetime}
@@ -0,0 +1,25 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ import pydantic
7
+
8
+ from ..core.datetime_utils import serialize_datetime
9
+ from .deployment_node_result_data import DeploymentNodeResultData
10
+
11
+
12
+ class DeploymentNodeResult(pydantic.BaseModel):
13
+ data: DeploymentNodeResultData
14
+
15
+ def json(self, **kwargs: typing.Any) -> str:
16
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
17
+ return super().json(**kwargs_with_defaults)
18
+
19
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
20
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
21
+ return super().dict(**kwargs_with_defaults)
22
+
23
+ class Config:
24
+ frozen = True
25
+ json_encoders = {dt.datetime: serialize_datetime}
@@ -0,0 +1,26 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ import pydantic
7
+
8
+ from ..core.datetime_utils import serialize_datetime
9
+
10
+
11
+ class DeploymentNodeResultData(pydantic.BaseModel):
12
+ output_id: str
13
+ text: typing.Optional[str]
14
+ delta: typing.Optional[str]
15
+
16
+ def json(self, **kwargs: typing.Any) -> str:
17
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
18
+ return super().json(**kwargs_with_defaults)
19
+
20
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
21
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
22
+ return super().dict(**kwargs_with_defaults)
23
+
24
+ class Config:
25
+ frozen = True
26
+ json_encoders = {dt.datetime: serialize_datetime}
@@ -15,14 +15,10 @@ class DeploymentRead(pydantic.BaseModel):
15
15
  id: str
16
16
  created: str
17
17
  label: str = pydantic.Field(
18
- description=(
19
- 'A human-readable label for the deployment <span style="white-space: nowrap">`<= 150 characters`</span> \n'
20
- )
18
+ description='A human-readable label for the deployment <span style="white-space: nowrap">`<= 150 characters`</span> '
21
19
  )
22
20
  name: str = pydantic.Field(
23
- description=(
24
- 'A name that uniquely identifies this deployment within its workspace <span style="white-space: nowrap">`<= 150 characters`</span> \n'
25
- )
21
+ description='A name that uniquely identifies this deployment within its workspace <span style="white-space: nowrap">`<= 150 characters`</span> '
26
22
  )
27
23
  status: typing.Optional[DeploymentReadStatusEnum] = pydantic.Field(
28
24
  description=(
vellum/types/document.py CHANGED
@@ -9,16 +9,12 @@ from ..core.datetime_utils import serialize_datetime
9
9
 
10
10
 
11
11
  class Document(pydantic.BaseModel):
12
- id: str = pydantic.Field(description=("The ID of the document.\n"))
12
+ id: str = pydantic.Field(description="The ID of the document.")
13
13
  label: str = pydantic.Field(
14
- description=(
15
- 'The human-readable name for the document. <span style="white-space: nowrap">`<= 1000 characters`</span> \n'
16
- )
14
+ description='The human-readable name for the document. <span style="white-space: nowrap">`<= 1000 characters`</span> '
17
15
  )
18
16
  external_id: typing.Optional[str] = pydantic.Field(
19
- description=(
20
- "The unique ID of the document as represented in an external system and specified when it was originally uploaded.\n"
21
- )
17
+ description="The unique ID of the document as represented in an external system and specified when it was originally uploaded."
22
18
  )
23
19
 
24
20
  def json(self, **kwargs: typing.Any) -> str:
@@ -10,9 +10,9 @@ from .indexing_state_enum import IndexingStateEnum
10
10
 
11
11
 
12
12
  class DocumentDocumentToDocumentIndex(pydantic.BaseModel):
13
- id: str = pydantic.Field(description=("Vellum-generated ID that uniquely identifies this link.\n"))
13
+ id: str = pydantic.Field(description="Vellum-generated ID that uniquely identifies this link.")
14
14
  document_index_id: str = pydantic.Field(
15
- description=("Vellum-generated ID that uniquely identifies the index this document is included in.\n")
15
+ description="Vellum-generated ID that uniquely identifies the index this document is included in."
16
16
  )
17
17
  indexing_state: typing.Optional[IndexingStateEnum] = pydantic.Field(
18
18
  description=(
@@ -14,14 +14,10 @@ class DocumentIndexRead(pydantic.BaseModel):
14
14
  id: str
15
15
  created: str
16
16
  label: str = pydantic.Field(
17
- description=(
18
- 'A human-readable label for the document index <span style="white-space: nowrap">`<= 150 characters`</span> \n'
19
- )
17
+ description='A human-readable label for the document index <span style="white-space: nowrap">`<= 150 characters`</span> '
20
18
  )
21
19
  name: str = pydantic.Field(
22
- description=(
23
- 'A name that uniquely identifies this index within its workspace <span style="white-space: nowrap">`<= 150 characters`</span> \n'
24
- )
20
+ description='A name that uniquely identifies this index within its workspace <span style="white-space: nowrap">`<= 150 characters`</span> '
25
21
  )
26
22
  status: typing.Optional[DocumentIndexStatus] = pydantic.Field(
27
23
  description=(
@@ -38,7 +34,7 @@ class DocumentIndexRead(pydantic.BaseModel):
38
34
  )
39
35
  )
40
36
  indexing_config: typing.Dict[str, typing.Any] = pydantic.Field(
41
- description=("Configuration representing how documents should be indexed\n")
37
+ description="Configuration representing how documents should be indexed"
42
38
  )
43
39
 
44
40
  def json(self, **kwargs: typing.Any) -> str:
@@ -12,13 +12,11 @@ from .normalized_log_probs import NormalizedLogProbs
12
12
 
13
13
 
14
14
  class EnrichedNormalizedCompletion(pydantic.BaseModel):
15
- id: str = pydantic.Field(description=("The Vellum-generated ID of the completion.\n"))
15
+ id: str = pydantic.Field(description="The Vellum-generated ID of the completion.")
16
16
  external_id: typing.Optional[str] = pydantic.Field(
17
- description=(
18
- "The external ID that was originally provided along with the generation request, which uniquely identifies this generation in an external system.\n"
19
- )
17
+ description="The external ID that was originally provided along with the generation request, which uniquely identifies this generation in an external system."
20
18
  )
21
- text: str = pydantic.Field(description=("The text generated by the LLM.\n"))
19
+ text: str = pydantic.Field(description="The text generated by the LLM.")
22
20
  finish_reason: typing.Optional[FinishReasonEnum] = pydantic.Field(
23
21
  description=(
24
22
  "The reason the generation finished.\n"
@@ -29,11 +27,9 @@ class EnrichedNormalizedCompletion(pydantic.BaseModel):
29
27
  )
30
28
  )
31
29
  logprobs: typing.Optional[NormalizedLogProbs] = pydantic.Field(
32
- description=("The logprobs of the completion. Only present if specified in the original request options.\n")
33
- )
34
- model_version_id: str = pydantic.Field(
35
- description=("The ID of the model version used to generate this completion.\n")
30
+ description="The logprobs of the completion. Only present if specified in the original request options."
36
31
  )
32
+ model_version_id: str = pydantic.Field(description="The ID of the model version used to generate this completion.")
37
33
  type: typing.Optional[ContentType]
38
34
 
39
35
  def json(self, **kwargs: typing.Any) -> str:
@@ -10,9 +10,7 @@ from ..core.datetime_utils import serialize_datetime
10
10
 
11
11
  class EvaluationParams(pydantic.BaseModel):
12
12
  target: typing.Optional[str] = pydantic.Field(
13
- description=(
14
- "The target value to compare the LLM output against. Typically what you expect or desire the LLM output to be.\n"
15
- )
13
+ description="The target value to compare the LLM output against. Typically what you expect or desire the LLM output to be."
16
14
  )
17
15
 
18
16
  def json(self, **kwargs: typing.Any) -> str:
@@ -10,9 +10,7 @@ from ..core.datetime_utils import serialize_datetime
10
10
 
11
11
  class EvaluationParamsRequest(pydantic.BaseModel):
12
12
  target: typing.Optional[str] = pydantic.Field(
13
- description=(
14
- "The target value to compare the LLM output against. Typically what you expect or desire the LLM output to be.\n"
15
- )
13
+ description="The target value to compare the LLM output against. Typically what you expect or desire the LLM output to be."
16
14
  )
17
15
 
18
16
  def json(self, **kwargs: typing.Any) -> str:
@@ -0,0 +1,24 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ import pydantic
7
+
8
+ from ..core.datetime_utils import serialize_datetime
9
+
10
+
11
+ class ExecuteWorkflowStreamErrorResponse(pydantic.BaseModel):
12
+ detail: str = pydantic.Field(description="Details about why the request failed.")
13
+
14
+ def json(self, **kwargs: typing.Any) -> str:
15
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
16
+ return super().json(**kwargs_with_defaults)
17
+
18
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
19
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
20
+ return super().dict(**kwargs_with_defaults)
21
+
22
+ class Config:
23
+ frozen = True
24
+ json_encoders = {dt.datetime: serialize_datetime}
@@ -9,7 +9,7 @@ from ..core.datetime_utils import serialize_datetime
9
9
 
10
10
 
11
11
  class GenerateErrorResponse(pydantic.BaseModel):
12
- detail: str = pydantic.Field(description=("Details about why the request failed.\n"))
12
+ detail: str = pydantic.Field(description="Details about why the request failed.")
13
13
 
14
14
  def json(self, **kwargs: typing.Any) -> str:
15
15
  kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
@@ -11,17 +11,13 @@ from .chat_message_request import ChatMessageRequest
11
11
 
12
12
  class GenerateRequest(pydantic.BaseModel):
13
13
  input_values: typing.Dict[str, typing.Any] = pydantic.Field(
14
- description=("Key/value pairs for each template variable defined in the deployment's prompt.\n")
14
+ description="Key/value pairs for each template variable defined in the deployment's prompt."
15
15
  )
16
16
  chat_history: typing.Optional[typing.List[ChatMessageRequest]] = pydantic.Field(
17
- description=(
18
- "Optionally provide a list of chat messages that'll be used in place of the special {$chat_history} variable, if included in the prompt.\n"
19
- )
17
+ description="Optionally provide a list of chat messages that'll be used in place of the special {$chat_history} variable, if included in the prompt."
20
18
  )
21
19
  external_ids: typing.Optional[typing.List[str]] = pydantic.Field(
22
- description=(
23
- "Optionally include a unique identifier for each generation, as represented outside of Vellum. Note that this should generally be a list of length one.\n"
24
- )
20
+ description="Optionally include a unique identifier for each generation, as represented outside of Vellum. Note that this should generally be a list of length one."
25
21
  )
26
22
 
27
23
  def json(self, **kwargs: typing.Any) -> str:
@@ -12,14 +12,10 @@ from .generate_result_error import GenerateResultError
12
12
 
13
13
  class GenerateResult(pydantic.BaseModel):
14
14
  data: typing.Optional[GenerateResultData] = pydantic.Field(
15
- description=(
16
- "An object containing the resulting generation. This key will be absent if the LLM provider experienced an error.\n"
17
- )
15
+ description="An object containing the resulting generation. This key will be absent if the LLM provider experienced an error."
18
16
  )
19
17
  error: typing.Optional[GenerateResultError] = pydantic.Field(
20
- description=(
21
- "An object containing details about the error that occurred. This key will be absent if the LLM provider did not experience an error.\n"
22
- )
18
+ description="An object containing details about the error that occurred. This key will be absent if the LLM provider did not experience an error."
23
19
  )
24
20
 
25
21
  def json(self, **kwargs: typing.Any) -> str:
@@ -11,7 +11,7 @@ from .enriched_normalized_completion import EnrichedNormalizedCompletion
11
11
 
12
12
  class GenerateResultData(pydantic.BaseModel):
13
13
  completions: typing.List[EnrichedNormalizedCompletion] = pydantic.Field(
14
- description=("The generated completions. This will generally be a list of length one.\n")
14
+ description="The generated completions. This will generally be a list of length one."
15
15
  )
16
16
 
17
17
  def json(self, **kwargs: typing.Any) -> str:
@@ -9,7 +9,7 @@ from ..core.datetime_utils import serialize_datetime
9
9
 
10
10
 
11
11
  class GenerateResultError(pydantic.BaseModel):
12
- message: str = pydantic.Field(description=("The error message returned by the LLM provider.\n"))
12
+ message: str = pydantic.Field(description="The error message returned by the LLM provider.")
13
13
 
14
14
  def json(self, **kwargs: typing.Any) -> str:
15
15
  kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
@@ -11,14 +11,10 @@ from .model_version_sandbox_snapshot import ModelVersionSandboxSnapshot
11
11
 
12
12
  class ModelVersionBuildConfig(pydantic.BaseModel):
13
13
  base_model: str = pydantic.Field(
14
- description=(
15
- "The name of the base model used to create this model version, as identified by the LLM provider.\n"
16
- )
14
+ description="The name of the base model used to create this model version, as identified by the LLM provider."
17
15
  )
18
16
  sandbox_snapshot: typing.Optional[ModelVersionSandboxSnapshot] = pydantic.Field(
19
- description=(
20
- "Information about the sandbox snapshot that was used to create this model version, if applicable.\n"
21
- )
17
+ description="Information about the sandbox snapshot that was used to create this model version, if applicable."
22
18
  )
23
19
 
24
20
  def json(self, **kwargs: typing.Any) -> str:
@@ -10,7 +10,7 @@ from .model_version_compiled_prompt import ModelVersionCompiledPrompt
10
10
 
11
11
 
12
12
  class ModelVersionCompilePromptResponse(pydantic.BaseModel):
13
- prompt: ModelVersionCompiledPrompt = pydantic.Field(description=("Information about the compiled prompt.\n"))
13
+ prompt: ModelVersionCompiledPrompt = pydantic.Field(description="Information about the compiled prompt.")
14
14
 
15
15
  def json(self, **kwargs: typing.Any) -> str:
16
16
  kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
@@ -10,11 +10,9 @@ from ..core.datetime_utils import serialize_datetime
10
10
 
11
11
  class ModelVersionCompiledPrompt(pydantic.BaseModel):
12
12
  text: str = pydantic.Field(
13
- description=(
14
- "The fully compiled prompt in normalized ChatML syntax after all variable substitutions and templating functions are applied.\n"
15
- )
13
+ description="The fully compiled prompt in normalized ChatML syntax after all variable substitutions and templating functions are applied."
16
14
  )
17
- num_tokens: int = pydantic.Field(description=("The approximate number of tokens used by the compiled prompt.\n"))
15
+ num_tokens: int = pydantic.Field(description="The approximate number of tokens used by the compiled prompt.")
18
16
 
19
17
  def json(self, **kwargs: typing.Any) -> str:
20
18
  kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
@@ -13,13 +13,13 @@ from .prompt_template_input_variable import PromptTemplateInputVariable
13
13
 
14
14
  class ModelVersionExecConfig(pydantic.BaseModel):
15
15
  parameters: ModelVersionExecConfigParameters = pydantic.Field(
16
- description=("The generation parameters that are passed to the LLM provider at runtime.\n")
16
+ description="The generation parameters that are passed to the LLM provider at runtime."
17
17
  )
18
18
  input_variables: typing.List[PromptTemplateInputVariable] = pydantic.Field(
19
- description=("Names of the input variables specified in the prompt template.\n")
19
+ description="Names of the input variables specified in the prompt template."
20
20
  )
21
21
  prompt_template: typing.Optional[str] = pydantic.Field(
22
- description=("The template used to generate prompts for this model version.\n")
22
+ description="The template used to generate prompts for this model version."
23
23
  )
24
24
  prompt_block_data: typing.Optional[PromptTemplateBlockData]
25
25
  prompt_syntax_version: typing.Optional[int]
@@ -14,12 +14,10 @@ from .provider_enum import ProviderEnum
14
14
 
15
15
 
16
16
  class ModelVersionRead(pydantic.BaseModel):
17
- id: str = pydantic.Field(description=("Vellum-generated ID that uniquely identifies this model version.\n"))
18
- created: str = pydantic.Field(description=("Timestamp of when this model version was created.\n"))
17
+ id: str = pydantic.Field(description="Vellum-generated ID that uniquely identifies this model version.")
18
+ created: str = pydantic.Field(description="Timestamp of when this model version was created.")
19
19
  label: str = pydantic.Field(
20
- description=(
21
- 'Human-friendly name for this model version. <span style="white-space: nowrap">`<= 150 characters`</span> \n'
22
- )
20
+ description='Human-friendly name for this model version. <span style="white-space: nowrap">`<= 150 characters`</span> '
23
21
  )
24
22
  model_type: ModelTypeEnum = pydantic.Field(
25
23
  description=(
@@ -35,20 +33,19 @@ class ModelVersionRead(pydantic.BaseModel):
35
33
  "* `GOOGLE` - Google\n"
36
34
  "* `HOSTED` - Hosted\n"
37
35
  "* `MOSAICML` - MosaicML\n"
36
+ "* `MYSTIC` - Mystic\n"
38
37
  "* `OPENAI` - OpenAI\n"
39
38
  "* `PYQ` - Pyq\n"
40
39
  )
41
40
  )
42
41
  external_id: str = pydantic.Field(
43
- description=(
44
- 'The unique id of this model version as it exists in the above provider\'s system. <span style="white-space: nowrap">`<= 250 characters`</span> \n'
45
- )
42
+ description='The unique id of this model version as it exists in the above provider\'s system. <span style="white-space: nowrap">`<= 250 characters`</span> '
46
43
  )
47
44
  build_config: ModelVersionBuildConfig = pydantic.Field(
48
- description=("Configuration used to build this model version.\n")
45
+ description="Configuration used to build this model version."
49
46
  )
50
47
  exec_config: ModelVersionExecConfig = pydantic.Field(
51
- description=("Configuration used to execute this model version.\n")
48
+ description="Configuration used to execute this model version."
52
49
  )
53
50
  status: typing.Optional[ModelVersionReadStatusEnum]
54
51
 
@@ -9,11 +9,9 @@ from ..core.datetime_utils import serialize_datetime
9
9
 
10
10
 
11
11
  class ModelVersionSandboxSnapshot(pydantic.BaseModel):
12
- id: str = pydantic.Field(description=("The ID of the sandbox snapshot.\n"))
13
- prompt_index: typing.Optional[int] = pydantic.Field(
14
- description=("The index of the prompt in the sandbox snapshot.\n")
15
- )
16
- prompt_id: typing.Optional[str] = pydantic.Field(description=("The id of the prompt in the sandbox snapshot.\n"))
12
+ id: str = pydantic.Field(description="The ID of the sandbox snapshot.")
13
+ prompt_index: typing.Optional[int] = pydantic.Field(description="The index of the prompt in the sandbox snapshot.")
14
+ prompt_id: typing.Optional[str] = pydantic.Field(description="The id of the prompt in the sandbox snapshot.")
17
15
  sandbox_id: typing.Optional[str]
18
16
 
19
17
  def json(self, **kwargs: typing.Any) -> str: