vellum-ai 0.2.2__py3-none-any.whl → 0.3.2__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. vellum/__init__.py +42 -40
  2. vellum/client.py +6 -52
  3. vellum/core/client_wrapper.py +1 -1
  4. vellum/resources/deployments/client.py +2 -6
  5. vellum/resources/document_indexes/client.py +50 -6
  6. vellum/resources/documents/client.py +16 -0
  7. vellum/resources/registered_prompts/client.py +4 -44
  8. vellum/resources/sandboxes/client.py +20 -47
  9. vellum/types/__init__.py +47 -43
  10. vellum/types/api_node_result.py +4 -0
  11. vellum/types/code_execution_node_result.py +4 -0
  12. vellum/types/conditional_node_result.py +4 -0
  13. vellum/types/{array_variable_value.py → fulfilled_workflow_node_result_event.py} +13 -9
  14. vellum/types/initiated_workflow_node_result_event.py +39 -0
  15. vellum/types/{chat_history_variable_value.py → node_output_compiled_chat_history_value.py} +2 -1
  16. vellum/types/node_output_compiled_error_value.py +30 -0
  17. vellum/types/{sandbox_metric_input_params.py → node_output_compiled_json_value.py} +3 -3
  18. vellum/types/{number_variable_value.py → node_output_compiled_number_value.py} +2 -1
  19. vellum/types/{search_results_variable_value.py → node_output_compiled_search_results_value.py} +2 -1
  20. vellum/types/node_output_compiled_string_value.py +29 -0
  21. vellum/types/node_output_compiled_value.py +78 -0
  22. vellum/types/prompt_node_result.py +4 -0
  23. vellum/types/{workflow_output_array.py → rejected_workflow_node_result_event.py} +9 -5
  24. vellum/types/sandbox_scenario.py +0 -2
  25. vellum/types/search_node_result.py +4 -0
  26. vellum/types/{evaluation_params.py → streaming_workflow_node_result_event.py} +14 -4
  27. vellum/types/templating_node_result.py +4 -0
  28. vellum/types/terminal_node_result.py +4 -0
  29. vellum/types/workflow_execution_node_result_event.py +4 -0
  30. vellum/types/workflow_execution_workflow_result_event.py +4 -0
  31. vellum/types/workflow_node_result_event.py +43 -26
  32. vellum/types/workflow_output.py +0 -11
  33. vellum/types/workflow_result_event_output_data_chat_history.py +4 -0
  34. vellum/types/workflow_result_event_output_data_error.py +4 -0
  35. vellum/types/workflow_result_event_output_data_json.py +4 -0
  36. vellum/types/workflow_result_event_output_data_number.py +4 -0
  37. vellum/types/workflow_result_event_output_data_search_results.py +4 -0
  38. vellum/types/workflow_result_event_output_data_string.py +4 -0
  39. {vellum_ai-0.2.2.dist-info → vellum_ai-0.3.2.dist-info}/METADATA +1 -1
  40. {vellum_ai-0.2.2.dist-info → vellum_ai-0.3.2.dist-info}/RECORD +42 -42
  41. vellum/types/array_enum.py +0 -5
  42. vellum/types/evaluation_params_request.py +0 -30
  43. vellum/types/sandbox_metric_input_params_request.py +0 -29
  44. vellum/types/variable_value.py +0 -102
  45. {vellum_ai-0.2.2.dist-info → vellum_ai-0.3.2.dist-info}/LICENSE +0 -0
  46. {vellum_ai-0.2.2.dist-info → vellum_ai-0.3.2.dist-info}/WHEEL +0 -0
