vellum-ai 0.3.5__py3-none-any.whl → 0.3.7__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- vellum/__init__.py +2 -0
- vellum/client.py +3 -0
- vellum/core/client_wrapper.py +1 -1
- vellum/resources/__init__.py +2 -0
- vellum/resources/folder_entities/__init__.py +2 -0
- vellum/resources/folder_entities/client.py +98 -0
- {vellum_ai-0.3.5.dist-info → vellum_ai-0.3.7.dist-info}/METADATA +1 -1
- {vellum_ai-0.3.5.dist-info → vellum_ai-0.3.7.dist-info}/RECORD +10 -8
- {vellum_ai-0.3.5.dist-info → vellum_ai-0.3.7.dist-info}/LICENSE +0 -0
- {vellum_ai-0.3.5.dist-info → vellum_ai-0.3.7.dist-info}/WHEEL +0 -0
vellum/__init__.py
CHANGED
@@ -367,6 +367,7 @@ from .resources import (
|
|
367
367
|
deployments,
|
368
368
|
document_indexes,
|
369
369
|
documents,
|
370
|
+
folder_entities,
|
370
371
|
model_versions,
|
371
372
|
registered_prompts,
|
372
373
|
sandboxes,
|
@@ -745,6 +746,7 @@ __all__ = [
|
|
745
746
|
"deployments",
|
746
747
|
"document_indexes",
|
747
748
|
"documents",
|
749
|
+
"folder_entities",
|
748
750
|
"model_versions",
|
749
751
|
"registered_prompts",
|
750
752
|
"sandboxes",
|
vellum/client.py
CHANGED
@@ -18,6 +18,7 @@ from .errors.not_found_error import NotFoundError
|
|
18
18
|
from .resources.deployments.client import AsyncDeploymentsClient, DeploymentsClient
|
19
19
|
from .resources.document_indexes.client import AsyncDocumentIndexesClient, DocumentIndexesClient
|
20
20
|
from .resources.documents.client import AsyncDocumentsClient, DocumentsClient
|
21
|
+
from .resources.folder_entities.client import AsyncFolderEntitiesClient, FolderEntitiesClient
|
21
22
|
from .resources.model_versions.client import AsyncModelVersionsClient, ModelVersionsClient
|
22
23
|
from .resources.registered_prompts.client import AsyncRegisteredPromptsClient, RegisteredPromptsClient
|
23
24
|
from .resources.sandboxes.client import AsyncSandboxesClient, SandboxesClient
|
@@ -67,6 +68,7 @@ class Vellum:
|
|
67
68
|
self.deployments = DeploymentsClient(client_wrapper=self._client_wrapper)
|
68
69
|
self.document_indexes = DocumentIndexesClient(client_wrapper=self._client_wrapper)
|
69
70
|
self.documents = DocumentsClient(client_wrapper=self._client_wrapper)
|
71
|
+
self.folder_entities = FolderEntitiesClient(client_wrapper=self._client_wrapper)
|
70
72
|
self.model_versions = ModelVersionsClient(client_wrapper=self._client_wrapper)
|
71
73
|
self.registered_prompts = RegisteredPromptsClient(client_wrapper=self._client_wrapper)
|
72
74
|
self.sandboxes = SandboxesClient(client_wrapper=self._client_wrapper)
|
@@ -649,6 +651,7 @@ class AsyncVellum:
|
|
649
651
|
self.deployments = AsyncDeploymentsClient(client_wrapper=self._client_wrapper)
|
650
652
|
self.document_indexes = AsyncDocumentIndexesClient(client_wrapper=self._client_wrapper)
|
651
653
|
self.documents = AsyncDocumentsClient(client_wrapper=self._client_wrapper)
|
654
|
+
self.folder_entities = AsyncFolderEntitiesClient(client_wrapper=self._client_wrapper)
|
652
655
|
self.model_versions = AsyncModelVersionsClient(client_wrapper=self._client_wrapper)
|
653
656
|
self.registered_prompts = AsyncRegisteredPromptsClient(client_wrapper=self._client_wrapper)
|
654
657
|
self.sandboxes = AsyncSandboxesClient(client_wrapper=self._client_wrapper)
|
vellum/core/client_wrapper.py
CHANGED
vellum/resources/__init__.py
CHANGED
@@ -4,6 +4,7 @@ from . import (
|
|
4
4
|
deployments,
|
5
5
|
document_indexes,
|
6
6
|
documents,
|
7
|
+
folder_entities,
|
7
8
|
model_versions,
|
8
9
|
registered_prompts,
|
9
10
|
sandboxes,
|
@@ -19,6 +20,7 @@ __all__ = [
|
|
19
20
|
"deployments",
|
20
21
|
"document_indexes",
|
21
22
|
"documents",
|
23
|
+
"folder_entities",
|
22
24
|
"model_versions",
|
23
25
|
"registered_prompts",
|
24
26
|
"sandboxes",
|
@@ -0,0 +1,98 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import typing
|
4
|
+
import urllib.parse
|
5
|
+
from json.decoder import JSONDecodeError
|
6
|
+
|
7
|
+
from ...core.api_error import ApiError
|
8
|
+
from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
9
|
+
from ...core.jsonable_encoder import jsonable_encoder
|
10
|
+
|
11
|
+
# this is used as the default value for optional parameters
|
12
|
+
OMIT = typing.cast(typing.Any, ...)
|
13
|
+
|
14
|
+
|
15
|
+
class FolderEntitiesClient:
|
16
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
17
|
+
self._client_wrapper = client_wrapper
|
18
|
+
|
19
|
+
def add_entity_to_folder(self, folder_id: str, *, entity_id: str) -> None:
|
20
|
+
"""
|
21
|
+
Add an entity to a specific folder or root directory.
|
22
|
+
|
23
|
+
Adding an entity to a folder will remove it from any other folders it might have been a member of.
|
24
|
+
|
25
|
+
Parameters:
|
26
|
+
- folder_id: str. The ID of the folder to which the entity should be added. This can be a UUID of a folder, or the name of a root directory (e.g. "PROMPT_SANDBOX").
|
27
|
+
|
28
|
+
- entity_id: str. The ID of the entity you would like to move.
|
29
|
+
---
|
30
|
+
from vellum.client import Vellum
|
31
|
+
|
32
|
+
client = Vellum(
|
33
|
+
api_key="YOUR_API_KEY",
|
34
|
+
)
|
35
|
+
client.folder_entities.add_entity_to_folder(
|
36
|
+
folder_id="folder_id",
|
37
|
+
entity_id="entity_id",
|
38
|
+
)
|
39
|
+
"""
|
40
|
+
_response = self._client_wrapper.httpx_client.request(
|
41
|
+
"POST",
|
42
|
+
urllib.parse.urljoin(
|
43
|
+
f"{self._client_wrapper.get_environment().default}/", f"v1/folders/{folder_id}/add-entity"
|
44
|
+
),
|
45
|
+
json=jsonable_encoder({"entity_id": entity_id}),
|
46
|
+
headers=self._client_wrapper.get_headers(),
|
47
|
+
timeout=None,
|
48
|
+
)
|
49
|
+
if 200 <= _response.status_code < 300:
|
50
|
+
return
|
51
|
+
try:
|
52
|
+
_response_json = _response.json()
|
53
|
+
except JSONDecodeError:
|
54
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
55
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
56
|
+
|
57
|
+
|
58
|
+
class AsyncFolderEntitiesClient:
|
59
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
60
|
+
self._client_wrapper = client_wrapper
|
61
|
+
|
62
|
+
async def add_entity_to_folder(self, folder_id: str, *, entity_id: str) -> None:
|
63
|
+
"""
|
64
|
+
Add an entity to a specific folder or root directory.
|
65
|
+
|
66
|
+
Adding an entity to a folder will remove it from any other folders it might have been a member of.
|
67
|
+
|
68
|
+
Parameters:
|
69
|
+
- folder_id: str. The ID of the folder to which the entity should be added. This can be a UUID of a folder, or the name of a root directory (e.g. "PROMPT_SANDBOX").
|
70
|
+
|
71
|
+
- entity_id: str. The ID of the entity you would like to move.
|
72
|
+
---
|
73
|
+
from vellum.client import AsyncVellum
|
74
|
+
|
75
|
+
client = AsyncVellum(
|
76
|
+
api_key="YOUR_API_KEY",
|
77
|
+
)
|
78
|
+
await client.folder_entities.add_entity_to_folder(
|
79
|
+
folder_id="folder_id",
|
80
|
+
entity_id="entity_id",
|
81
|
+
)
|
82
|
+
"""
|
83
|
+
_response = await self._client_wrapper.httpx_client.request(
|
84
|
+
"POST",
|
85
|
+
urllib.parse.urljoin(
|
86
|
+
f"{self._client_wrapper.get_environment().default}/", f"v1/folders/{folder_id}/add-entity"
|
87
|
+
),
|
88
|
+
json=jsonable_encoder({"entity_id": entity_id}),
|
89
|
+
headers=self._client_wrapper.get_headers(),
|
90
|
+
timeout=None,
|
91
|
+
)
|
92
|
+
if 200 <= _response.status_code < 300:
|
93
|
+
return
|
94
|
+
try:
|
95
|
+
_response_json = _response.json()
|
96
|
+
except JSONDecodeError:
|
97
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
98
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
@@ -1,8 +1,8 @@
|
|
1
|
-
vellum/__init__.py,sha256=
|
2
|
-
vellum/client.py,sha256=
|
1
|
+
vellum/__init__.py,sha256=suJJOLGlcpd1_lryb4KwPCbyyVJ11Fz-heOV3lB0JQQ,25383
|
2
|
+
vellum/client.py,sha256=GXr3l2QqlYu7Fb690wuDD-9rnnbqqvcTDpc48bbjTr4,61329
|
3
3
|
vellum/core/__init__.py,sha256=QJS3CJ2TYP2E1Tge0CS6Z7r8LTNzJHQVX1hD3558eP0,519
|
4
4
|
vellum/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
|
5
|
-
vellum/core/client_wrapper.py,sha256=
|
5
|
+
vellum/core/client_wrapper.py,sha256=YQr66uYsp2oKQr0vo4qu84rJSVTUzB2U8oPYkWi8tMM,1212
|
6
6
|
vellum/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
|
7
7
|
vellum/core/jsonable_encoder.py,sha256=MTYkDov2EryHgee4QM46uZiBOuOXK9KTHlBdBwU-CpU,3799
|
8
8
|
vellum/core/remove_none_from_dict.py,sha256=8m91FC3YuVem0Gm9_sXhJ2tGvP33owJJdrqCLEdowGw,330
|
@@ -14,7 +14,7 @@ vellum/errors/forbidden_error.py,sha256=dgnatOGair3CvxljCE45_qwN_yefzcw2G0vw88wr
|
|
14
14
|
vellum/errors/internal_server_error.py,sha256=E0rgqJC0-LcetLi1HmSi92KpvNkGSRCIdBeEqT_ln1s,252
|
15
15
|
vellum/errors/not_found_error.py,sha256=P65k-Lm2RuefAVSNLER5hH-4P99SGohKy2cOPSrIxNk,246
|
16
16
|
vellum/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
17
|
-
vellum/resources/__init__.py,sha256=
|
17
|
+
vellum/resources/__init__.py,sha256=E7dvnCySQgcXn9AADWlkZw4zNN84-8dH3WZ-BgPclhs,675
|
18
18
|
vellum/resources/deployments/__init__.py,sha256=AE0TcFwLrLBljM0ZDX-pPw4Kqt-1f5JDpIok2HS80QI,157
|
19
19
|
vellum/resources/deployments/client.py,sha256=rqD2zsLBlRwWE619Nb9m3wSEC9DAkz8RLJX8lVx_Ags,10812
|
20
20
|
vellum/resources/deployments/types/__init__.py,sha256=IhwnmoXJ0r_QEhh1b2tBcaAm_x3fWMVuIhYmAapp_ZA,183
|
@@ -23,6 +23,8 @@ vellum/resources/document_indexes/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8
|
|
23
23
|
vellum/resources/document_indexes/client.py,sha256=nAZ27OvbZg4d94CW-J8JBImiyClWvGaRhkQeEgwUZGA,10894
|
24
24
|
vellum/resources/documents/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
25
25
|
vellum/resources/documents/client.py,sha256=V64IA5_vrjq52i_DUV1LEy4jvcwalww5fYxoiVauabA,17776
|
26
|
+
vellum/resources/folder_entities/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
27
|
+
vellum/resources/folder_entities/client.py,sha256=KBC-YKkUQTE31etwG0D9MJF_VW_KiZ0eCi18JYzLE8s,3748
|
26
28
|
vellum/resources/model_versions/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
27
29
|
vellum/resources/model_versions/client.py,sha256=6OQ4x0yqdd3kjjI88HXbJLx1W7qblme4YueHYr7j9pg,3053
|
28
30
|
vellum/resources/registered_prompts/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
@@ -287,7 +289,7 @@ vellum/types/workflow_result_event_output_data_number.py,sha256=5IG_4XZhUZjwCfX1
|
|
287
289
|
vellum/types/workflow_result_event_output_data_search_results.py,sha256=FZeTLuHIBJp0AZUqBOzzMN4ntf_Q3hKP4m3vIzVq2cQ,1404
|
288
290
|
vellum/types/workflow_result_event_output_data_string.py,sha256=XJ7ZFTS2eqIMwa-zXFPDowu3o3JnRUfxC1MJIk8nPDI,1478
|
289
291
|
vellum/types/workflow_stream_event.py,sha256=OQUSzwoM-OCfWxNzeOVVLsjCue_WWqin3tGMtwvp_rc,873
|
290
|
-
vellum_ai-0.3.
|
291
|
-
vellum_ai-0.3.
|
292
|
-
vellum_ai-0.3.
|
293
|
-
vellum_ai-0.3.
|
292
|
+
vellum_ai-0.3.7.dist-info/LICENSE,sha256=CcaljEIoOBaU-wItPH4PmM_mDCGpyuUY0Er1BGu5Ti8,1073
|
293
|
+
vellum_ai-0.3.7.dist-info/METADATA,sha256=-ckpfJoQ8AQlGQ3m58d4zbzH8bVV-GnvdYwcOTWySnk,3486
|
294
|
+
vellum_ai-0.3.7.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
295
|
+
vellum_ai-0.3.7.dist-info/RECORD,,
|
File without changes
|
File without changes
|