vellum-ai 0.5.1__py3-none-any.whl → 0.6.0__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- vellum/__init__.py +170 -20
- vellum/core/client_wrapper.py +1 -1
- vellum/resources/document_indexes/client.py +61 -52
- vellum/resources/documents/client.py +8 -4
- vellum/types/__init__.py +189 -19
- vellum/types/add_openai_api_key_enum.py +3 -0
- vellum/types/array_variable_value_item.py +0 -24
- vellum/types/array_vellum_value_item.py +82 -0
- vellum/types/basic_vectorizer_intfloat_multilingual_e_5_large.py +29 -0
- vellum/types/basic_vectorizer_intfloat_multilingual_e_5_large_request.py +29 -0
- vellum/types/basic_vectorizer_sentence_transformers_multi_qa_mpnet_base_cos_v_1.py +29 -0
- vellum/types/basic_vectorizer_sentence_transformers_multi_qa_mpnet_base_cos_v_1_request.py +29 -0
- vellum/types/basic_vectorizer_sentence_transformers_multi_qa_mpnet_base_dot_v_1.py +29 -0
- vellum/types/basic_vectorizer_sentence_transformers_multi_qa_mpnet_base_dot_v_1_request.py +29 -0
- vellum/types/document_index_chunking.py +46 -0
- vellum/types/document_index_chunking_request.py +46 -0
- vellum/types/document_index_indexing_config.py +28 -0
- vellum/types/document_index_indexing_config_request.py +28 -0
- vellum/types/document_index_read.py +2 -4
- vellum/types/{rejected_function_call.py → error_vellum_value.py} +3 -5
- vellum/types/function_call.py +20 -18
- vellum/types/{fulfilled_function_call_request.py → function_call_request.py} +2 -2
- vellum/types/function_call_variable_value.py +1 -1
- vellum/types/{node_output_compiled_function_value.py → function_call_vellum_value.py} +5 -2
- vellum/types/hkunlp_instructor_xl_enum.py +5 -0
- vellum/types/hkunlp_instructor_xl_vectorizer.py +30 -0
- vellum/types/hkunlp_instructor_xl_vectorizer_request.py +30 -0
- vellum/types/{fulfilled_function_call.py → image_vellum_value.py} +4 -5
- vellum/types/indexing_config_vectorizer.py +106 -0
- vellum/types/indexing_config_vectorizer_request.py +106 -0
- vellum/types/instructor_vectorizer_config.py +31 -0
- vellum/types/instructor_vectorizer_config_request.py +31 -0
- vellum/types/intfloat_multilingual_e_5_large_enum.py +5 -0
- vellum/types/json_vellum_value.py +29 -0
- vellum/types/metric_enum.py +5 -0
- vellum/types/{chat_history_variable_value.py → metric_node_result.py} +4 -3
- vellum/types/named_test_case_function_call_variable_value.py +2 -2
- vellum/types/named_test_case_function_call_variable_value_request.py +2 -2
- vellum/types/node_output_compiled_array_value.py +8 -2
- vellum/types/node_output_compiled_chat_history_value.py +7 -1
- vellum/types/node_output_compiled_error_value.py +7 -1
- vellum/types/node_output_compiled_function_call_value.py +33 -0
- vellum/types/node_output_compiled_json_value.py +7 -1
- vellum/types/node_output_compiled_number_value.py +7 -1
- vellum/types/node_output_compiled_search_results_value.py +7 -1
- vellum/types/node_output_compiled_string_value.py +7 -1
- vellum/types/node_output_compiled_value.py +2 -2
- vellum/types/{search_results_variable_value.py → number_vellum_value.py} +6 -3
- vellum/types/open_ai_vectorizer_config.py +30 -0
- vellum/types/open_ai_vectorizer_config_request.py +30 -0
- vellum/types/open_ai_vectorizer_text_embedding_3_large.py +30 -0
- vellum/types/open_ai_vectorizer_text_embedding_3_large_request.py +30 -0
- vellum/types/open_ai_vectorizer_text_embedding_3_small.py +30 -0
- vellum/types/open_ai_vectorizer_text_embedding_3_small_request.py +30 -0
- vellum/types/open_ai_vectorizer_text_embedding_ada_002.py +30 -0
- vellum/types/open_ai_vectorizer_text_embedding_ada_002_request.py +30 -0
- vellum/types/prompt_output.py +8 -8
- vellum/types/reducto_chunker_config.py +29 -0
- vellum/types/reducto_chunker_config_request.py +29 -0
- vellum/types/reducto_chunker_enum.py +5 -0
- vellum/types/reducto_chunking.py +30 -0
- vellum/types/reducto_chunking_request.py +30 -0
- vellum/types/sentence_chunker_config.py +30 -0
- vellum/types/sentence_chunker_config_request.py +30 -0
- vellum/types/sentence_chunker_enum.py +5 -0
- vellum/types/sentence_chunking.py +30 -0
- vellum/types/sentence_chunking_request.py +30 -0
- vellum/types/sentence_transformers_multi_qa_mpnet_base_cos_v_1_enum.py +5 -0
- vellum/types/sentence_transformers_multi_qa_mpnet_base_dot_v_1_enum.py +5 -0
- vellum/types/string_vellum_value.py +29 -0
- vellum/types/test_case_function_call_variable_value.py +2 -2
- vellum/types/test_suite_run_execution_function_call_output.py +2 -2
- vellum/types/text_embedding_3_large_enum.py +5 -0
- vellum/types/text_embedding_3_small_enum.py +5 -0
- vellum/types/text_embedding_ada_002_enum.py +5 -0
- vellum/types/token_overlapping_window_chunker_config.py +30 -0
- vellum/types/token_overlapping_window_chunker_config_request.py +30 -0
- vellum/types/token_overlapping_window_chunker_enum.py +5 -0
- vellum/types/token_overlapping_window_chunking.py +30 -0
- vellum/types/token_overlapping_window_chunking_request.py +30 -0
- vellum/types/workflow_execution_actual_chat_history_request.py +5 -0
- vellum/types/workflow_execution_actual_json_request.py +5 -0
- vellum/types/workflow_execution_actual_string_request.py +5 -0
- vellum/types/workflow_node_result_data.py +12 -0
- vellum/types/workflow_output_array.py +2 -2
- {vellum_ai-0.5.1.dist-info → vellum_ai-0.6.0.dist-info}/METADATA +1 -1
- {vellum_ai-0.5.1.dist-info → vellum_ai-0.6.0.dist-info}/RECORD +89 -37
- {vellum_ai-0.5.1.dist-info → vellum_ai-0.6.0.dist-info}/LICENSE +0 -0
- {vellum_ai-0.5.1.dist-info → vellum_ai-0.6.0.dist-info}/WHEEL +0 -0
@@ -10,6 +10,7 @@ from ...core.jsonable_encoder import jsonable_encoder
|
|
10
10
|
from ...core.pydantic_utilities import pydantic_v1
|
11
11
|
from ...core.remove_none_from_dict import remove_none_from_dict
|
12
12
|
from ...core.request_options import RequestOptions
|
13
|
+
from ...types.document_index_indexing_config_request import DocumentIndexIndexingConfigRequest
|
13
14
|
from ...types.document_index_read import DocumentIndexRead
|
14
15
|
from ...types.entity_status import EntityStatus
|
15
16
|
from ...types.environment_enum import EnvironmentEnum
|
@@ -30,6 +31,7 @@ class DocumentIndexesClient:
|
|
30
31
|
limit: typing.Optional[int] = None,
|
31
32
|
offset: typing.Optional[int] = None,
|
32
33
|
ordering: typing.Optional[str] = None,
|
34
|
+
search: typing.Optional[str] = None,
|
33
35
|
status: typing.Optional[DocumentIndexesListRequestStatus] = None,
|
34
36
|
request_options: typing.Optional[RequestOptions] = None,
|
35
37
|
) -> PaginatedDocumentIndexReadList:
|
@@ -43,7 +45,9 @@ class DocumentIndexesClient:
|
|
43
45
|
|
44
46
|
- ordering: typing.Optional[str]. Which field to use when ordering the results.
|
45
47
|
|
46
|
-
-
|
48
|
+
- search: typing.Optional[str]. Search for document indices by name or label
|
49
|
+
|
50
|
+
- status: typing.Optional[DocumentIndexesListRequestStatus]. Filter down to only document indices that have a status matching the status specified
|
47
51
|
|
48
52
|
- `ACTIVE` - Active
|
49
53
|
- `ARCHIVED` - Archived
|
@@ -65,6 +69,7 @@ class DocumentIndexesClient:
|
|
65
69
|
"limit": limit,
|
66
70
|
"offset": offset,
|
67
71
|
"ordering": ordering,
|
72
|
+
"search": search,
|
68
73
|
"status": status,
|
69
74
|
**(
|
70
75
|
request_options.get("additional_query_parameters", {})
|
@@ -103,7 +108,7 @@ class DocumentIndexesClient:
|
|
103
108
|
name: str,
|
104
109
|
status: typing.Optional[EntityStatus] = OMIT,
|
105
110
|
environment: typing.Optional[EnvironmentEnum] = OMIT,
|
106
|
-
indexing_config:
|
111
|
+
indexing_config: DocumentIndexIndexingConfigRequest,
|
107
112
|
copy_documents_from_index_id: typing.Optional[str] = OMIT,
|
108
113
|
request_options: typing.Optional[RequestOptions] = None,
|
109
114
|
) -> DocumentIndexRead:
|
@@ -124,37 +129,32 @@ class DocumentIndexesClient:
|
|
124
129
|
* `DEVELOPMENT` - Development
|
125
130
|
* `STAGING` - Staging
|
126
131
|
* `PRODUCTION` - Production
|
127
|
-
- indexing_config:
|
132
|
+
- indexing_config: DocumentIndexIndexingConfigRequest.
|
128
133
|
|
129
134
|
- copy_documents_from_index_id: typing.Optional[str]. Optionally specify the id of a document index from which you'd like to copy and re-index its documents into this newly created index
|
130
135
|
|
131
136
|
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
|
132
137
|
---
|
138
|
+
from vellum import (
|
139
|
+
DocumentIndexChunkingRequest_ReductoChunker,
|
140
|
+
DocumentIndexIndexingConfigRequest,
|
141
|
+
IndexingConfigVectorizerRequest_TextEmbedding3Small,
|
142
|
+
)
|
133
143
|
from vellum.client import Vellum
|
134
144
|
|
135
145
|
client = Vellum(
|
136
146
|
api_key="YOUR_API_KEY",
|
137
147
|
)
|
138
148
|
client.document_indexes.create(
|
139
|
-
label="
|
140
|
-
name="
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
},
|
149
|
-
"vectorizer": {
|
150
|
-
"model_name": "hkunlp/instructor-xl",
|
151
|
-
"config": {
|
152
|
-
"instruction_domain": "",
|
153
|
-
"instruction_document_text_type": "plain_text",
|
154
|
-
"instruction_query_text_type": "plain_text",
|
155
|
-
},
|
156
|
-
},
|
157
|
-
},
|
149
|
+
label="string",
|
150
|
+
name="string",
|
151
|
+
status="ACTIVE",
|
152
|
+
environment="DEVELOPMENT",
|
153
|
+
indexing_config=DocumentIndexIndexingConfigRequest(
|
154
|
+
vectorizer=IndexingConfigVectorizerRequest_TextEmbedding3Small(),
|
155
|
+
chunking=DocumentIndexChunkingRequest_ReductoChunker(),
|
156
|
+
),
|
157
|
+
copy_documents_from_index_id="string",
|
158
158
|
)
|
159
159
|
"""
|
160
160
|
_request: typing.Dict[str, typing.Any] = {"label": label, "name": name, "indexing_config": indexing_config}
|
@@ -213,7 +213,7 @@ class DocumentIndexesClient:
|
|
213
213
|
api_key="YOUR_API_KEY",
|
214
214
|
)
|
215
215
|
client.document_indexes.retrieve(
|
216
|
-
id="
|
216
|
+
id="string",
|
217
217
|
)
|
218
218
|
"""
|
219
219
|
_response = self._client_wrapper.httpx_client.request(
|
@@ -280,8 +280,10 @@ class DocumentIndexesClient:
|
|
280
280
|
api_key="YOUR_API_KEY",
|
281
281
|
)
|
282
282
|
client.document_indexes.update(
|
283
|
-
id="
|
284
|
-
label="
|
283
|
+
id="string",
|
284
|
+
label="string",
|
285
|
+
status="ACTIVE",
|
286
|
+
environment="DEVELOPMENT",
|
285
287
|
)
|
286
288
|
"""
|
287
289
|
_request: typing.Dict[str, typing.Any] = {"label": label}
|
@@ -407,7 +409,10 @@ class DocumentIndexesClient:
|
|
407
409
|
api_key="YOUR_API_KEY",
|
408
410
|
)
|
409
411
|
client.document_indexes.partial_update(
|
410
|
-
id="
|
412
|
+
id="string",
|
413
|
+
label="string",
|
414
|
+
status="ACTIVE",
|
415
|
+
environment="DEVELOPMENT",
|
411
416
|
)
|
412
417
|
"""
|
413
418
|
_request: typing.Dict[str, typing.Any] = {}
|
@@ -464,6 +469,7 @@ class AsyncDocumentIndexesClient:
|
|
464
469
|
limit: typing.Optional[int] = None,
|
465
470
|
offset: typing.Optional[int] = None,
|
466
471
|
ordering: typing.Optional[str] = None,
|
472
|
+
search: typing.Optional[str] = None,
|
467
473
|
status: typing.Optional[DocumentIndexesListRequestStatus] = None,
|
468
474
|
request_options: typing.Optional[RequestOptions] = None,
|
469
475
|
) -> PaginatedDocumentIndexReadList:
|
@@ -477,7 +483,9 @@ class AsyncDocumentIndexesClient:
|
|
477
483
|
|
478
484
|
- ordering: typing.Optional[str]. Which field to use when ordering the results.
|
479
485
|
|
480
|
-
-
|
486
|
+
- search: typing.Optional[str]. Search for document indices by name or label
|
487
|
+
|
488
|
+
- status: typing.Optional[DocumentIndexesListRequestStatus]. Filter down to only document indices that have a status matching the status specified
|
481
489
|
|
482
490
|
- `ACTIVE` - Active
|
483
491
|
- `ARCHIVED` - Archived
|
@@ -499,6 +507,7 @@ class AsyncDocumentIndexesClient:
|
|
499
507
|
"limit": limit,
|
500
508
|
"offset": offset,
|
501
509
|
"ordering": ordering,
|
510
|
+
"search": search,
|
502
511
|
"status": status,
|
503
512
|
**(
|
504
513
|
request_options.get("additional_query_parameters", {})
|
@@ -537,7 +546,7 @@ class AsyncDocumentIndexesClient:
|
|
537
546
|
name: str,
|
538
547
|
status: typing.Optional[EntityStatus] = OMIT,
|
539
548
|
environment: typing.Optional[EnvironmentEnum] = OMIT,
|
540
|
-
indexing_config:
|
549
|
+
indexing_config: DocumentIndexIndexingConfigRequest,
|
541
550
|
copy_documents_from_index_id: typing.Optional[str] = OMIT,
|
542
551
|
request_options: typing.Optional[RequestOptions] = None,
|
543
552
|
) -> DocumentIndexRead:
|
@@ -558,37 +567,32 @@ class AsyncDocumentIndexesClient:
|
|
558
567
|
* `DEVELOPMENT` - Development
|
559
568
|
* `STAGING` - Staging
|
560
569
|
* `PRODUCTION` - Production
|
561
|
-
- indexing_config:
|
570
|
+
- indexing_config: DocumentIndexIndexingConfigRequest.
|
562
571
|
|
563
572
|
- copy_documents_from_index_id: typing.Optional[str]. Optionally specify the id of a document index from which you'd like to copy and re-index its documents into this newly created index
|
564
573
|
|
565
574
|
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
|
566
575
|
---
|
576
|
+
from vellum import (
|
577
|
+
DocumentIndexChunkingRequest_ReductoChunker,
|
578
|
+
DocumentIndexIndexingConfigRequest,
|
579
|
+
IndexingConfigVectorizerRequest_TextEmbedding3Small,
|
580
|
+
)
|
567
581
|
from vellum.client import AsyncVellum
|
568
582
|
|
569
583
|
client = AsyncVellum(
|
570
584
|
api_key="YOUR_API_KEY",
|
571
585
|
)
|
572
586
|
await client.document_indexes.create(
|
573
|
-
label="
|
574
|
-
name="
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
},
|
583
|
-
"vectorizer": {
|
584
|
-
"model_name": "hkunlp/instructor-xl",
|
585
|
-
"config": {
|
586
|
-
"instruction_domain": "",
|
587
|
-
"instruction_document_text_type": "plain_text",
|
588
|
-
"instruction_query_text_type": "plain_text",
|
589
|
-
},
|
590
|
-
},
|
591
|
-
},
|
587
|
+
label="string",
|
588
|
+
name="string",
|
589
|
+
status="ACTIVE",
|
590
|
+
environment="DEVELOPMENT",
|
591
|
+
indexing_config=DocumentIndexIndexingConfigRequest(
|
592
|
+
vectorizer=IndexingConfigVectorizerRequest_TextEmbedding3Small(),
|
593
|
+
chunking=DocumentIndexChunkingRequest_ReductoChunker(),
|
594
|
+
),
|
595
|
+
copy_documents_from_index_id="string",
|
592
596
|
)
|
593
597
|
"""
|
594
598
|
_request: typing.Dict[str, typing.Any] = {"label": label, "name": name, "indexing_config": indexing_config}
|
@@ -647,7 +651,7 @@ class AsyncDocumentIndexesClient:
|
|
647
651
|
api_key="YOUR_API_KEY",
|
648
652
|
)
|
649
653
|
await client.document_indexes.retrieve(
|
650
|
-
id="
|
654
|
+
id="string",
|
651
655
|
)
|
652
656
|
"""
|
653
657
|
_response = await self._client_wrapper.httpx_client.request(
|
@@ -714,8 +718,10 @@ class AsyncDocumentIndexesClient:
|
|
714
718
|
api_key="YOUR_API_KEY",
|
715
719
|
)
|
716
720
|
await client.document_indexes.update(
|
717
|
-
id="
|
718
|
-
label="
|
721
|
+
id="string",
|
722
|
+
label="string",
|
723
|
+
status="ACTIVE",
|
724
|
+
environment="DEVELOPMENT",
|
719
725
|
)
|
720
726
|
"""
|
721
727
|
_request: typing.Dict[str, typing.Any] = {"label": label}
|
@@ -841,7 +847,10 @@ class AsyncDocumentIndexesClient:
|
|
841
847
|
api_key="YOUR_API_KEY",
|
842
848
|
)
|
843
849
|
await client.document_indexes.partial_update(
|
844
|
-
id="
|
850
|
+
id="string",
|
851
|
+
label="string",
|
852
|
+
status="ACTIVE",
|
853
|
+
environment="DEVELOPMENT",
|
845
854
|
)
|
846
855
|
"""
|
847
856
|
_request: typing.Dict[str, typing.Any] = {}
|
@@ -99,7 +99,7 @@ class DocumentsClient:
|
|
99
99
|
|
100
100
|
def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> DocumentRead:
|
101
101
|
"""
|
102
|
-
Retrieve a Document
|
102
|
+
Retrieve a Document, keying off of either its Vellum-generated ID or its external ID.
|
103
103
|
|
104
104
|
Parameters:
|
105
105
|
- id: str. A UUID string identifying this document.
|
@@ -147,6 +147,8 @@ class DocumentsClient:
|
|
147
147
|
|
148
148
|
def destroy(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
149
149
|
"""
|
150
|
+
Delete a Document, keying off of either its Vellum-generated ID or its external ID.
|
151
|
+
|
150
152
|
Parameters:
|
151
153
|
- id: str. A UUID string identifying this document.
|
152
154
|
|
@@ -201,7 +203,7 @@ class DocumentsClient:
|
|
201
203
|
request_options: typing.Optional[RequestOptions] = None,
|
202
204
|
) -> DocumentRead:
|
203
205
|
"""
|
204
|
-
Update a Document, keying off of its Vellum-generated ID. Particularly useful for updating its metadata.
|
206
|
+
Update a Document, keying off of either its Vellum-generated ID or its external ID. Particularly useful for updating its metadata.
|
205
207
|
|
206
208
|
Parameters:
|
207
209
|
- id: str. A UUID string identifying this document.
|
@@ -453,7 +455,7 @@ class AsyncDocumentsClient:
|
|
453
455
|
|
454
456
|
async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> DocumentRead:
|
455
457
|
"""
|
456
|
-
Retrieve a Document
|
458
|
+
Retrieve a Document, keying off of either its Vellum-generated ID or its external ID.
|
457
459
|
|
458
460
|
Parameters:
|
459
461
|
- id: str. A UUID string identifying this document.
|
@@ -501,6 +503,8 @@ class AsyncDocumentsClient:
|
|
501
503
|
|
502
504
|
async def destroy(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
503
505
|
"""
|
506
|
+
Delete a Document, keying off of either its Vellum-generated ID or its external ID.
|
507
|
+
|
504
508
|
Parameters:
|
505
509
|
- id: str. A UUID string identifying this document.
|
506
510
|
|
@@ -555,7 +559,7 @@ class AsyncDocumentsClient:
|
|
555
559
|
request_options: typing.Optional[RequestOptions] = None,
|
556
560
|
) -> DocumentRead:
|
557
561
|
"""
|
558
|
-
Update a Document, keying off of its Vellum-generated ID. Particularly useful for updating its metadata.
|
562
|
+
Update a Document, keying off of either its Vellum-generated ID or its external ID. Particularly useful for updating its metadata.
|
559
563
|
|
560
564
|
Parameters:
|
561
565
|
- id: str. A UUID string identifying this document.
|