vellum-ai 0.6.7__py3-none-any.whl → 0.6.9__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- vellum/__init__.py +2 -0
- vellum/core/client_wrapper.py +1 -1
- vellum/resources/document_indexes/client.py +120 -12
- vellum/types/__init__.py +2 -0
- vellum/types/iteration_state_enum.py +5 -0
- vellum/types/map_node_result_data.py +2 -0
- {vellum_ai-0.6.7.dist-info → vellum_ai-0.6.9.dist-info}/METADATA +1 -1
- {vellum_ai-0.6.7.dist-info → vellum_ai-0.6.9.dist-info}/RECORD +10 -9
- {vellum_ai-0.6.7.dist-info → vellum_ai-0.6.9.dist-info}/LICENSE +0 -0
- {vellum_ai-0.6.7.dist-info → vellum_ai-0.6.9.dist-info}/WHEEL +0 -0
vellum/__init__.py
CHANGED
@@ -193,6 +193,7 @@ from .types import (
|
|
193
193
|
InstructorVectorizerConfig,
|
194
194
|
InstructorVectorizerConfigRequest,
|
195
195
|
IntfloatMultilingualE5LargeEnum,
|
196
|
+
IterationStateEnum,
|
196
197
|
JsonEnum,
|
197
198
|
JsonInputRequest,
|
198
199
|
JsonVariableValue,
|
@@ -826,6 +827,7 @@ __all__ = [
|
|
826
827
|
"InstructorVectorizerConfigRequest",
|
827
828
|
"InternalServerError",
|
828
829
|
"IntfloatMultilingualE5LargeEnum",
|
830
|
+
"IterationStateEnum",
|
829
831
|
"JsonEnum",
|
830
832
|
"JsonInputRequest",
|
831
833
|
"JsonVariableValue",
|
vellum/core/client_wrapper.py
CHANGED
@@ -256,10 +256,10 @@ class DocumentIndexesClient:
|
|
256
256
|
request_options: typing.Optional[RequestOptions] = None,
|
257
257
|
) -> DocumentIndexRead:
|
258
258
|
"""
|
259
|
-
Used to fully update a Document Index given its ID.
|
259
|
+
Used to fully update a Document Index given its ID or name.
|
260
260
|
|
261
261
|
Parameters:
|
262
|
-
- id: str.
|
262
|
+
- id: str. Either the Document Index's ID or its unique name
|
263
263
|
|
264
264
|
- label: str. A human-readable label for the document index
|
265
265
|
|
@@ -329,10 +329,10 @@ class DocumentIndexesClient:
|
|
329
329
|
|
330
330
|
def destroy(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
331
331
|
"""
|
332
|
-
Used to delete a Document Index given its ID.
|
332
|
+
Used to delete a Document Index given its ID or name.
|
333
333
|
|
334
334
|
Parameters:
|
335
|
-
- id: str.
|
335
|
+
- id: str. Either the Document Index's ID or its unique name
|
336
336
|
|
337
337
|
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
|
338
338
|
---
|
@@ -385,10 +385,10 @@ class DocumentIndexesClient:
|
|
385
385
|
request_options: typing.Optional[RequestOptions] = None,
|
386
386
|
) -> DocumentIndexRead:
|
387
387
|
"""
|
388
|
-
Used to partial update a Document Index given its ID.
|
388
|
+
Used to partial update a Document Index given its ID or name.
|
389
389
|
|
390
390
|
Parameters:
|
391
|
-
- id: str.
|
391
|
+
- id: str. Either the Document Index's ID or its unique name
|
392
392
|
|
393
393
|
- label: typing.Optional[str]. A human-readable label for the document index
|
394
394
|
|
@@ -458,6 +458,60 @@ class DocumentIndexesClient:
|
|
458
458
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
459
459
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
460
460
|
|
461
|
+
def remove_document(
|
462
|
+
self, document_id: str, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
463
|
+
) -> None:
|
464
|
+
"""
|
465
|
+
Removes a Document from a Document Index without deleting the Document itself.
|
466
|
+
|
467
|
+
Parameters:
|
468
|
+
- document_id: str. Either the Vellum-generated ID or the originally supplied external_id that uniquely identifies the Document you'd like to remove.
|
469
|
+
|
470
|
+
- id: str. Either the Vellum-generated ID or the originally specified name that uniquely identifies the Document Index from which you'd like to remove a Document.
|
471
|
+
|
472
|
+
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
|
473
|
+
---
|
474
|
+
from vellum.client import Vellum
|
475
|
+
|
476
|
+
client = Vellum(
|
477
|
+
api_key="YOUR_API_KEY",
|
478
|
+
)
|
479
|
+
client.document_indexes.remove_document(
|
480
|
+
document_id="document_id",
|
481
|
+
id="id",
|
482
|
+
)
|
483
|
+
"""
|
484
|
+
_response = self._client_wrapper.httpx_client.request(
|
485
|
+
method="DELETE",
|
486
|
+
url=urllib.parse.urljoin(
|
487
|
+
f"{self._client_wrapper.get_environment().default}/",
|
488
|
+
f"v1/document-indexes/{jsonable_encoder(id)}/documents/{jsonable_encoder(document_id)}",
|
489
|
+
),
|
490
|
+
params=jsonable_encoder(
|
491
|
+
request_options.get("additional_query_parameters") if request_options is not None else None
|
492
|
+
),
|
493
|
+
headers=jsonable_encoder(
|
494
|
+
remove_none_from_dict(
|
495
|
+
{
|
496
|
+
**self._client_wrapper.get_headers(),
|
497
|
+
**(request_options.get("additional_headers", {}) if request_options is not None else {}),
|
498
|
+
}
|
499
|
+
)
|
500
|
+
),
|
501
|
+
timeout=request_options.get("timeout_in_seconds")
|
502
|
+
if request_options is not None and request_options.get("timeout_in_seconds") is not None
|
503
|
+
else self._client_wrapper.get_timeout(),
|
504
|
+
retries=0,
|
505
|
+
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
506
|
+
)
|
507
|
+
if 200 <= _response.status_code < 300:
|
508
|
+
return
|
509
|
+
try:
|
510
|
+
_response_json = _response.json()
|
511
|
+
except JSONDecodeError:
|
512
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
513
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
514
|
+
|
461
515
|
|
462
516
|
class AsyncDocumentIndexesClient:
|
463
517
|
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
@@ -694,10 +748,10 @@ class AsyncDocumentIndexesClient:
|
|
694
748
|
request_options: typing.Optional[RequestOptions] = None,
|
695
749
|
) -> DocumentIndexRead:
|
696
750
|
"""
|
697
|
-
Used to fully update a Document Index given its ID.
|
751
|
+
Used to fully update a Document Index given its ID or name.
|
698
752
|
|
699
753
|
Parameters:
|
700
|
-
- id: str.
|
754
|
+
- id: str. Either the Document Index's ID or its unique name
|
701
755
|
|
702
756
|
- label: str. A human-readable label for the document index
|
703
757
|
|
@@ -767,10 +821,10 @@ class AsyncDocumentIndexesClient:
|
|
767
821
|
|
768
822
|
async def destroy(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
769
823
|
"""
|
770
|
-
Used to delete a Document Index given its ID.
|
824
|
+
Used to delete a Document Index given its ID or name.
|
771
825
|
|
772
826
|
Parameters:
|
773
|
-
- id: str.
|
827
|
+
- id: str. Either the Document Index's ID or its unique name
|
774
828
|
|
775
829
|
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
|
776
830
|
---
|
@@ -823,10 +877,10 @@ class AsyncDocumentIndexesClient:
|
|
823
877
|
request_options: typing.Optional[RequestOptions] = None,
|
824
878
|
) -> DocumentIndexRead:
|
825
879
|
"""
|
826
|
-
Used to partial update a Document Index given its ID.
|
880
|
+
Used to partial update a Document Index given its ID or name.
|
827
881
|
|
828
882
|
Parameters:
|
829
|
-
- id: str.
|
883
|
+
- id: str. Either the Document Index's ID or its unique name
|
830
884
|
|
831
885
|
- label: typing.Optional[str]. A human-readable label for the document index
|
832
886
|
|
@@ -895,3 +949,57 @@ class AsyncDocumentIndexesClient:
|
|
895
949
|
except JSONDecodeError:
|
896
950
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
897
951
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
952
|
+
|
953
|
+
async def remove_document(
|
954
|
+
self, document_id: str, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
955
|
+
) -> None:
|
956
|
+
"""
|
957
|
+
Removes a Document from a Document Index without deleting the Document itself.
|
958
|
+
|
959
|
+
Parameters:
|
960
|
+
- document_id: str. Either the Vellum-generated ID or the originally supplied external_id that uniquely identifies the Document you'd like to remove.
|
961
|
+
|
962
|
+
- id: str. Either the Vellum-generated ID or the originally specified name that uniquely identifies the Document Index from which you'd like to remove a Document.
|
963
|
+
|
964
|
+
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
|
965
|
+
---
|
966
|
+
from vellum.client import AsyncVellum
|
967
|
+
|
968
|
+
client = AsyncVellum(
|
969
|
+
api_key="YOUR_API_KEY",
|
970
|
+
)
|
971
|
+
await client.document_indexes.remove_document(
|
972
|
+
document_id="document_id",
|
973
|
+
id="id",
|
974
|
+
)
|
975
|
+
"""
|
976
|
+
_response = await self._client_wrapper.httpx_client.request(
|
977
|
+
method="DELETE",
|
978
|
+
url=urllib.parse.urljoin(
|
979
|
+
f"{self._client_wrapper.get_environment().default}/",
|
980
|
+
f"v1/document-indexes/{jsonable_encoder(id)}/documents/{jsonable_encoder(document_id)}",
|
981
|
+
),
|
982
|
+
params=jsonable_encoder(
|
983
|
+
request_options.get("additional_query_parameters") if request_options is not None else None
|
984
|
+
),
|
985
|
+
headers=jsonable_encoder(
|
986
|
+
remove_none_from_dict(
|
987
|
+
{
|
988
|
+
**self._client_wrapper.get_headers(),
|
989
|
+
**(request_options.get("additional_headers", {}) if request_options is not None else {}),
|
990
|
+
}
|
991
|
+
)
|
992
|
+
),
|
993
|
+
timeout=request_options.get("timeout_in_seconds")
|
994
|
+
if request_options is not None and request_options.get("timeout_in_seconds") is not None
|
995
|
+
else self._client_wrapper.get_timeout(),
|
996
|
+
retries=0,
|
997
|
+
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
998
|
+
)
|
999
|
+
if 200 <= _response.status_code < 300:
|
1000
|
+
return
|
1001
|
+
try:
|
1002
|
+
_response_json = _response.json()
|
1003
|
+
except JSONDecodeError:
|
1004
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
1005
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
vellum/types/__init__.py
CHANGED
@@ -230,6 +230,7 @@ from .initiated_workflow_node_result_event import InitiatedWorkflowNodeResultEve
|
|
230
230
|
from .instructor_vectorizer_config import InstructorVectorizerConfig
|
231
231
|
from .instructor_vectorizer_config_request import InstructorVectorizerConfigRequest
|
232
232
|
from .intfloat_multilingual_e_5_large_enum import IntfloatMultilingualE5LargeEnum
|
233
|
+
from .iteration_state_enum import IterationStateEnum
|
233
234
|
from .json_enum import JsonEnum
|
234
235
|
from .json_input_request import JsonInputRequest
|
235
236
|
from .json_variable_value import JsonVariableValue
|
@@ -884,6 +885,7 @@ __all__ = [
|
|
884
885
|
"InstructorVectorizerConfig",
|
885
886
|
"InstructorVectorizerConfigRequest",
|
886
887
|
"IntfloatMultilingualE5LargeEnum",
|
888
|
+
"IterationStateEnum",
|
887
889
|
"JsonEnum",
|
888
890
|
"JsonInputRequest",
|
889
891
|
"JsonVariableValue",
|
@@ -5,10 +5,12 @@ import typing
|
|
5
5
|
|
6
6
|
from ..core.datetime_utils import serialize_datetime
|
7
7
|
from ..core.pydantic_utilities import pydantic_v1
|
8
|
+
from .iteration_state_enum import IterationStateEnum
|
8
9
|
|
9
10
|
|
10
11
|
class MapNodeResultData(pydantic_v1.BaseModel):
|
11
12
|
execution_ids: typing.List[str]
|
13
|
+
iteration_state: typing.Optional[IterationStateEnum] = None
|
12
14
|
|
13
15
|
def json(self, **kwargs: typing.Any) -> str:
|
14
16
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -1,8 +1,8 @@
|
|
1
|
-
vellum/__init__.py,sha256=
|
1
|
+
vellum/__init__.py,sha256=OcHXzyp3Csd35fdH_THYQwUM0distNnT5B1re41UI44,45701
|
2
2
|
vellum/client.py,sha256=FklbOzCaDTPP_EQn0HJXUq1_ZFOHuSePt6_nVQ_YLgY,97463
|
3
3
|
vellum/core/__init__.py,sha256=1pNSKkwyQvMl_F0wohBqmoQAITptg3zlvCwsoSSzy7c,853
|
4
4
|
vellum/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
|
5
|
-
vellum/core/client_wrapper.py,sha256
|
5
|
+
vellum/core/client_wrapper.py,sha256=O-MwUsnrzYAjhRtuFZAdCMSoFYXq9V_stJOY-Sb7IAo,1697
|
6
6
|
vellum/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
|
7
7
|
vellum/core/file.py,sha256=sy1RUGZ3aJYuw998bZytxxo6QdgKmlnlgBaMvwEKCGg,1480
|
8
8
|
vellum/core/http_client.py,sha256=5ok6hqgZDJhg57EHvMnr0BBaHdG50QxFPKaCZ9aVWTc,5059
|
@@ -32,7 +32,7 @@ vellum/resources/deployments/client.py,sha256=p-n2k6RQIwNBDm9dU-wE6pI0kRhNjQiARB
|
|
32
32
|
vellum/resources/deployments/types/__init__.py,sha256=IhwnmoXJ0r_QEhh1b2tBcaAm_x3fWMVuIhYmAapp_ZA,183
|
33
33
|
vellum/resources/deployments/types/deployments_list_request_status.py,sha256=CxlQD16KZXme7x31YYCe_3aAgEueutDTeJo5A4Au-aU,174
|
34
34
|
vellum/resources/document_indexes/__init__.py,sha256=YpOl_9IV7xOlH4OmusQxtAJB11kxQfCSMDyT1_UD0oM,165
|
35
|
-
vellum/resources/document_indexes/client.py,sha256=
|
35
|
+
vellum/resources/document_indexes/client.py,sha256=DgJn_ZpIt-WY8OR3P3sCQ_x7FVtQ5WVj_TR1t9PwDf0,45370
|
36
36
|
vellum/resources/document_indexes/types/__init__.py,sha256=IoFqKHN_VBdEhC7VL8_6Jbatrn0e0zuYEJAJUahcUR0,196
|
37
37
|
vellum/resources/document_indexes/types/document_indexes_list_request_status.py,sha256=sfUEB0cvOSmlE2iITqnMVyHv05Zy2fWP4QjCIYqMg0M,178
|
38
38
|
vellum/resources/documents/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
@@ -60,7 +60,7 @@ vellum/terraform/document_index/__init__.py,sha256=qq2zENI22bUvqGk_a1lmsoTr5O_xC
|
|
60
60
|
vellum/terraform/provider/__init__.py,sha256=K1yLlTZkYBxhD4bhUV1v23hxDGgbfsAIGsSyeB54dNQ,10298
|
61
61
|
vellum/terraform/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
62
62
|
vellum/terraform/versions.json,sha256=STW6Mg3BKDacFmbWHXziHxE90GWncZf4AIzCLiXm_7o,56
|
63
|
-
vellum/types/__init__.py,sha256=
|
63
|
+
vellum/types/__init__.py,sha256=kXwzN3eE2Ec000S2qo5QBGX3ybDdD4JGWhCVj1Cmfv0,61339
|
64
64
|
vellum/types/add_openai_api_key_enum.py,sha256=GB7sLK_Ou7-Xn73sKJHUo6Gx3TjyhU7uJvWZAg4UeaI,92
|
65
65
|
vellum/types/api_node_result.py,sha256=SvYIi1T-N_P3FVjzv9I91PaCT0IN958A3easp5Q7jqE,983
|
66
66
|
vellum/types/api_node_result_data.py,sha256=KFBmmizcEg73GwQMXUtEdJ4e9YGFpRLYAnalwxIcDug,1161
|
@@ -183,6 +183,7 @@ vellum/types/initiated_workflow_node_result_event.py,sha256=21Q_wO3U1qbYuNUAWBaX
|
|
183
183
|
vellum/types/instructor_vectorizer_config.py,sha256=SjOqNyt2e1_4itwmORbDMvnJ3hJN-G1XYThez4rJanc,1025
|
184
184
|
vellum/types/instructor_vectorizer_config_request.py,sha256=SiR6BT6rFqmZ85iN6kj_GwHXmuZJ5-0YqXCULR18hno,1032
|
185
185
|
vellum/types/intfloat_multilingual_e_5_large_enum.py,sha256=hq41gaU723etcyr8--yEzHFqdR_x7ixSMRXTCHthknM,163
|
186
|
+
vellum/types/iteration_state_enum.py,sha256=yjwnPhqKQQbWgQUqP2qws4kVMhRY8sFTGK_diuSrsR0,168
|
186
187
|
vellum/types/json_enum.py,sha256=0Se0lTWxLGQe-JdQ8E9KwFt5NWXuI7BkOdWQcFKJg-8,114
|
187
188
|
vellum/types/json_input_request.py,sha256=fpBb3QS-E0a3hZU_mHZ5Yjkwr10-qqbQoMJbfhfGu_4,1048
|
188
189
|
vellum/types/json_variable_value.py,sha256=KdKz67NgVwVHpxXFgSxFPBeGBdjzTwZ_VKe22kcaWjo,904
|
@@ -191,7 +192,7 @@ vellum/types/logical_operator.py,sha256=MuuMZ1-gOCDvy1WDQkMFfiBNHsRCqKgJei-b3727
|
|
191
192
|
vellum/types/logprobs_enum.py,sha256=D_458cZX2CAb6dX_ovrQ6HARlJkYcZRadKwsi1Cr-JM,151
|
192
193
|
vellum/types/map_enum.py,sha256=ABInkGAOBdgmsKzcCcM0AKEPQt-iwim-GmHEkXEHEs0,112
|
193
194
|
vellum/types/map_node_result.py,sha256=x5S8E8_jhIZHc9aAeE0GqGAw8v5XoLXTA4uiFTVtqA0,1006
|
194
|
-
vellum/types/map_node_result_data.py,sha256=
|
195
|
+
vellum/types/map_node_result_data.py,sha256=XRaiU2_8zY9g_N_wYsqUgHmNME3ePHl3_VhSUTumCzI,993
|
195
196
|
vellum/types/merge_enum.py,sha256=TeAaXV2eWEGJHR3BqHdtIRkHUhctvfUo_Wu8MeqHYtU,116
|
196
197
|
vellum/types/merge_node_result.py,sha256=R6AndgFRFuFQk8APapAr7bkv4vqkukz-D71kl8rIubU,905
|
197
198
|
vellum/types/metadata_filter_config_request.py,sha256=_1CVIxmDmtXezTMWoaqeea9boe8hyCmmAn28u69NEUk,1355
|
@@ -470,7 +471,7 @@ vellum/types/workflow_result_event_output_data_search_results.py,sha256=gazaUrC5
|
|
470
471
|
vellum/types/workflow_result_event_output_data_string.py,sha256=aVWIIGbLj4TJJhTTj6WzhbYXQkcZatKuhhNy8UYwXbw,1482
|
471
472
|
vellum/types/workflow_stream_event.py,sha256=KA6Bkk_XA6AIPWR-1vKnwF1A8l_Bm5y0arQCWWWRpsk,911
|
472
473
|
vellum/version.py,sha256=neLt8HBHHUtDF9M5fsyUzHT-pKooEPvceaLDqqIGb0s,77
|
473
|
-
vellum_ai-0.6.
|
474
|
-
vellum_ai-0.6.
|
475
|
-
vellum_ai-0.6.
|
476
|
-
vellum_ai-0.6.
|
474
|
+
vellum_ai-0.6.9.dist-info/LICENSE,sha256=CcaljEIoOBaU-wItPH4PmM_mDCGpyuUY0Er1BGu5Ti8,1073
|
475
|
+
vellum_ai-0.6.9.dist-info/METADATA,sha256=T7NTne4Imv4xgnDZnD2QrOmjeoJmwPim5UyD2bX6e7g,3872
|
476
|
+
vellum_ai-0.6.9.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
477
|
+
vellum_ai-0.6.9.dist-info/RECORD,,
|
File without changes
|
File without changes
|