letta-client 1.0.0a10__py3-none-any.whl → 1.0.0a11__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.
Potentially problematic release.
This version of letta-client might be problematic. Click here for more details.
- letta_client/_client.py +5 -1
- letta_client/_streaming.py +40 -2
- letta_client/_version.py +1 -1
- letta_client/resources/agents/blocks.py +15 -17
- letta_client/resources/agents/files.py +10 -13
- letta_client/resources/agents/folders.py +10 -13
- letta_client/resources/agents/messages.py +14 -4
- letta_client/resources/agents/tools.py +10 -13
- letta_client/resources/archives.py +10 -12
- letta_client/resources/batches/batches.py +10 -12
- letta_client/resources/batches/messages.py +11 -14
- letta_client/resources/blocks/blocks.py +19 -22
- letta_client/resources/folders/agents.py +10 -13
- letta_client/resources/folders/files.py +9 -12
- letta_client/resources/folders/folders.py +10 -12
- letta_client/resources/identities/blocks.py +7 -7
- letta_client/resources/identities/identities.py +10 -12
- letta_client/resources/runs/runs.py +11 -13
- letta_client/resources/tags.py +10 -13
- letta_client/resources/tools.py +10 -12
- letta_client/types/__init__.py +7 -4
- letta_client/types/agents/__init__.py +2 -3
- letta_client/types/agents/file_list_response.py +14 -3
- letta_client/types/agents/folder_list_response.py +7 -3
- letta_client/types/agents/letta_streaming_response.py +70 -0
- letta_client/types/agents/tool_list_response.py +10 -0
- letta_client/types/archive_list_response.py +10 -0
- letta_client/types/batch_list_response.py +10 -0
- letta_client/types/batches/__init__.py +1 -0
- letta_client/types/batches/message_list_response.py +12 -0
- letta_client/types/{block_list_response.py → block_response.py} +5 -5
- letta_client/types/folder_list_response.py +10 -0
- letta_client/types/folders/agent_list_response.py +2 -1
- letta_client/types/folders/file_list_response.py +7 -4
- letta_client/types/identities/__init__.py +0 -1
- letta_client/types/identity_list_response.py +10 -0
- letta_client/types/run_list_response.py +10 -0
- letta_client/types/tag_list_response.py +2 -1
- letta_client/types/tool.py +25 -25
- letta_client/types/tool_list_response.py +10 -0
- {letta_client-1.0.0a10.dist-info → letta_client-1.0.0a11.dist-info}/METADATA +1 -1
- {letta_client-1.0.0a10.dist-info → letta_client-1.0.0a11.dist-info}/RECORD +44 -42
- letta_client/types/agents/block_list_response.py +0 -63
- letta_client/types/agents/block_modify_response.py +0 -63
- letta_client/types/agents/block_retrieve_response.py +0 -63
- letta_client/types/block_create_response.py +0 -63
- letta_client/types/block_modify_response.py +0 -63
- letta_client/types/block_retrieve_response.py +0 -63
- letta_client/types/identities/block_list_response.py +0 -63
- {letta_client-1.0.0a10.dist-info → letta_client-1.0.0a11.dist-info}/WHEEL +0 -0
- {letta_client-1.0.0a10.dist-info → letta_client-1.0.0a11.dist-info}/licenses/LICENSE +0 -0
|
@@ -26,9 +26,9 @@ from ..._response import (
|
|
|
26
26
|
async_to_raw_response_wrapper,
|
|
27
27
|
async_to_streamed_response_wrapper,
|
|
28
28
|
)
|
|
29
|
-
from ...
|
|
30
|
-
from ..._base_client import AsyncPaginator, make_request_options
|
|
29
|
+
from ..._base_client import make_request_options
|
|
31
30
|
from ...types.batch_job import BatchJob
|
|
31
|
+
from ...types.batch_list_response import BatchListResponse
|
|
32
32
|
|
|
33
33
|
__all__ = ["BatchesResource", "AsyncBatchesResource"]
|
|
34
34
|
|
|
@@ -155,7 +155,7 @@ class BatchesResource(SyncAPIResource):
|
|
|
155
155
|
extra_query: Query | None = None,
|
|
156
156
|
extra_body: Body | None = None,
|
|
157
157
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
158
|
-
) ->
|
|
158
|
+
) -> BatchListResponse:
|
|
159
159
|
"""List all batch runs.
|
|
160
160
|
|
|
161
161
|
Args:
|
|
@@ -182,9 +182,8 @@ class BatchesResource(SyncAPIResource):
|
|
|
182
182
|
|
|
183
183
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
184
184
|
"""
|
|
185
|
-
return self.
|
|
185
|
+
return self._get(
|
|
186
186
|
"/v1/messages/batches",
|
|
187
|
-
page=SyncArrayPage[BatchJob],
|
|
188
187
|
options=make_request_options(
|
|
189
188
|
extra_headers=extra_headers,
|
|
190
189
|
extra_query=extra_query,
|
|
@@ -201,7 +200,7 @@ class BatchesResource(SyncAPIResource):
|
|
|
201
200
|
batch_list_params.BatchListParams,
|
|
202
201
|
),
|
|
203
202
|
),
|
|
204
|
-
|
|
203
|
+
cast_to=BatchListResponse,
|
|
205
204
|
)
|
|
206
205
|
|
|
207
206
|
def cancel(
|
|
@@ -346,7 +345,7 @@ class AsyncBatchesResource(AsyncAPIResource):
|
|
|
346
345
|
cast_to=BatchJob,
|
|
347
346
|
)
|
|
348
347
|
|
|
349
|
-
def list(
|
|
348
|
+
async def list(
|
|
350
349
|
self,
|
|
351
350
|
*,
|
|
352
351
|
after: Optional[str] | Omit = omit,
|
|
@@ -360,7 +359,7 @@ class AsyncBatchesResource(AsyncAPIResource):
|
|
|
360
359
|
extra_query: Query | None = None,
|
|
361
360
|
extra_body: Body | None = None,
|
|
362
361
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
363
|
-
) ->
|
|
362
|
+
) -> BatchListResponse:
|
|
364
363
|
"""List all batch runs.
|
|
365
364
|
|
|
366
365
|
Args:
|
|
@@ -387,15 +386,14 @@ class AsyncBatchesResource(AsyncAPIResource):
|
|
|
387
386
|
|
|
388
387
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
389
388
|
"""
|
|
390
|
-
return self.
|
|
389
|
+
return await self._get(
|
|
391
390
|
"/v1/messages/batches",
|
|
392
|
-
page=AsyncArrayPage[BatchJob],
|
|
393
391
|
options=make_request_options(
|
|
394
392
|
extra_headers=extra_headers,
|
|
395
393
|
extra_query=extra_query,
|
|
396
394
|
extra_body=extra_body,
|
|
397
395
|
timeout=timeout,
|
|
398
|
-
query=
|
|
396
|
+
query=await async_maybe_transform(
|
|
399
397
|
{
|
|
400
398
|
"after": after,
|
|
401
399
|
"before": before,
|
|
@@ -406,7 +404,7 @@ class AsyncBatchesResource(AsyncAPIResource):
|
|
|
406
404
|
batch_list_params.BatchListParams,
|
|
407
405
|
),
|
|
408
406
|
),
|
|
409
|
-
|
|
407
|
+
cast_to=BatchListResponse,
|
|
410
408
|
)
|
|
411
409
|
|
|
412
410
|
async def cancel(
|
|
@@ -8,7 +8,7 @@ from typing_extensions import Literal
|
|
|
8
8
|
import httpx
|
|
9
9
|
|
|
10
10
|
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
11
|
-
from ..._utils import maybe_transform
|
|
11
|
+
from ..._utils import maybe_transform, async_maybe_transform
|
|
12
12
|
from ..._compat import cached_property
|
|
13
13
|
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
14
14
|
from ..._response import (
|
|
@@ -17,10 +17,9 @@ from ..._response import (
|
|
|
17
17
|
async_to_raw_response_wrapper,
|
|
18
18
|
async_to_streamed_response_wrapper,
|
|
19
19
|
)
|
|
20
|
-
from ...
|
|
21
|
-
from ..._base_client import AsyncPaginator, make_request_options
|
|
20
|
+
from ..._base_client import make_request_options
|
|
22
21
|
from ...types.batches import message_list_params
|
|
23
|
-
from ...types.
|
|
22
|
+
from ...types.batches.message_list_response import MessageListResponse
|
|
24
23
|
|
|
25
24
|
__all__ = ["MessagesResource", "AsyncMessagesResource"]
|
|
26
25
|
|
|
@@ -61,7 +60,7 @@ class MessagesResource(SyncAPIResource):
|
|
|
61
60
|
extra_query: Query | None = None,
|
|
62
61
|
extra_body: Body | None = None,
|
|
63
62
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
64
|
-
) ->
|
|
63
|
+
) -> MessageListResponse:
|
|
65
64
|
"""
|
|
66
65
|
Get response messages for a specific batch job.
|
|
67
66
|
|
|
@@ -91,9 +90,8 @@ class MessagesResource(SyncAPIResource):
|
|
|
91
90
|
"""
|
|
92
91
|
if not batch_id:
|
|
93
92
|
raise ValueError(f"Expected a non-empty value for `batch_id` but received {batch_id!r}")
|
|
94
|
-
return self.
|
|
93
|
+
return self._get(
|
|
95
94
|
f"/v1/messages/batches/{batch_id}/messages",
|
|
96
|
-
page=SyncObjectPage[Message],
|
|
97
95
|
options=make_request_options(
|
|
98
96
|
extra_headers=extra_headers,
|
|
99
97
|
extra_query=extra_query,
|
|
@@ -111,7 +109,7 @@ class MessagesResource(SyncAPIResource):
|
|
|
111
109
|
message_list_params.MessageListParams,
|
|
112
110
|
),
|
|
113
111
|
),
|
|
114
|
-
|
|
112
|
+
cast_to=MessageListResponse,
|
|
115
113
|
)
|
|
116
114
|
|
|
117
115
|
|
|
@@ -135,7 +133,7 @@ class AsyncMessagesResource(AsyncAPIResource):
|
|
|
135
133
|
"""
|
|
136
134
|
return AsyncMessagesResourceWithStreamingResponse(self)
|
|
137
135
|
|
|
138
|
-
def list(
|
|
136
|
+
async def list(
|
|
139
137
|
self,
|
|
140
138
|
batch_id: str,
|
|
141
139
|
*,
|
|
@@ -151,7 +149,7 @@ class AsyncMessagesResource(AsyncAPIResource):
|
|
|
151
149
|
extra_query: Query | None = None,
|
|
152
150
|
extra_body: Body | None = None,
|
|
153
151
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
154
|
-
) ->
|
|
152
|
+
) -> MessageListResponse:
|
|
155
153
|
"""
|
|
156
154
|
Get response messages for a specific batch job.
|
|
157
155
|
|
|
@@ -181,15 +179,14 @@ class AsyncMessagesResource(AsyncAPIResource):
|
|
|
181
179
|
"""
|
|
182
180
|
if not batch_id:
|
|
183
181
|
raise ValueError(f"Expected a non-empty value for `batch_id` but received {batch_id!r}")
|
|
184
|
-
return self.
|
|
182
|
+
return await self._get(
|
|
185
183
|
f"/v1/messages/batches/{batch_id}/messages",
|
|
186
|
-
page=AsyncObjectPage[Message],
|
|
187
184
|
options=make_request_options(
|
|
188
185
|
extra_headers=extra_headers,
|
|
189
186
|
extra_query=extra_query,
|
|
190
187
|
extra_body=extra_body,
|
|
191
188
|
timeout=timeout,
|
|
192
|
-
query=
|
|
189
|
+
query=await async_maybe_transform(
|
|
193
190
|
{
|
|
194
191
|
"after": after,
|
|
195
192
|
"agent_id": agent_id,
|
|
@@ -201,7 +198,7 @@ class AsyncMessagesResource(AsyncAPIResource):
|
|
|
201
198
|
message_list_params.MessageListParams,
|
|
202
199
|
),
|
|
203
200
|
),
|
|
204
|
-
|
|
201
|
+
cast_to=MessageListResponse,
|
|
205
202
|
)
|
|
206
203
|
|
|
207
204
|
|
|
@@ -28,11 +28,8 @@ from ..._response import (
|
|
|
28
28
|
)
|
|
29
29
|
from ...pagination import SyncArrayPage, AsyncArrayPage
|
|
30
30
|
from ..._base_client import AsyncPaginator, make_request_options
|
|
31
|
-
from ...types.
|
|
31
|
+
from ...types.block_response import BlockResponse
|
|
32
32
|
from ...types.block_count_response import BlockCountResponse
|
|
33
|
-
from ...types.block_create_response import BlockCreateResponse
|
|
34
|
-
from ...types.block_modify_response import BlockModifyResponse
|
|
35
|
-
from ...types.block_retrieve_response import BlockRetrieveResponse
|
|
36
33
|
|
|
37
34
|
__all__ = ["BlocksResource", "AsyncBlocksResource"]
|
|
38
35
|
|
|
@@ -85,7 +82,7 @@ class BlocksResource(SyncAPIResource):
|
|
|
85
82
|
extra_query: Query | None = None,
|
|
86
83
|
extra_body: Body | None = None,
|
|
87
84
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
88
|
-
) ->
|
|
85
|
+
) -> BlockResponse:
|
|
89
86
|
"""
|
|
90
87
|
Create Block
|
|
91
88
|
|
|
@@ -151,7 +148,7 @@ class BlocksResource(SyncAPIResource):
|
|
|
151
148
|
options=make_request_options(
|
|
152
149
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
153
150
|
),
|
|
154
|
-
cast_to=
|
|
151
|
+
cast_to=BlockResponse,
|
|
155
152
|
)
|
|
156
153
|
|
|
157
154
|
def retrieve(
|
|
@@ -164,7 +161,7 @@ class BlocksResource(SyncAPIResource):
|
|
|
164
161
|
extra_query: Query | None = None,
|
|
165
162
|
extra_body: Body | None = None,
|
|
166
163
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
167
|
-
) ->
|
|
164
|
+
) -> BlockResponse:
|
|
168
165
|
"""
|
|
169
166
|
Retrieve Block
|
|
170
167
|
|
|
@@ -186,7 +183,7 @@ class BlocksResource(SyncAPIResource):
|
|
|
186
183
|
options=make_request_options(
|
|
187
184
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
188
185
|
),
|
|
189
|
-
cast_to=
|
|
186
|
+
cast_to=BlockResponse,
|
|
190
187
|
)
|
|
191
188
|
|
|
192
189
|
def list(
|
|
@@ -215,7 +212,7 @@ class BlocksResource(SyncAPIResource):
|
|
|
215
212
|
extra_query: Query | None = None,
|
|
216
213
|
extra_body: Body | None = None,
|
|
217
214
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
218
|
-
) -> SyncArrayPage[
|
|
215
|
+
) -> SyncArrayPage[BlockResponse]:
|
|
219
216
|
"""List Blocks
|
|
220
217
|
|
|
221
218
|
Args:
|
|
@@ -273,7 +270,7 @@ class BlocksResource(SyncAPIResource):
|
|
|
273
270
|
"""
|
|
274
271
|
return self._get_api_list(
|
|
275
272
|
"/v1/blocks/",
|
|
276
|
-
page=SyncArrayPage[
|
|
273
|
+
page=SyncArrayPage[BlockResponse],
|
|
277
274
|
options=make_request_options(
|
|
278
275
|
extra_headers=extra_headers,
|
|
279
276
|
extra_query=extra_query,
|
|
@@ -302,7 +299,7 @@ class BlocksResource(SyncAPIResource):
|
|
|
302
299
|
block_list_params.BlockListParams,
|
|
303
300
|
),
|
|
304
301
|
),
|
|
305
|
-
model=
|
|
302
|
+
model=BlockResponse,
|
|
306
303
|
)
|
|
307
304
|
|
|
308
305
|
def delete(
|
|
@@ -384,7 +381,7 @@ class BlocksResource(SyncAPIResource):
|
|
|
384
381
|
extra_query: Query | None = None,
|
|
385
382
|
extra_body: Body | None = None,
|
|
386
383
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
387
|
-
) ->
|
|
384
|
+
) -> BlockResponse:
|
|
388
385
|
"""
|
|
389
386
|
Modify Block
|
|
390
387
|
|
|
@@ -456,7 +453,7 @@ class BlocksResource(SyncAPIResource):
|
|
|
456
453
|
options=make_request_options(
|
|
457
454
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
458
455
|
),
|
|
459
|
-
cast_to=
|
|
456
|
+
cast_to=BlockResponse,
|
|
460
457
|
)
|
|
461
458
|
|
|
462
459
|
|
|
@@ -508,7 +505,7 @@ class AsyncBlocksResource(AsyncAPIResource):
|
|
|
508
505
|
extra_query: Query | None = None,
|
|
509
506
|
extra_body: Body | None = None,
|
|
510
507
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
511
|
-
) ->
|
|
508
|
+
) -> BlockResponse:
|
|
512
509
|
"""
|
|
513
510
|
Create Block
|
|
514
511
|
|
|
@@ -574,7 +571,7 @@ class AsyncBlocksResource(AsyncAPIResource):
|
|
|
574
571
|
options=make_request_options(
|
|
575
572
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
576
573
|
),
|
|
577
|
-
cast_to=
|
|
574
|
+
cast_to=BlockResponse,
|
|
578
575
|
)
|
|
579
576
|
|
|
580
577
|
async def retrieve(
|
|
@@ -587,7 +584,7 @@ class AsyncBlocksResource(AsyncAPIResource):
|
|
|
587
584
|
extra_query: Query | None = None,
|
|
588
585
|
extra_body: Body | None = None,
|
|
589
586
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
590
|
-
) ->
|
|
587
|
+
) -> BlockResponse:
|
|
591
588
|
"""
|
|
592
589
|
Retrieve Block
|
|
593
590
|
|
|
@@ -609,7 +606,7 @@ class AsyncBlocksResource(AsyncAPIResource):
|
|
|
609
606
|
options=make_request_options(
|
|
610
607
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
611
608
|
),
|
|
612
|
-
cast_to=
|
|
609
|
+
cast_to=BlockResponse,
|
|
613
610
|
)
|
|
614
611
|
|
|
615
612
|
def list(
|
|
@@ -638,7 +635,7 @@ class AsyncBlocksResource(AsyncAPIResource):
|
|
|
638
635
|
extra_query: Query | None = None,
|
|
639
636
|
extra_body: Body | None = None,
|
|
640
637
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
641
|
-
) -> AsyncPaginator[
|
|
638
|
+
) -> AsyncPaginator[BlockResponse, AsyncArrayPage[BlockResponse]]:
|
|
642
639
|
"""List Blocks
|
|
643
640
|
|
|
644
641
|
Args:
|
|
@@ -696,7 +693,7 @@ class AsyncBlocksResource(AsyncAPIResource):
|
|
|
696
693
|
"""
|
|
697
694
|
return self._get_api_list(
|
|
698
695
|
"/v1/blocks/",
|
|
699
|
-
page=AsyncArrayPage[
|
|
696
|
+
page=AsyncArrayPage[BlockResponse],
|
|
700
697
|
options=make_request_options(
|
|
701
698
|
extra_headers=extra_headers,
|
|
702
699
|
extra_query=extra_query,
|
|
@@ -725,7 +722,7 @@ class AsyncBlocksResource(AsyncAPIResource):
|
|
|
725
722
|
block_list_params.BlockListParams,
|
|
726
723
|
),
|
|
727
724
|
),
|
|
728
|
-
model=
|
|
725
|
+
model=BlockResponse,
|
|
729
726
|
)
|
|
730
727
|
|
|
731
728
|
async def delete(
|
|
@@ -807,7 +804,7 @@ class AsyncBlocksResource(AsyncAPIResource):
|
|
|
807
804
|
extra_query: Query | None = None,
|
|
808
805
|
extra_body: Body | None = None,
|
|
809
806
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
810
|
-
) ->
|
|
807
|
+
) -> BlockResponse:
|
|
811
808
|
"""
|
|
812
809
|
Modify Block
|
|
813
810
|
|
|
@@ -879,7 +876,7 @@ class AsyncBlocksResource(AsyncAPIResource):
|
|
|
879
876
|
options=make_request_options(
|
|
880
877
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
881
878
|
),
|
|
882
|
-
cast_to=
|
|
879
|
+
cast_to=BlockResponse,
|
|
883
880
|
)
|
|
884
881
|
|
|
885
882
|
|
|
@@ -8,7 +8,7 @@ from typing_extensions import Literal
|
|
|
8
8
|
import httpx
|
|
9
9
|
|
|
10
10
|
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
11
|
-
from ..._utils import maybe_transform
|
|
11
|
+
from ..._utils import maybe_transform, async_maybe_transform
|
|
12
12
|
from ..._compat import cached_property
|
|
13
13
|
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
14
14
|
from ..._response import (
|
|
@@ -17,8 +17,7 @@ from ..._response import (
|
|
|
17
17
|
async_to_raw_response_wrapper,
|
|
18
18
|
async_to_streamed_response_wrapper,
|
|
19
19
|
)
|
|
20
|
-
from ...
|
|
21
|
-
from ..._base_client import AsyncPaginator, make_request_options
|
|
20
|
+
from ..._base_client import make_request_options
|
|
22
21
|
from ...types.folders import agent_list_params
|
|
23
22
|
from ...types.folders.agent_list_response import AgentListResponse
|
|
24
23
|
|
|
@@ -60,7 +59,7 @@ class AgentsResource(SyncAPIResource):
|
|
|
60
59
|
extra_query: Query | None = None,
|
|
61
60
|
extra_body: Body | None = None,
|
|
62
61
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
63
|
-
) ->
|
|
62
|
+
) -> AgentListResponse:
|
|
64
63
|
"""
|
|
65
64
|
Get all agent IDs that have the specified folder attached.
|
|
66
65
|
|
|
@@ -90,9 +89,8 @@ class AgentsResource(SyncAPIResource):
|
|
|
90
89
|
"""
|
|
91
90
|
if not folder_id:
|
|
92
91
|
raise ValueError(f"Expected a non-empty value for `folder_id` but received {folder_id!r}")
|
|
93
|
-
return self.
|
|
92
|
+
return self._get(
|
|
94
93
|
f"/v1/folders/{folder_id}/agents",
|
|
95
|
-
page=SyncArrayPage[AgentListResponse],
|
|
96
94
|
options=make_request_options(
|
|
97
95
|
extra_headers=extra_headers,
|
|
98
96
|
extra_query=extra_query,
|
|
@@ -109,7 +107,7 @@ class AgentsResource(SyncAPIResource):
|
|
|
109
107
|
agent_list_params.AgentListParams,
|
|
110
108
|
),
|
|
111
109
|
),
|
|
112
|
-
|
|
110
|
+
cast_to=AgentListResponse,
|
|
113
111
|
)
|
|
114
112
|
|
|
115
113
|
|
|
@@ -133,7 +131,7 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
133
131
|
"""
|
|
134
132
|
return AsyncAgentsResourceWithStreamingResponse(self)
|
|
135
133
|
|
|
136
|
-
def list(
|
|
134
|
+
async def list(
|
|
137
135
|
self,
|
|
138
136
|
folder_id: str,
|
|
139
137
|
*,
|
|
@@ -148,7 +146,7 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
148
146
|
extra_query: Query | None = None,
|
|
149
147
|
extra_body: Body | None = None,
|
|
150
148
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
151
|
-
) ->
|
|
149
|
+
) -> AgentListResponse:
|
|
152
150
|
"""
|
|
153
151
|
Get all agent IDs that have the specified folder attached.
|
|
154
152
|
|
|
@@ -178,15 +176,14 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
178
176
|
"""
|
|
179
177
|
if not folder_id:
|
|
180
178
|
raise ValueError(f"Expected a non-empty value for `folder_id` but received {folder_id!r}")
|
|
181
|
-
return self.
|
|
179
|
+
return await self._get(
|
|
182
180
|
f"/v1/folders/{folder_id}/agents",
|
|
183
|
-
page=AsyncArrayPage[AgentListResponse],
|
|
184
181
|
options=make_request_options(
|
|
185
182
|
extra_headers=extra_headers,
|
|
186
183
|
extra_query=extra_query,
|
|
187
184
|
extra_body=extra_body,
|
|
188
185
|
timeout=timeout,
|
|
189
|
-
query=
|
|
186
|
+
query=await async_maybe_transform(
|
|
190
187
|
{
|
|
191
188
|
"after": after,
|
|
192
189
|
"before": before,
|
|
@@ -197,7 +194,7 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
197
194
|
agent_list_params.AgentListParams,
|
|
198
195
|
),
|
|
199
196
|
),
|
|
200
|
-
|
|
197
|
+
cast_to=AgentListResponse,
|
|
201
198
|
)
|
|
202
199
|
|
|
203
200
|
|
|
@@ -17,8 +17,7 @@ from ..._response import (
|
|
|
17
17
|
async_to_raw_response_wrapper,
|
|
18
18
|
async_to_streamed_response_wrapper,
|
|
19
19
|
)
|
|
20
|
-
from ...
|
|
21
|
-
from ..._base_client import AsyncPaginator, make_request_options
|
|
20
|
+
from ..._base_client import make_request_options
|
|
22
21
|
from ...types.folders import file_list_params, file_upload_params
|
|
23
22
|
from ...types.folders.file_list_response import FileListResponse
|
|
24
23
|
from ...types.folders.file_upload_response import FileUploadResponse
|
|
@@ -62,7 +61,7 @@ class FilesResource(SyncAPIResource):
|
|
|
62
61
|
extra_query: Query | None = None,
|
|
63
62
|
extra_body: Body | None = None,
|
|
64
63
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
65
|
-
) ->
|
|
64
|
+
) -> FileListResponse:
|
|
66
65
|
"""
|
|
67
66
|
List paginated files associated with a data folder.
|
|
68
67
|
|
|
@@ -94,9 +93,8 @@ class FilesResource(SyncAPIResource):
|
|
|
94
93
|
"""
|
|
95
94
|
if not folder_id:
|
|
96
95
|
raise ValueError(f"Expected a non-empty value for `folder_id` but received {folder_id!r}")
|
|
97
|
-
return self.
|
|
96
|
+
return self._get(
|
|
98
97
|
f"/v1/folders/{folder_id}/files",
|
|
99
|
-
page=SyncArrayPage[FileListResponse],
|
|
100
98
|
options=make_request_options(
|
|
101
99
|
extra_headers=extra_headers,
|
|
102
100
|
extra_query=extra_query,
|
|
@@ -114,7 +112,7 @@ class FilesResource(SyncAPIResource):
|
|
|
114
112
|
file_list_params.FileListParams,
|
|
115
113
|
),
|
|
116
114
|
),
|
|
117
|
-
|
|
115
|
+
cast_to=FileListResponse,
|
|
118
116
|
)
|
|
119
117
|
|
|
120
118
|
def delete(
|
|
@@ -239,7 +237,7 @@ class AsyncFilesResource(AsyncAPIResource):
|
|
|
239
237
|
"""
|
|
240
238
|
return AsyncFilesResourceWithStreamingResponse(self)
|
|
241
239
|
|
|
242
|
-
def list(
|
|
240
|
+
async def list(
|
|
243
241
|
self,
|
|
244
242
|
folder_id: str,
|
|
245
243
|
*,
|
|
@@ -255,7 +253,7 @@ class AsyncFilesResource(AsyncAPIResource):
|
|
|
255
253
|
extra_query: Query | None = None,
|
|
256
254
|
extra_body: Body | None = None,
|
|
257
255
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
258
|
-
) ->
|
|
256
|
+
) -> FileListResponse:
|
|
259
257
|
"""
|
|
260
258
|
List paginated files associated with a data folder.
|
|
261
259
|
|
|
@@ -287,15 +285,14 @@ class AsyncFilesResource(AsyncAPIResource):
|
|
|
287
285
|
"""
|
|
288
286
|
if not folder_id:
|
|
289
287
|
raise ValueError(f"Expected a non-empty value for `folder_id` but received {folder_id!r}")
|
|
290
|
-
return self.
|
|
288
|
+
return await self._get(
|
|
291
289
|
f"/v1/folders/{folder_id}/files",
|
|
292
|
-
page=AsyncArrayPage[FileListResponse],
|
|
293
290
|
options=make_request_options(
|
|
294
291
|
extra_headers=extra_headers,
|
|
295
292
|
extra_query=extra_query,
|
|
296
293
|
extra_body=extra_body,
|
|
297
294
|
timeout=timeout,
|
|
298
|
-
query=
|
|
295
|
+
query=await async_maybe_transform(
|
|
299
296
|
{
|
|
300
297
|
"after": after,
|
|
301
298
|
"before": before,
|
|
@@ -307,7 +304,7 @@ class AsyncFilesResource(AsyncAPIResource):
|
|
|
307
304
|
file_list_params.FileListParams,
|
|
308
305
|
),
|
|
309
306
|
),
|
|
310
|
-
|
|
307
|
+
cast_to=FileListResponse,
|
|
311
308
|
)
|
|
312
309
|
|
|
313
310
|
async def delete(
|
|
@@ -34,9 +34,9 @@ from ..._response import (
|
|
|
34
34
|
async_to_raw_response_wrapper,
|
|
35
35
|
async_to_streamed_response_wrapper,
|
|
36
36
|
)
|
|
37
|
-
from ...
|
|
38
|
-
from ..._base_client import AsyncPaginator, make_request_options
|
|
37
|
+
from ..._base_client import make_request_options
|
|
39
38
|
from ...types.folder import Folder
|
|
39
|
+
from ...types.folder_list_response import FolderListResponse
|
|
40
40
|
from ...types.folder_count_response import FolderCountResponse
|
|
41
41
|
from ...types.embedding_config_param import EmbeddingConfigParam
|
|
42
42
|
|
|
@@ -184,7 +184,7 @@ class FoldersResource(SyncAPIResource):
|
|
|
184
184
|
extra_query: Query | None = None,
|
|
185
185
|
extra_body: Body | None = None,
|
|
186
186
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
187
|
-
) ->
|
|
187
|
+
) -> FolderListResponse:
|
|
188
188
|
"""
|
|
189
189
|
List all data folders created by a user.
|
|
190
190
|
|
|
@@ -212,9 +212,8 @@ class FoldersResource(SyncAPIResource):
|
|
|
212
212
|
|
|
213
213
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
214
214
|
"""
|
|
215
|
-
return self.
|
|
215
|
+
return self._get(
|
|
216
216
|
"/v1/folders/",
|
|
217
|
-
page=SyncArrayPage[Folder],
|
|
218
217
|
options=make_request_options(
|
|
219
218
|
extra_headers=extra_headers,
|
|
220
219
|
extra_query=extra_query,
|
|
@@ -232,7 +231,7 @@ class FoldersResource(SyncAPIResource):
|
|
|
232
231
|
folder_list_params.FolderListParams,
|
|
233
232
|
),
|
|
234
233
|
),
|
|
235
|
-
|
|
234
|
+
cast_to=FolderListResponse,
|
|
236
235
|
)
|
|
237
236
|
|
|
238
237
|
def delete(
|
|
@@ -476,7 +475,7 @@ class AsyncFoldersResource(AsyncAPIResource):
|
|
|
476
475
|
cast_to=Folder,
|
|
477
476
|
)
|
|
478
477
|
|
|
479
|
-
def list(
|
|
478
|
+
async def list(
|
|
480
479
|
self,
|
|
481
480
|
*,
|
|
482
481
|
after: Optional[str] | Omit = omit,
|
|
@@ -491,7 +490,7 @@ class AsyncFoldersResource(AsyncAPIResource):
|
|
|
491
490
|
extra_query: Query | None = None,
|
|
492
491
|
extra_body: Body | None = None,
|
|
493
492
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
494
|
-
) ->
|
|
493
|
+
) -> FolderListResponse:
|
|
495
494
|
"""
|
|
496
495
|
List all data folders created by a user.
|
|
497
496
|
|
|
@@ -519,15 +518,14 @@ class AsyncFoldersResource(AsyncAPIResource):
|
|
|
519
518
|
|
|
520
519
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
521
520
|
"""
|
|
522
|
-
return self.
|
|
521
|
+
return await self._get(
|
|
523
522
|
"/v1/folders/",
|
|
524
|
-
page=AsyncArrayPage[Folder],
|
|
525
523
|
options=make_request_options(
|
|
526
524
|
extra_headers=extra_headers,
|
|
527
525
|
extra_query=extra_query,
|
|
528
526
|
extra_body=extra_body,
|
|
529
527
|
timeout=timeout,
|
|
530
|
-
query=
|
|
528
|
+
query=await async_maybe_transform(
|
|
531
529
|
{
|
|
532
530
|
"after": after,
|
|
533
531
|
"before": before,
|
|
@@ -539,7 +537,7 @@ class AsyncFoldersResource(AsyncAPIResource):
|
|
|
539
537
|
folder_list_params.FolderListParams,
|
|
540
538
|
),
|
|
541
539
|
),
|
|
542
|
-
|
|
540
|
+
cast_to=FolderListResponse,
|
|
543
541
|
)
|
|
544
542
|
|
|
545
543
|
async def delete(
|
|
@@ -20,7 +20,7 @@ from ..._response import (
|
|
|
20
20
|
from ...pagination import SyncArrayPage, AsyncArrayPage
|
|
21
21
|
from ..._base_client import AsyncPaginator, make_request_options
|
|
22
22
|
from ...types.identities import block_list_params
|
|
23
|
-
from ...types.
|
|
23
|
+
from ...types.block_response import BlockResponse
|
|
24
24
|
|
|
25
25
|
__all__ = ["BlocksResource", "AsyncBlocksResource"]
|
|
26
26
|
|
|
@@ -60,7 +60,7 @@ class BlocksResource(SyncAPIResource):
|
|
|
60
60
|
extra_query: Query | None = None,
|
|
61
61
|
extra_body: Body | None = None,
|
|
62
62
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
63
|
-
) -> SyncArrayPage[
|
|
63
|
+
) -> SyncArrayPage[BlockResponse]:
|
|
64
64
|
"""
|
|
65
65
|
Get all blocks associated with the specified identity.
|
|
66
66
|
|
|
@@ -92,7 +92,7 @@ class BlocksResource(SyncAPIResource):
|
|
|
92
92
|
raise ValueError(f"Expected a non-empty value for `identity_id` but received {identity_id!r}")
|
|
93
93
|
return self._get_api_list(
|
|
94
94
|
f"/v1/identities/{identity_id}/blocks",
|
|
95
|
-
page=SyncArrayPage[
|
|
95
|
+
page=SyncArrayPage[BlockResponse],
|
|
96
96
|
options=make_request_options(
|
|
97
97
|
extra_headers=extra_headers,
|
|
98
98
|
extra_query=extra_query,
|
|
@@ -109,7 +109,7 @@ class BlocksResource(SyncAPIResource):
|
|
|
109
109
|
block_list_params.BlockListParams,
|
|
110
110
|
),
|
|
111
111
|
),
|
|
112
|
-
model=
|
|
112
|
+
model=BlockResponse,
|
|
113
113
|
)
|
|
114
114
|
|
|
115
115
|
|
|
@@ -148,7 +148,7 @@ class AsyncBlocksResource(AsyncAPIResource):
|
|
|
148
148
|
extra_query: Query | None = None,
|
|
149
149
|
extra_body: Body | None = None,
|
|
150
150
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
151
|
-
) -> AsyncPaginator[
|
|
151
|
+
) -> AsyncPaginator[BlockResponse, AsyncArrayPage[BlockResponse]]:
|
|
152
152
|
"""
|
|
153
153
|
Get all blocks associated with the specified identity.
|
|
154
154
|
|
|
@@ -180,7 +180,7 @@ class AsyncBlocksResource(AsyncAPIResource):
|
|
|
180
180
|
raise ValueError(f"Expected a non-empty value for `identity_id` but received {identity_id!r}")
|
|
181
181
|
return self._get_api_list(
|
|
182
182
|
f"/v1/identities/{identity_id}/blocks",
|
|
183
|
-
page=AsyncArrayPage[
|
|
183
|
+
page=AsyncArrayPage[BlockResponse],
|
|
184
184
|
options=make_request_options(
|
|
185
185
|
extra_headers=extra_headers,
|
|
186
186
|
extra_query=extra_query,
|
|
@@ -197,7 +197,7 @@ class AsyncBlocksResource(AsyncAPIResource):
|
|
|
197
197
|
block_list_params.BlockListParams,
|
|
198
198
|
),
|
|
199
199
|
),
|
|
200
|
-
model=
|
|
200
|
+
model=BlockResponse,
|
|
201
201
|
)
|
|
202
202
|
|
|
203
203
|
|