vellum/__init__.py CHANGED
@@ -13,12 +13,9 @@ from .types import (
13
13
  ArrayChatMessageContentItem_Image,
14
14
  ArrayChatMessageContentItem_String,
15
15
  ArrayChatMessageContentRequest,
16
- ArrayEnum,
17
- ArrayVariableValue,
18
16
  BlockTypeEnum,
19
17
  ChatHistoryEnum,
20
18
  ChatHistoryInputRequest,
21
- ChatHistoryVariableValue,
22
19
  ChatMessage,
23
20
  ChatMessageContent,
24
21
  ChatMessageContentRequest,
@@ -60,8 +57,6 @@ from .types import (
60
57
  EnvironmentEnum,
61
58
  ErrorEnum,
62
59
  ErrorVariableValue,
63
- EvaluationParams,
64
- EvaluationParamsRequest,
65
60
  ExecutePromptApiErrorResponse,
66
61
  ExecutePromptEvent,
67
62
  ExecutePromptEvent_Fulfilled,
@@ -84,6 +79,7 @@ from .types import (
84
79
  FulfilledExecuteWorkflowWorkflowResultEvent,
85
80
  FulfilledFunctionCall,
86
81
  FulfilledPromptExecutionMeta,
82
+ FulfilledWorkflowNodeResultEvent,
87
83
  FunctionCall,
88
84
  FunctionCallChatMessageContent,
89
85
  FunctionCallChatMessageContentRequest,
@@ -110,6 +106,7 @@ from .types import (
110
106
  InitiatedEnum,
111
107
  InitiatedExecutePromptEvent,
112
108
  InitiatedPromptExecutionMeta,
109
+ InitiatedWorkflowNodeResultEvent,
113
110
  JsonEnum,
114
111
  JsonInputRequest,
115
112
  JsonVariableValue,
@@ -150,10 +147,22 @@ from .types import (
150
147
  NodeInputVariableCompiledValue_Number,
151
148
  NodeInputVariableCompiledValue_SearchResults,
152
149
  NodeInputVariableCompiledValue_String,
150
+ NodeOutputCompiledChatHistoryValue,
151
+ NodeOutputCompiledErrorValue,
152
+ NodeOutputCompiledJsonValue,
153
+ NodeOutputCompiledNumberValue,
154
+ NodeOutputCompiledSearchResultsValue,
155
+ NodeOutputCompiledStringValue,
156
+ NodeOutputCompiledValue,
157
+ NodeOutputCompiledValue_ChatHistory,
158
+ NodeOutputCompiledValue_Error,
159
+ NodeOutputCompiledValue_Json,
160
+ NodeOutputCompiledValue_Number,
161
+ NodeOutputCompiledValue_SearchResults,
162
+ NodeOutputCompiledValue_String,
153
163
  NormalizedLogProbs,
154
164
  NormalizedTokenLogProbs,
155
165
  NumberEnum,
156
- NumberVariableValue,
157
166
  PaginatedSlimDeploymentReadList,
158
167
  PaginatedSlimDocumentList,
159
168
  PaginatedSlimWorkflowDeploymentList,
@@ -196,8 +205,7 @@ from .types import (
196
205
  RejectedExecuteWorkflowWorkflowResultEvent,
197
206
  RejectedFunctionCall,
198
207
  RejectedPromptExecutionMeta,
199
- SandboxMetricInputParams,
200
- SandboxMetricInputParamsRequest,
208
+ RejectedWorkflowNodeResultEvent,
201
209
  SandboxScenario,
202
210
  ScenarioInput,
203
211
  ScenarioInputRequest,
@@ -214,7 +222,6 @@ from .types import (
214
222
  SearchResultMergingRequest,
215
223
  SearchResultRequest,
216
224
  SearchResultsEnum,
217
- SearchResultsVariableValue,
218
225
  SearchWeightsRequest,
219
226
  SlimDeploymentRead,
220
227
  SlimDocument,
@@ -222,6 +229,7 @@ from .types import (
222
229
  StreamingEnum,
223
230
  StreamingExecutePromptEvent,
224
231
  StreamingPromptExecutionMeta,
232
+ StreamingWorkflowNodeResultEvent,
225
233
  StringChatMessageContent,
226
234
  StringChatMessageContentRequest,
227
235
  StringEnum,
@@ -279,15 +287,6 @@ from .types import (
279
287
  TestSuiteTestCase,
280
288
  UploadDocumentErrorResponse,
281
289
  UploadDocumentResponse,
282
- VariableValue,
283
- VariableValue_Array,
284
- VariableValue_ChatHistory,
285
- VariableValue_Error,
286
- VariableValue_FunctionCall,
287
- VariableValue_Json,
288
- VariableValue_Number,
289
- VariableValue_SearchResults,
290
- VariableValue_String,
291
290
  VellumError,
292
291
  VellumErrorCodeEnum,
293
292
  VellumErrorRequest,
@@ -313,8 +312,11 @@ from .types import (
313
312
  WorkflowNodeResultData_Terminal,
314
313
  WorkflowNodeResultEvent,
315
314
  WorkflowNodeResultEventState,
315
+ WorkflowNodeResultEvent_Fulfilled,
316
+ WorkflowNodeResultEvent_Initiated,
317
+ WorkflowNodeResultEvent_Rejected,
318
+ WorkflowNodeResultEvent_Streaming,
316
319
  WorkflowOutput,
317
- WorkflowOutputArray,
318
320
  WorkflowOutputChatHistory,
319
321
  WorkflowOutputError,
320
322
  WorkflowOutputFunctionCall,
@@ -323,7 +325,6 @@ from .types import (
323
325
  WorkflowOutputNumber,
324
326
  WorkflowOutputSearchResults,
325
327
  WorkflowOutputString,
326
- WorkflowOutput_Array,
327
328
  WorkflowOutput_ChatHistory,
328
329
  WorkflowOutput_Error,
329
330
  WorkflowOutput_FunctionCall,
@@ -387,13 +388,10 @@ __all__ = [
387
388
  "ArrayChatMessageContentItem_Image",
388
389
  "ArrayChatMessageContentItem_String",
389
390
  "ArrayChatMessageContentRequest",
390
- "ArrayEnum",
391
- "ArrayVariableValue",
392
391
  "BadRequestError",
393
392
  "BlockTypeEnum",
394
393
  "ChatHistoryEnum",
395
394
  "ChatHistoryInputRequest",
396
- "ChatHistoryVariableValue",
397
395
  "ChatMessage",
398
396
  "ChatMessageContent",
399
397
  "ChatMessageContentRequest",
@@ -437,8 +435,6 @@ __all__ = [
437
435
  "EnvironmentEnum",
438
436
  "ErrorEnum",
439
437
  "ErrorVariableValue",
440
- "EvaluationParams",
441
- "EvaluationParamsRequest",
442
438
  "ExecutePromptApiErrorResponse",
443
439
  "ExecutePromptEvent",
444
440
  "ExecutePromptEvent_Fulfilled",
@@ -462,6 +458,7 @@ __all__ = [
462
458
  "FulfilledExecuteWorkflowWorkflowResultEvent",
463
459
  "FulfilledFunctionCall",
464
460
  "FulfilledPromptExecutionMeta",
461
+ "FulfilledWorkflowNodeResultEvent",
465
462
  "FunctionCall",
466
463
  "FunctionCallChatMessageContent",
467
464
  "FunctionCallChatMessageContentRequest",
@@ -488,6 +485,7 @@ __all__ = [
488
485
  "InitiatedEnum",
489
486
  "InitiatedExecutePromptEvent",
490
487
  "InitiatedPromptExecutionMeta",
488
+ "InitiatedWorkflowNodeResultEvent",
491
489
  "InternalServerError",
492
490
  "JsonEnum",
493
491
  "JsonInputRequest",
@@ -529,11 +527,23 @@ __all__ = [
529
527
  "NodeInputVariableCompiledValue_Number",
530
528
  "NodeInputVariableCompiledValue_SearchResults",
531
529
  "NodeInputVariableCompiledValue_String",
530
+ "NodeOutputCompiledChatHistoryValue",
531
+ "NodeOutputCompiledErrorValue",
532
+ "NodeOutputCompiledJsonValue",
533
+ "NodeOutputCompiledNumberValue",
534
+ "NodeOutputCompiledSearchResultsValue",
535
+ "NodeOutputCompiledStringValue",
536
+ "NodeOutputCompiledValue",
537
+ "NodeOutputCompiledValue_ChatHistory",
538
+ "NodeOutputCompiledValue_Error",
539
+ "NodeOutputCompiledValue_Json",
540
+ "NodeOutputCompiledValue_Number",
541
+ "NodeOutputCompiledValue_SearchResults",
542
+ "NodeOutputCompiledValue_String",
532
543
  "NormalizedLogProbs",
533
544
  "NormalizedTokenLogProbs",
534
545
  "NotFoundError",
535
546
  "NumberEnum",
536
- "NumberVariableValue",
537
547
  "PaginatedSlimDeploymentReadList",
538
548
  "PaginatedSlimDocumentList",
539
549
  "PaginatedSlimWorkflowDeploymentList",
@@ -576,8 +586,7 @@ __all__ = [
576
586
  "RejectedExecuteWorkflowWorkflowResultEvent",
577
587
  "RejectedFunctionCall",
578
588
  "RejectedPromptExecutionMeta",
579
- "SandboxMetricInputParams",
580
- "SandboxMetricInputParamsRequest",
589
+ "RejectedWorkflowNodeResultEvent",
581
590
  "SandboxScenario",
582
591
  "ScenarioInput",
583
592
  "ScenarioInputRequest",
@@ -594,7 +603,6 @@ __all__ = [
594
603
  "SearchResultMergingRequest",
595
604
  "SearchResultRequest",
596
605
  "SearchResultsEnum",
597
- "SearchResultsVariableValue",
598
606
  "SearchWeightsRequest",
599
607
  "SlimDeploymentRead",
600
608
  "SlimDocument",
@@ -602,6 +610,7 @@ __all__ = [
602
610
  "StreamingEnum",
603
611
  "StreamingExecutePromptEvent",
604
612
  "StreamingPromptExecutionMeta",
613
+ "StreamingWorkflowNodeResultEvent",
605
614
  "StringChatMessageContent",
606
615
  "StringChatMessageContentRequest",
607
616
  "StringEnum",
@@ -659,15 +668,6 @@ __all__ = [
659
668
  "TestSuiteTestCase",
660
669
  "UploadDocumentErrorResponse",
661
670
  "UploadDocumentResponse",
662
- "VariableValue",
663
- "VariableValue_Array",
664
- "VariableValue_ChatHistory",
665
- "VariableValue_Error",
666
- "VariableValue_FunctionCall",
667
- "VariableValue_Json",
668
- "VariableValue_Number",
669
- "VariableValue_SearchResults",
670
- "VariableValue_String",
671
671
  "VellumEnvironment",
672
672
  "VellumError",
673
673
  "VellumErrorCodeEnum",
@@ -695,8 +695,11 @@ __all__ = [
695
695
  "WorkflowNodeResultData_Terminal",
696
696
  "WorkflowNodeResultEvent",
697
697
  "WorkflowNodeResultEventState",
698
+ "WorkflowNodeResultEvent_Fulfilled",
699
+ "WorkflowNodeResultEvent_Initiated",
700
+ "WorkflowNodeResultEvent_Rejected",
701
+ "WorkflowNodeResultEvent_Streaming",
698
702
  "WorkflowOutput",
699
- "WorkflowOutputArray",
700
703
  "WorkflowOutputChatHistory",
701
704
  "WorkflowOutputError",
702
705
  "WorkflowOutputFunctionCall",
@@ -705,7 +708,6 @@ __all__ = [
705
708
  "WorkflowOutputNumber",
706
709
  "WorkflowOutputSearchResults",
707
710
  "WorkflowOutputString",
708
- "WorkflowOutput_Array",
709
711
  "WorkflowOutput_ChatHistory",
710
712
  "WorkflowOutput_Error",
711
713
  "WorkflowOutput_FunctionCall",
vellum/client.py CHANGED
@@ -372,29 +372,14 @@ class Vellum:
372
372
 
373
373
  - options: typing.Optional[GenerateOptionsRequest]. Additional configuration that can be used to control what's included in the response.
374
374
  ---
375
- from vellum import (
376
- ChatMessageRequest,
377
- ChatMessageRole,
378
- GenerateOptionsRequest,
379
- GenerateRequest,
380
- LogprobsEnum,
381
- )
375
+ from vellum import GenerateOptionsRequest, LogprobsEnum
382
376
  from vellum.client import Vellum
383
377
 
384
378
  client = Vellum(
385
379
  api_key="YOUR_API_KEY",
386
380
  )
387
381
  client.generate(
388
- requests=[
389
- GenerateRequest(
390
- input_values={"string": {"unknown": "string", "type": "unknown"}},
391
- chat_history=[
392
- ChatMessageRequest(
393
- role=ChatMessageRole.SYSTEM,
394
- )
395
- ],
396
- )
397
- ],
382
+ requests=[],
398
383
  options=GenerateOptionsRequest(
399
384
  logprobs=LogprobsEnum.ALL,
400
385
  ),
@@ -513,7 +498,6 @@ class Vellum:
513
498
  LogicalOperator,
514
499
  MetadataFilterConfigRequest,
515
500
  MetadataFilterRuleCombinator,
516
- MetadataFilterRuleRequest,
517
501
  SearchFiltersRequest,
518
502
  SearchRequestOptionsRequest,
519
503
  SearchResultMergingRequest,
@@ -532,12 +516,6 @@ class Vellum:
532
516
  filters=SearchFiltersRequest(
533
517
  metadata=MetadataFilterConfigRequest(
534
518
  combinator=MetadataFilterRuleCombinator.AND,
535
- rules=[
536
- MetadataFilterRuleRequest(
537
- combinator=MetadataFilterRuleCombinator.AND,
538
- operator=LogicalOperator.EQUALS,
539
- )
540
- ],
541
519
  operator=LogicalOperator.EQUALS,
542
520
  ),
543
521
  ),
@@ -591,14 +569,13 @@ class Vellum:
591
569
 
592
570
  - actuals: typing.List[SubmitCompletionActualRequest]. Feedback regarding the quality of previously generated completions
593
571
  ---
594
- from vellum import SubmitCompletionActualRequest
595
572
  from vellum.client import Vellum
596
573
 
597
574
  client = Vellum(
598
575
  api_key="YOUR_API_KEY",
599
576
  )
600
577
  client.submit_completion_actuals(
601
- actuals=[SubmitCompletionActualRequest()],
578
+ actuals=[],
602
579
  )
603
580
  """
604
581
  _request: typing.Dict[str, typing.Any] = {"actuals": actuals}
@@ -1000,29 +977,14 @@ class AsyncVellum:
1000
977
 
1001
978
  - options: typing.Optional[GenerateOptionsRequest]. Additional configuration that can be used to control what's included in the response.
1002
979
  ---
1003
- from vellum import (
1004
- ChatMessageRequest,
1005
- ChatMessageRole,
1006
- GenerateOptionsRequest,
1007
- GenerateRequest,
1008
- LogprobsEnum,
1009
- )
980
+ from vellum import GenerateOptionsRequest, LogprobsEnum
1010
981
  from vellum.client import AsyncVellum
1011
982
 
1012
983
  client = AsyncVellum(
1013
984
  api_key="YOUR_API_KEY",
1014
985
  )
1015
986
  await client.generate(
1016
- requests=[
1017
- GenerateRequest(
1018
- input_values={"string": {"unknown": "string", "type": "unknown"}},
1019
- chat_history=[
1020
- ChatMessageRequest(
1021
- role=ChatMessageRole.SYSTEM,
1022
- )
1023
- ],
1024
- )
1025
- ],
987
+ requests=[],
1026
988
  options=GenerateOptionsRequest(
1027
989
  logprobs=LogprobsEnum.ALL,
1028
990
  ),
@@ -1141,7 +1103,6 @@ class AsyncVellum:
1141
1103
  LogicalOperator,
1142
1104
  MetadataFilterConfigRequest,
1143
1105
  MetadataFilterRuleCombinator,
1144
- MetadataFilterRuleRequest,
1145
1106
  SearchFiltersRequest,
1146
1107
  SearchRequestOptionsRequest,
1147
1108
  SearchResultMergingRequest,
@@ -1160,12 +1121,6 @@ class AsyncVellum:
1160
1121
  filters=SearchFiltersRequest(
1161
1122
  metadata=MetadataFilterConfigRequest(
1162
1123
  combinator=MetadataFilterRuleCombinator.AND,
1163
- rules=[
1164
- MetadataFilterRuleRequest(
1165
- combinator=MetadataFilterRuleCombinator.AND,
1166
- operator=LogicalOperator.EQUALS,
1167
- )
1168
- ],
1169
1124
  operator=LogicalOperator.EQUALS,
1170
1125
  ),
1171
1126
  ),
@@ -1219,14 +1174,13 @@ class AsyncVellum:
1219
1174
 
1220
1175
  - actuals: typing.List[SubmitCompletionActualRequest]. Feedback regarding the quality of previously generated completions
1221
1176
  ---
1222
- from vellum import SubmitCompletionActualRequest
1223
1177
  from vellum.client import AsyncVellum
1224
1178
 
1225
1179
  client = AsyncVellum(
1226
1180
  api_key="YOUR_API_KEY",
1227
1181
  )
1228
1182
  await client.submit_completion_actuals(
1229
- actuals=[SubmitCompletionActualRequest()],
1183
+ actuals=[],
1230
1184
  )
1231
1185
  """
1232
1186
  _request: typing.Dict[str, typing.Any] = {"actuals": actuals}
@@ -16,7 +16,7 @@ class BaseClientWrapper:
16
16
  headers: typing.Dict[str, str] = {
17
17
  "X-Fern-Language": "Python",
18
18
  "X-Fern-SDK-Name": "vellum-ai",
19
- "X-Fern-SDK-Version": "v0.2.2",
19
+ "X-Fern-SDK-Version": "v0.3.2",
20
20
  }
21
21
  headers["X_API_KEY"] = self.api_key
22
22
  return headers
@@ -44,9 +44,7 @@ class DeploymentsClient:
44
44
  - ordering: typing.Optional[str]. Which field to use when ordering the results.
45
45
 
46
46
  - status: typing.Optional[DeploymentsListRequestStatus]. The current status of the deployment
47
-
48
- - `ACTIVE` - Active
49
- - `ARCHIVED` - Archived---
47
+ ---
50
48
  from vellum import DeploymentsListRequestStatus
51
49
  from vellum.client import Vellum
52
50
 
@@ -170,9 +168,7 @@ class AsyncDeploymentsClient:
170
168
  - ordering: typing.Optional[str]. Which field to use when ordering the results.
171
169
 
172
170
  - status: typing.Optional[DeploymentsListRequestStatus]. The current status of the deployment
173
-
174
- - `ACTIVE` - Active
175
- - `ARCHIVED` - Archived---
171
+ ---
176
172
  from vellum import DeploymentsListRequestStatus
177
173
  from vellum.client import AsyncVellum
178
174
 
@@ -62,11 +62,33 @@ class DocumentIndexesClient:
62
62
  api_key="YOUR_API_KEY",
63
63
  )
64
64
  client.document_indexes.create(
65
- label="string",
66
- name="string",
65
+ label="My Document Index",
66
+ name="my-document-index",
67
67
  status=EntityStatus.ACTIVE,
68
68
  environment=EnvironmentEnum.DEVELOPMENT,
69
- indexing_config={"string": {"unknown": "string", "type": "unknown"}},
69
+ indexing_config={
70
+ "chunking": {
71
+ "unknown": {
72
+ "chunker_name": "sentence-chunker",
73
+ "chunker_config": {
74
+ "character_limit": 1000,
75
+ "min_overlap_ratio": 0.5,
76
+ },
77
+ },
78
+ "type": "unknown",
79
+ },
80
+ "vectorizer": {
81
+ "unknown": {
82
+ "model_name": "hkunlp/instructor-xl",
83
+ "config": {
84
+ "instruction_domain": "",
85
+ "instruction_document_text_type": "plain_text",
86
+ "instruction_query_text_type": "plain_text",
87
+ },
88
+ },
89
+ "type": "unknown",
90
+ },
91
+ },
70
92
  )
71
93
  """
72
94
  _request: typing.Dict[str, typing.Any] = {"label": label, "name": name, "indexing_config": indexing_config}
@@ -164,11 +186,33 @@ class AsyncDocumentIndexesClient:
164
186
  api_key="YOUR_API_KEY",
165
187
  )
166
188
  await client.document_indexes.create(
167
- label="string",
168
- name="string",
189
+ label="My Document Index",
190
+ name="my-document-index",
169
191
  status=EntityStatus.ACTIVE,
170
192
  environment=EnvironmentEnum.DEVELOPMENT,
171
- indexing_config={"string": {"unknown": "string", "type": "unknown"}},
193
+ indexing_config={
194
+ "chunking": {
195
+ "unknown": {
196
+ "chunker_name": "sentence-chunker",
197
+ "chunker_config": {
198
+ "character_limit": 1000,
199
+ "min_overlap_ratio": 0.5,
200
+ },
201
+ },
202
+ "type": "unknown",
203
+ },
204
+ "vectorizer": {
205
+ "unknown": {
206
+ "model_name": "hkunlp/instructor-xl",
207
+ "config": {
208
+ "instruction_domain": "",
209
+ "instruction_document_text_type": "plain_text",
210
+ "instruction_query_text_type": "plain_text",
211
+ },
212
+ },
213
+ "type": "unknown",
214
+ },
215
+ },
172
216
  )
173
217
  """
174
218
  _request: typing.Dict[str, typing.Any] = {"label": label, "name": name, "indexing_config": indexing_config}
@@ -169,6 +169,14 @@ class DocumentsClient:
169
169
 
170
170
  **Note:** Uses a base url of `https://documents.vellum.ai`.
171
171
 
172
+ This is a multipart/form-data request. The `contents` field should be a file upload. It also expects a JSON body with the following fields:
173
+
174
+ - `add_to_index_names: list[str]` - Optionally include the names of all indexes that you'd like this document to be included in
175
+ - `external_id: str | None` - Optionally include an external ID for this document. This is useful if you want to re-upload the same document later when its contents change and would like it to be re-indexed.
176
+ - `label: str` - A human-friendly name for this document. Typically the filename.
177
+ - `keywords: list[str] | None` - Optionally include a list of keywords that'll be associated with this document. Used when performing keyword searches.
178
+ - `metadata: dict[str, Any]` - A stringified JSON object containing any metadata associated with the document that you'd like to filter upon later.
179
+
172
180
  Parameters:
173
181
  - add_to_index_names: typing.Optional[typing.List[str]].
174
182
 
@@ -357,6 +365,14 @@ class AsyncDocumentsClient:
357
365
 
358
366
  **Note:** Uses a base url of `https://documents.vellum.ai`.
359
367
 
368
+ This is a multipart/form-data request. The `contents` field should be a file upload. It also expects a JSON body with the following fields:
369
+
370
+ - `add_to_index_names: list[str]` - Optionally include the names of all indexes that you'd like this document to be included in
371
+ - `external_id: str | None` - Optionally include an external ID for this document. This is useful if you want to re-upload the same document later when its contents change and would like it to be re-indexed.
372
+ - `label: str` - A human-friendly name for this document. Typically the filename.
373
+ - `keywords: list[str] | None` - Optionally include a list of keywords that'll be associated with this document. Used when performing keyword searches.
374
+ - `metadata: dict[str, Any]` - A stringified JSON object containing any metadata associated with the document that you'd like to filter upon later.
375
+
360
376
  Parameters:
361
377
  - add_to_index_names: typing.Optional[typing.List[str]].
362
378
 
@@ -75,16 +75,10 @@ class RegisteredPromptsClient:
75
75
  - meta: typing.Optional[typing.Dict[str, typing.Any]]. Optionally include additional metadata to store along with the prompt.
76
76
  ---
77
77
  from vellum import (
78
- BlockTypeEnum,
79
- ChatMessageRole,
80
78
  PromptTemplateBlockDataRequest,
81
- PromptTemplateBlockPropertiesRequest,
82
- PromptTemplateBlockRequest,
83
79
  ProviderEnum,
84
- RegisteredPromptInputVariableRequest,
85
80
  RegisterPromptModelParametersRequest,
86
81
  RegisterPromptPromptInfoRequest,
87
- VellumVariableType,
88
82
  )
89
83
  from vellum.client import Vellum
90
84
 
@@ -97,23 +91,9 @@ class RegisteredPromptsClient:
97
91
  prompt=RegisterPromptPromptInfoRequest(
98
92
  prompt_block_data=PromptTemplateBlockDataRequest(
99
93
  version=1,
100
- blocks=[
101
- PromptTemplateBlockRequest(
102
- id="string",
103
- block_type=BlockTypeEnum.CHAT_MESSAGE,
104
- properties=PromptTemplateBlockPropertiesRequest(
105
- chat_role=ChatMessageRole.SYSTEM,
106
- template_type=VellumVariableType.STRING,
107
- ),
108
- )
109
- ],
94
+ blocks=[],
110
95
  ),
111
- input_variables=[
112
- RegisteredPromptInputVariableRequest(
113
- key="string",
114
- type=VellumVariableType.STRING,
115
- )
116
- ],
96
+ input_variables=[],
117
97
  ),
118
98
  provider=ProviderEnum.ANTHROPIC,
119
99
  model="string",
@@ -211,16 +191,10 @@ class AsyncRegisteredPromptsClient:
211
191
  - meta: typing.Optional[typing.Dict[str, typing.Any]]. Optionally include additional metadata to store along with the prompt.
212
192
  ---
213
193
  from vellum import (
214
- BlockTypeEnum,
215
- ChatMessageRole,
216
194
  PromptTemplateBlockDataRequest,
217
- PromptTemplateBlockPropertiesRequest,
218
- PromptTemplateBlockRequest,
219
195
  ProviderEnum,
220
- RegisteredPromptInputVariableRequest,
221
196
  RegisterPromptModelParametersRequest,
222
197
  RegisterPromptPromptInfoRequest,
223
- VellumVariableType,
224
198
  )
225
199
  from vellum.client import AsyncVellum
226
200
 
@@ -233,23 +207,9 @@ class AsyncRegisteredPromptsClient:
233
207
  prompt=RegisterPromptPromptInfoRequest(
234
208
  prompt_block_data=PromptTemplateBlockDataRequest(
235
209
  version=1,
236
- blocks=[
237
- PromptTemplateBlockRequest(
238
- id="string",
239
- block_type=BlockTypeEnum.CHAT_MESSAGE,
240
- properties=PromptTemplateBlockPropertiesRequest(
241
- chat_role=ChatMessageRole.SYSTEM,
242
- template_type=VellumVariableType.STRING,
243
- ),
244
- )
245
- ],
210
+ blocks=[],
246
211
  ),
247
- input_variables=[
248
- RegisteredPromptInputVariableRequest(
249
- key="string",
250
- type=VellumVariableType.STRING,
251
- )
252
- ],
212
+ input_variables=[],
253
213
  ),
254
214
  provider=ProviderEnum.ANTHROPIC,
255
215
  model="string",