letta-client 0.1.142__py3-none-any.whl → 0.1.144__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/__init__.py +4 -0
- letta_client/agents/blocks/client.py +10 -0
- letta_client/base_client.py +4 -0
- letta_client/blocks/client.py +30 -0
- letta_client/core/client_wrapper.py +1 -1
- letta_client/telemetry/__init__.py +2 -0
- letta_client/telemetry/client.py +143 -0
- letta_client/types/__init__.py +2 -0
- letta_client/types/block.py +5 -0
- letta_client/types/block_update.py +5 -0
- letta_client/types/create_block.py +5 -0
- letta_client/types/provider_trace.py +70 -0
- {letta_client-0.1.142.dist-info → letta_client-0.1.144.dist-info}/METADATA +1 -1
- {letta_client-0.1.142.dist-info → letta_client-0.1.144.dist-info}/RECORD +15 -12
- {letta_client-0.1.142.dist-info → letta_client-0.1.144.dist-info}/WHEEL +0 -0
letta_client/__init__.py
CHANGED
|
@@ -161,6 +161,7 @@ from .types import (
|
|
|
161
161
|
PipRequirement,
|
|
162
162
|
Provider,
|
|
163
163
|
ProviderCategory,
|
|
164
|
+
ProviderTrace,
|
|
164
165
|
ProviderType,
|
|
165
166
|
ReasoningContent,
|
|
166
167
|
ReasoningMessage,
|
|
@@ -259,6 +260,7 @@ from . import (
|
|
|
259
260
|
sources,
|
|
260
261
|
steps,
|
|
261
262
|
tags,
|
|
263
|
+
telemetry,
|
|
262
264
|
templates,
|
|
263
265
|
tools,
|
|
264
266
|
voice,
|
|
@@ -491,6 +493,7 @@ __all__ = [
|
|
|
491
493
|
"ProjectsListResponseProjectsItem",
|
|
492
494
|
"Provider",
|
|
493
495
|
"ProviderCategory",
|
|
496
|
+
"ProviderTrace",
|
|
494
497
|
"ProviderType",
|
|
495
498
|
"ReasoningContent",
|
|
496
499
|
"ReasoningMessage",
|
|
@@ -585,6 +588,7 @@ __all__ = [
|
|
|
585
588
|
"sources",
|
|
586
589
|
"steps",
|
|
587
590
|
"tags",
|
|
591
|
+
"telemetry",
|
|
588
592
|
"templates",
|
|
589
593
|
"tools",
|
|
590
594
|
"voice",
|
|
@@ -92,6 +92,7 @@ class BlocksClient:
|
|
|
92
92
|
name: typing.Optional[str] = OMIT,
|
|
93
93
|
is_template: typing.Optional[bool] = OMIT,
|
|
94
94
|
label: typing.Optional[str] = OMIT,
|
|
95
|
+
read_only: typing.Optional[bool] = OMIT,
|
|
95
96
|
description: typing.Optional[str] = OMIT,
|
|
96
97
|
metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
97
98
|
request_options: typing.Optional[RequestOptions] = None,
|
|
@@ -120,6 +121,9 @@ class BlocksClient:
|
|
|
120
121
|
label : typing.Optional[str]
|
|
121
122
|
Label of the block (e.g. 'human', 'persona') in the context window.
|
|
122
123
|
|
|
124
|
+
read_only : typing.Optional[bool]
|
|
125
|
+
Whether the agent has read-only access to the block.
|
|
126
|
+
|
|
123
127
|
description : typing.Optional[str]
|
|
124
128
|
Description of the block.
|
|
125
129
|
|
|
@@ -155,6 +159,7 @@ class BlocksClient:
|
|
|
155
159
|
"name": name,
|
|
156
160
|
"is_template": is_template,
|
|
157
161
|
"label": label,
|
|
162
|
+
"read_only": read_only,
|
|
158
163
|
"description": description,
|
|
159
164
|
"metadata": metadata,
|
|
160
165
|
},
|
|
@@ -447,6 +452,7 @@ class AsyncBlocksClient:
|
|
|
447
452
|
name: typing.Optional[str] = OMIT,
|
|
448
453
|
is_template: typing.Optional[bool] = OMIT,
|
|
449
454
|
label: typing.Optional[str] = OMIT,
|
|
455
|
+
read_only: typing.Optional[bool] = OMIT,
|
|
450
456
|
description: typing.Optional[str] = OMIT,
|
|
451
457
|
metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
452
458
|
request_options: typing.Optional[RequestOptions] = None,
|
|
@@ -475,6 +481,9 @@ class AsyncBlocksClient:
|
|
|
475
481
|
label : typing.Optional[str]
|
|
476
482
|
Label of the block (e.g. 'human', 'persona') in the context window.
|
|
477
483
|
|
|
484
|
+
read_only : typing.Optional[bool]
|
|
485
|
+
Whether the agent has read-only access to the block.
|
|
486
|
+
|
|
478
487
|
description : typing.Optional[str]
|
|
479
488
|
Description of the block.
|
|
480
489
|
|
|
@@ -518,6 +527,7 @@ class AsyncBlocksClient:
|
|
|
518
527
|
"name": name,
|
|
519
528
|
"is_template": is_template,
|
|
520
529
|
"label": label,
|
|
530
|
+
"read_only": read_only,
|
|
521
531
|
"description": description,
|
|
522
532
|
"metadata": metadata,
|
|
523
533
|
},
|
letta_client/base_client.py
CHANGED
|
@@ -18,6 +18,7 @@ from .providers.client import ProvidersClient
|
|
|
18
18
|
from .runs.client import RunsClient
|
|
19
19
|
from .steps.client import StepsClient
|
|
20
20
|
from .tags.client import TagsClient
|
|
21
|
+
from .telemetry.client import TelemetryClient
|
|
21
22
|
from .batches.client import BatchesClient
|
|
22
23
|
from .messages.client import MessagesClient
|
|
23
24
|
from .voice.client import VoiceClient
|
|
@@ -39,6 +40,7 @@ from .providers.client import AsyncProvidersClient
|
|
|
39
40
|
from .runs.client import AsyncRunsClient
|
|
40
41
|
from .steps.client import AsyncStepsClient
|
|
41
42
|
from .tags.client import AsyncTagsClient
|
|
43
|
+
from .telemetry.client import AsyncTelemetryClient
|
|
42
44
|
from .batches.client import AsyncBatchesClient
|
|
43
45
|
from .messages.client import AsyncMessagesClient
|
|
44
46
|
from .voice.client import AsyncVoiceClient
|
|
@@ -119,6 +121,7 @@ class LettaBase:
|
|
|
119
121
|
self.runs = RunsClient(client_wrapper=self._client_wrapper)
|
|
120
122
|
self.steps = StepsClient(client_wrapper=self._client_wrapper)
|
|
121
123
|
self.tags = TagsClient(client_wrapper=self._client_wrapper)
|
|
124
|
+
self.telemetry = TelemetryClient(client_wrapper=self._client_wrapper)
|
|
122
125
|
self.batches = BatchesClient(client_wrapper=self._client_wrapper)
|
|
123
126
|
self.messages = MessagesClient(client_wrapper=self._client_wrapper)
|
|
124
127
|
self.voice = VoiceClient(client_wrapper=self._client_wrapper)
|
|
@@ -199,6 +202,7 @@ class AsyncLettaBase:
|
|
|
199
202
|
self.runs = AsyncRunsClient(client_wrapper=self._client_wrapper)
|
|
200
203
|
self.steps = AsyncStepsClient(client_wrapper=self._client_wrapper)
|
|
201
204
|
self.tags = AsyncTagsClient(client_wrapper=self._client_wrapper)
|
|
205
|
+
self.telemetry = AsyncTelemetryClient(client_wrapper=self._client_wrapper)
|
|
202
206
|
self.batches = AsyncBatchesClient(client_wrapper=self._client_wrapper)
|
|
203
207
|
self.messages = AsyncMessagesClient(client_wrapper=self._client_wrapper)
|
|
204
208
|
self.voice = AsyncVoiceClient(client_wrapper=self._client_wrapper)
|
letta_client/blocks/client.py
CHANGED
|
@@ -31,6 +31,7 @@ class BlocksClient:
|
|
|
31
31
|
name: typing.Optional[str] = None,
|
|
32
32
|
identity_id: typing.Optional[str] = None,
|
|
33
33
|
identifier_keys: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
|
|
34
|
+
limit: typing.Optional[int] = None,
|
|
34
35
|
request_options: typing.Optional[RequestOptions] = None,
|
|
35
36
|
) -> typing.List[Block]:
|
|
36
37
|
"""
|
|
@@ -51,6 +52,9 @@ class BlocksClient:
|
|
|
51
52
|
identifier_keys : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
52
53
|
Search agents by identifier keys
|
|
53
54
|
|
|
55
|
+
limit : typing.Optional[int]
|
|
56
|
+
Number of blocks to return
|
|
57
|
+
|
|
54
58
|
request_options : typing.Optional[RequestOptions]
|
|
55
59
|
Request-specific configuration.
|
|
56
60
|
|
|
@@ -77,6 +81,7 @@ class BlocksClient:
|
|
|
77
81
|
"name": name,
|
|
78
82
|
"identity_id": identity_id,
|
|
79
83
|
"identifier_keys": identifier_keys,
|
|
84
|
+
"limit": limit,
|
|
80
85
|
},
|
|
81
86
|
request_options=request_options,
|
|
82
87
|
)
|
|
@@ -112,6 +117,7 @@ class BlocksClient:
|
|
|
112
117
|
limit: typing.Optional[int] = OMIT,
|
|
113
118
|
name: typing.Optional[str] = OMIT,
|
|
114
119
|
is_template: typing.Optional[bool] = OMIT,
|
|
120
|
+
read_only: typing.Optional[bool] = OMIT,
|
|
115
121
|
description: typing.Optional[str] = OMIT,
|
|
116
122
|
metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
117
123
|
request_options: typing.Optional[RequestOptions] = None,
|
|
@@ -133,6 +139,9 @@ class BlocksClient:
|
|
|
133
139
|
|
|
134
140
|
is_template : typing.Optional[bool]
|
|
135
141
|
|
|
142
|
+
read_only : typing.Optional[bool]
|
|
143
|
+
Whether the agent has read-only access to the block.
|
|
144
|
+
|
|
136
145
|
description : typing.Optional[str]
|
|
137
146
|
Description of the block.
|
|
138
147
|
|
|
@@ -168,6 +177,7 @@ class BlocksClient:
|
|
|
168
177
|
"name": name,
|
|
169
178
|
"is_template": is_template,
|
|
170
179
|
"label": label,
|
|
180
|
+
"read_only": read_only,
|
|
171
181
|
"description": description,
|
|
172
182
|
"metadata": metadata,
|
|
173
183
|
},
|
|
@@ -367,6 +377,7 @@ class BlocksClient:
|
|
|
367
377
|
name: typing.Optional[str] = OMIT,
|
|
368
378
|
is_template: typing.Optional[bool] = OMIT,
|
|
369
379
|
label: typing.Optional[str] = OMIT,
|
|
380
|
+
read_only: typing.Optional[bool] = OMIT,
|
|
370
381
|
description: typing.Optional[str] = OMIT,
|
|
371
382
|
metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
372
383
|
request_options: typing.Optional[RequestOptions] = None,
|
|
@@ -391,6 +402,9 @@ class BlocksClient:
|
|
|
391
402
|
label : typing.Optional[str]
|
|
392
403
|
Label of the block (e.g. 'human', 'persona') in the context window.
|
|
393
404
|
|
|
405
|
+
read_only : typing.Optional[bool]
|
|
406
|
+
Whether the agent has read-only access to the block.
|
|
407
|
+
|
|
394
408
|
description : typing.Optional[str]
|
|
395
409
|
Description of the block.
|
|
396
410
|
|
|
@@ -425,6 +439,7 @@ class BlocksClient:
|
|
|
425
439
|
"name": name,
|
|
426
440
|
"is_template": is_template,
|
|
427
441
|
"label": label,
|
|
442
|
+
"read_only": read_only,
|
|
428
443
|
"description": description,
|
|
429
444
|
"metadata": metadata,
|
|
430
445
|
},
|
|
@@ -469,6 +484,7 @@ class AsyncBlocksClient:
|
|
|
469
484
|
name: typing.Optional[str] = None,
|
|
470
485
|
identity_id: typing.Optional[str] = None,
|
|
471
486
|
identifier_keys: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
|
|
487
|
+
limit: typing.Optional[int] = None,
|
|
472
488
|
request_options: typing.Optional[RequestOptions] = None,
|
|
473
489
|
) -> typing.List[Block]:
|
|
474
490
|
"""
|
|
@@ -489,6 +505,9 @@ class AsyncBlocksClient:
|
|
|
489
505
|
identifier_keys : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
490
506
|
Search agents by identifier keys
|
|
491
507
|
|
|
508
|
+
limit : typing.Optional[int]
|
|
509
|
+
Number of blocks to return
|
|
510
|
+
|
|
492
511
|
request_options : typing.Optional[RequestOptions]
|
|
493
512
|
Request-specific configuration.
|
|
494
513
|
|
|
@@ -523,6 +542,7 @@ class AsyncBlocksClient:
|
|
|
523
542
|
"name": name,
|
|
524
543
|
"identity_id": identity_id,
|
|
525
544
|
"identifier_keys": identifier_keys,
|
|
545
|
+
"limit": limit,
|
|
526
546
|
},
|
|
527
547
|
request_options=request_options,
|
|
528
548
|
)
|
|
@@ -558,6 +578,7 @@ class AsyncBlocksClient:
|
|
|
558
578
|
limit: typing.Optional[int] = OMIT,
|
|
559
579
|
name: typing.Optional[str] = OMIT,
|
|
560
580
|
is_template: typing.Optional[bool] = OMIT,
|
|
581
|
+
read_only: typing.Optional[bool] = OMIT,
|
|
561
582
|
description: typing.Optional[str] = OMIT,
|
|
562
583
|
metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
563
584
|
request_options: typing.Optional[RequestOptions] = None,
|
|
@@ -579,6 +600,9 @@ class AsyncBlocksClient:
|
|
|
579
600
|
|
|
580
601
|
is_template : typing.Optional[bool]
|
|
581
602
|
|
|
603
|
+
read_only : typing.Optional[bool]
|
|
604
|
+
Whether the agent has read-only access to the block.
|
|
605
|
+
|
|
582
606
|
description : typing.Optional[str]
|
|
583
607
|
Description of the block.
|
|
584
608
|
|
|
@@ -622,6 +646,7 @@ class AsyncBlocksClient:
|
|
|
622
646
|
"name": name,
|
|
623
647
|
"is_template": is_template,
|
|
624
648
|
"label": label,
|
|
649
|
+
"read_only": read_only,
|
|
625
650
|
"description": description,
|
|
626
651
|
"metadata": metadata,
|
|
627
652
|
},
|
|
@@ -845,6 +870,7 @@ class AsyncBlocksClient:
|
|
|
845
870
|
name: typing.Optional[str] = OMIT,
|
|
846
871
|
is_template: typing.Optional[bool] = OMIT,
|
|
847
872
|
label: typing.Optional[str] = OMIT,
|
|
873
|
+
read_only: typing.Optional[bool] = OMIT,
|
|
848
874
|
description: typing.Optional[str] = OMIT,
|
|
849
875
|
metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
850
876
|
request_options: typing.Optional[RequestOptions] = None,
|
|
@@ -869,6 +895,9 @@ class AsyncBlocksClient:
|
|
|
869
895
|
label : typing.Optional[str]
|
|
870
896
|
Label of the block (e.g. 'human', 'persona') in the context window.
|
|
871
897
|
|
|
898
|
+
read_only : typing.Optional[bool]
|
|
899
|
+
Whether the agent has read-only access to the block.
|
|
900
|
+
|
|
872
901
|
description : typing.Optional[str]
|
|
873
902
|
Description of the block.
|
|
874
903
|
|
|
@@ -911,6 +940,7 @@ class AsyncBlocksClient:
|
|
|
911
940
|
"name": name,
|
|
912
941
|
"is_template": is_template,
|
|
913
942
|
"label": label,
|
|
943
|
+
"read_only": read_only,
|
|
914
944
|
"description": description,
|
|
915
945
|
"metadata": metadata,
|
|
916
946
|
},
|
|
@@ -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": "letta-client",
|
|
19
|
-
"X-Fern-SDK-Version": "0.1.
|
|
19
|
+
"X-Fern-SDK-Version": "0.1.144",
|
|
20
20
|
}
|
|
21
21
|
if self.token is not None:
|
|
22
22
|
headers["Authorization"] = f"Bearer {self.token}"
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ..core.client_wrapper import SyncClientWrapper
|
|
4
|
+
import typing
|
|
5
|
+
from ..core.request_options import RequestOptions
|
|
6
|
+
from ..types.provider_trace import ProviderTrace
|
|
7
|
+
from ..core.jsonable_encoder import jsonable_encoder
|
|
8
|
+
from ..core.unchecked_base_model import construct_type
|
|
9
|
+
from ..errors.unprocessable_entity_error import UnprocessableEntityError
|
|
10
|
+
from ..types.http_validation_error import HttpValidationError
|
|
11
|
+
from json.decoder import JSONDecodeError
|
|
12
|
+
from ..core.api_error import ApiError
|
|
13
|
+
from ..core.client_wrapper import AsyncClientWrapper
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class TelemetryClient:
|
|
17
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
18
|
+
self._client_wrapper = client_wrapper
|
|
19
|
+
|
|
20
|
+
def retrieve_provider_trace(
|
|
21
|
+
self, step_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
22
|
+
) -> ProviderTrace:
|
|
23
|
+
"""
|
|
24
|
+
Parameters
|
|
25
|
+
----------
|
|
26
|
+
step_id : str
|
|
27
|
+
|
|
28
|
+
request_options : typing.Optional[RequestOptions]
|
|
29
|
+
Request-specific configuration.
|
|
30
|
+
|
|
31
|
+
Returns
|
|
32
|
+
-------
|
|
33
|
+
ProviderTrace
|
|
34
|
+
Successful Response
|
|
35
|
+
|
|
36
|
+
Examples
|
|
37
|
+
--------
|
|
38
|
+
from letta_client import Letta
|
|
39
|
+
|
|
40
|
+
client = Letta(
|
|
41
|
+
token="YOUR_TOKEN",
|
|
42
|
+
)
|
|
43
|
+
client.telemetry.retrieve_provider_trace(
|
|
44
|
+
step_id="step_id",
|
|
45
|
+
)
|
|
46
|
+
"""
|
|
47
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
48
|
+
f"v1/telemetry/{jsonable_encoder(step_id)}",
|
|
49
|
+
method="GET",
|
|
50
|
+
request_options=request_options,
|
|
51
|
+
)
|
|
52
|
+
try:
|
|
53
|
+
if 200 <= _response.status_code < 300:
|
|
54
|
+
return typing.cast(
|
|
55
|
+
ProviderTrace,
|
|
56
|
+
construct_type(
|
|
57
|
+
type_=ProviderTrace, # type: ignore
|
|
58
|
+
object_=_response.json(),
|
|
59
|
+
),
|
|
60
|
+
)
|
|
61
|
+
if _response.status_code == 422:
|
|
62
|
+
raise UnprocessableEntityError(
|
|
63
|
+
typing.cast(
|
|
64
|
+
HttpValidationError,
|
|
65
|
+
construct_type(
|
|
66
|
+
type_=HttpValidationError, # type: ignore
|
|
67
|
+
object_=_response.json(),
|
|
68
|
+
),
|
|
69
|
+
)
|
|
70
|
+
)
|
|
71
|
+
_response_json = _response.json()
|
|
72
|
+
except JSONDecodeError:
|
|
73
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
74
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
class AsyncTelemetryClient:
|
|
78
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
79
|
+
self._client_wrapper = client_wrapper
|
|
80
|
+
|
|
81
|
+
async def retrieve_provider_trace(
|
|
82
|
+
self, step_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
83
|
+
) -> ProviderTrace:
|
|
84
|
+
"""
|
|
85
|
+
Parameters
|
|
86
|
+
----------
|
|
87
|
+
step_id : str
|
|
88
|
+
|
|
89
|
+
request_options : typing.Optional[RequestOptions]
|
|
90
|
+
Request-specific configuration.
|
|
91
|
+
|
|
92
|
+
Returns
|
|
93
|
+
-------
|
|
94
|
+
ProviderTrace
|
|
95
|
+
Successful Response
|
|
96
|
+
|
|
97
|
+
Examples
|
|
98
|
+
--------
|
|
99
|
+
import asyncio
|
|
100
|
+
|
|
101
|
+
from letta_client import AsyncLetta
|
|
102
|
+
|
|
103
|
+
client = AsyncLetta(
|
|
104
|
+
token="YOUR_TOKEN",
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
async def main() -> None:
|
|
109
|
+
await client.telemetry.retrieve_provider_trace(
|
|
110
|
+
step_id="step_id",
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
asyncio.run(main())
|
|
115
|
+
"""
|
|
116
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
117
|
+
f"v1/telemetry/{jsonable_encoder(step_id)}",
|
|
118
|
+
method="GET",
|
|
119
|
+
request_options=request_options,
|
|
120
|
+
)
|
|
121
|
+
try:
|
|
122
|
+
if 200 <= _response.status_code < 300:
|
|
123
|
+
return typing.cast(
|
|
124
|
+
ProviderTrace,
|
|
125
|
+
construct_type(
|
|
126
|
+
type_=ProviderTrace, # type: ignore
|
|
127
|
+
object_=_response.json(),
|
|
128
|
+
),
|
|
129
|
+
)
|
|
130
|
+
if _response.status_code == 422:
|
|
131
|
+
raise UnprocessableEntityError(
|
|
132
|
+
typing.cast(
|
|
133
|
+
HttpValidationError,
|
|
134
|
+
construct_type(
|
|
135
|
+
type_=HttpValidationError, # type: ignore
|
|
136
|
+
object_=_response.json(),
|
|
137
|
+
),
|
|
138
|
+
)
|
|
139
|
+
)
|
|
140
|
+
_response_json = _response.json()
|
|
141
|
+
except JSONDecodeError:
|
|
142
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
143
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
letta_client/types/__init__.py
CHANGED
|
@@ -164,6 +164,7 @@ from .payment_required_error_body import PaymentRequiredErrorBody
|
|
|
164
164
|
from .pip_requirement import PipRequirement
|
|
165
165
|
from .provider import Provider
|
|
166
166
|
from .provider_category import ProviderCategory
|
|
167
|
+
from .provider_trace import ProviderTrace
|
|
167
168
|
from .provider_type import ProviderType
|
|
168
169
|
from .reasoning_content import ReasoningContent
|
|
169
170
|
from .reasoning_message import ReasoningMessage
|
|
@@ -397,6 +398,7 @@ __all__ = [
|
|
|
397
398
|
"PipRequirement",
|
|
398
399
|
"Provider",
|
|
399
400
|
"ProviderCategory",
|
|
401
|
+
"ProviderTrace",
|
|
400
402
|
"ProviderType",
|
|
401
403
|
"ReasoningContent",
|
|
402
404
|
"ReasoningMessage",
|
letta_client/types/block.py
CHANGED
|
@@ -47,6 +47,11 @@ class Block(UncheckedBaseModel):
|
|
|
47
47
|
Label of the block (e.g. 'human', 'persona') in the context window.
|
|
48
48
|
"""
|
|
49
49
|
|
|
50
|
+
read_only: typing.Optional[bool] = pydantic.Field(default=None)
|
|
51
|
+
"""
|
|
52
|
+
Whether the agent has read-only access to the block.
|
|
53
|
+
"""
|
|
54
|
+
|
|
50
55
|
description: typing.Optional[str] = pydantic.Field(default=None)
|
|
51
56
|
"""
|
|
52
57
|
Description of the block.
|
|
@@ -36,6 +36,11 @@ class BlockUpdate(UncheckedBaseModel):
|
|
|
36
36
|
Label of the block (e.g. 'human', 'persona') in the context window.
|
|
37
37
|
"""
|
|
38
38
|
|
|
39
|
+
read_only: typing.Optional[bool] = pydantic.Field(default=None)
|
|
40
|
+
"""
|
|
41
|
+
Whether the agent has read-only access to the block.
|
|
42
|
+
"""
|
|
43
|
+
|
|
39
44
|
description: typing.Optional[str] = pydantic.Field(default=None)
|
|
40
45
|
"""
|
|
41
46
|
Description of the block.
|
|
@@ -32,6 +32,11 @@ class CreateBlock(UncheckedBaseModel):
|
|
|
32
32
|
Label of the block.
|
|
33
33
|
"""
|
|
34
34
|
|
|
35
|
+
read_only: typing.Optional[bool] = pydantic.Field(default=None)
|
|
36
|
+
"""
|
|
37
|
+
Whether the agent has read-only access to the block.
|
|
38
|
+
"""
|
|
39
|
+
|
|
35
40
|
description: typing.Optional[str] = pydantic.Field(default=None)
|
|
36
41
|
"""
|
|
37
42
|
Description of the block.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
4
|
+
import typing
|
|
5
|
+
import pydantic
|
|
6
|
+
import datetime as dt
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ProviderTrace(UncheckedBaseModel):
|
|
11
|
+
"""
|
|
12
|
+
Letta's internal representation of a provider trace.
|
|
13
|
+
|
|
14
|
+
Attributes:
|
|
15
|
+
id (str): The unique identifier of the provider trace.
|
|
16
|
+
request_json (Dict[str, Any]): JSON content of the provider request.
|
|
17
|
+
response_json (Dict[str, Any]): JSON content of the provider response.
|
|
18
|
+
step_id (str): ID of the step that this trace is associated with.
|
|
19
|
+
organization_id (str): The unique identifier of the organization.
|
|
20
|
+
created_at (datetime): The timestamp when the object was created.
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
created_by_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
24
|
+
"""
|
|
25
|
+
The id of the user that made this object.
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
last_updated_by_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
29
|
+
"""
|
|
30
|
+
The id of the user that made this object.
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
|
|
34
|
+
"""
|
|
35
|
+
The timestamp when the object was created.
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
updated_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
|
|
39
|
+
"""
|
|
40
|
+
The timestamp when the object was last updated.
|
|
41
|
+
"""
|
|
42
|
+
|
|
43
|
+
id: typing.Optional[str] = pydantic.Field(default=None)
|
|
44
|
+
"""
|
|
45
|
+
The human-friendly ID of the Provider_trace
|
|
46
|
+
"""
|
|
47
|
+
|
|
48
|
+
request_json: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field()
|
|
49
|
+
"""
|
|
50
|
+
JSON content of the provider request
|
|
51
|
+
"""
|
|
52
|
+
|
|
53
|
+
response_json: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field()
|
|
54
|
+
"""
|
|
55
|
+
JSON content of the provider response
|
|
56
|
+
"""
|
|
57
|
+
|
|
58
|
+
step_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
59
|
+
"""
|
|
60
|
+
ID of the step that this trace is associated with
|
|
61
|
+
"""
|
|
62
|
+
|
|
63
|
+
if IS_PYDANTIC_V2:
|
|
64
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
65
|
+
else:
|
|
66
|
+
|
|
67
|
+
class Config:
|
|
68
|
+
frozen = True
|
|
69
|
+
smart_union = True
|
|
70
|
+
extra = pydantic.Extra.allow
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
letta_client/__init__.py,sha256=
|
|
1
|
+
letta_client/__init__.py,sha256=cC7toheUYvpp_2EGyQLtyGOtDBwTRd8nXqK_-IMHWrE,16862
|
|
2
2
|
letta_client/agents/__init__.py,sha256=3oFWVxaaxkphkjGJVk31Llb9ll9dKoCGx3B_r3qqtes,1716
|
|
3
3
|
letta_client/agents/blocks/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
4
|
-
letta_client/agents/blocks/client.py,sha256=
|
|
4
|
+
letta_client/agents/blocks/client.py,sha256=Rw_iTFJKph1s7ul6nhydZBvc7PeTCTYqy4pB-ZiP6Zk,24216
|
|
5
5
|
letta_client/agents/client.py,sha256=P-uXumCID_I0VVA9ydc_cI5-V2xDkgXe7AhxplgewuI,79926
|
|
6
6
|
letta_client/agents/context/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
7
7
|
letta_client/agents/context/client.py,sha256=GKKvoG4N_K8Biz9yDjeIHpFG0C8Cwc7tHmEX3pTL_9U,4815
|
|
@@ -43,13 +43,13 @@ letta_client/agents/types/create_agent_request_response_format.py,sha256=1GUV3rF
|
|
|
43
43
|
letta_client/agents/types/create_agent_request_tool_rules_item.py,sha256=L3FNsFTG9kVmuPbQhbCKNg3H2E5bB2Rgp92gWmGd-LM,689
|
|
44
44
|
letta_client/agents/types/update_agent_response_format.py,sha256=oCoGofTKP7no6gNbDV6nJOpF8IlIplr1iPn5_7BA0cU,402
|
|
45
45
|
letta_client/agents/types/update_agent_tool_rules_item.py,sha256=k9MmcVPsK-EGl8XlT3JQwdlBNLgpGw528jmi8fCFS7g,682
|
|
46
|
-
letta_client/base_client.py,sha256=
|
|
46
|
+
letta_client/base_client.py,sha256=15VzR5nOCvE_tjKedrbjWmyjqSuj2YezfCx6C9S0mpc,10321
|
|
47
47
|
letta_client/batches/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
48
48
|
letta_client/batches/client.py,sha256=3uBs2SZbOP40b-Ck_DvicHuGJe5j3JAsK156zwsofp8,19442
|
|
49
49
|
letta_client/blocks/__init__.py,sha256=c6SGOs9_YGdydYAzhe5TUiaXq52rpWT1mNMcke8qGTQ,108
|
|
50
50
|
letta_client/blocks/agents/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
51
51
|
letta_client/blocks/agents/client.py,sha256=-QywGs_ZfE5PbgzLYf2zzn9zAtpZmzGtHHZ5sXIYw0Y,4904
|
|
52
|
-
letta_client/blocks/client.py,sha256=
|
|
52
|
+
letta_client/blocks/client.py,sha256=wW5yAyo5MpwIfjE-5S5dGg-ekzIC9e-UUIqBCoXhwaQ,30739
|
|
53
53
|
letta_client/client.py,sha256=k2mZqqEWciVmEQHgipjCK4kQILk74hpSqzcdNwdql9A,21212
|
|
54
54
|
letta_client/client_side_access_tokens/__init__.py,sha256=z_wHT4UTBK7RzDIfLpdLMtBJBuuDosqgbzdmx-QME_o,763
|
|
55
55
|
letta_client/client_side_access_tokens/client.py,sha256=Qt1nmL-il4QzqWZHxY6XsSvCY8ps9FWXsWtUTPclVCc,12272
|
|
@@ -62,7 +62,7 @@ letta_client/client_side_access_tokens/types/client_side_access_tokens_create_re
|
|
|
62
62
|
letta_client/client_side_access_tokens/types/client_side_access_tokens_create_response_policy_data_item_access_item.py,sha256=R-H25IpNp9feSrW8Yj3h9O3UTMVvFniQJElogKxLuoE,254
|
|
63
63
|
letta_client/core/__init__.py,sha256=OKbX2aCZXgHCDUsCouqv-OiX32xA6eFFCKIUH9M5Vzk,1591
|
|
64
64
|
letta_client/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
|
|
65
|
-
letta_client/core/client_wrapper.py,sha256=
|
|
65
|
+
letta_client/core/client_wrapper.py,sha256=SgbeGqDrnH2UUctxH0XUyemgT3Gvlt6G2w5QoI-oXfs,1998
|
|
66
66
|
letta_client/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
|
|
67
67
|
letta_client/core/file.py,sha256=d4NNbX8XvXP32z8KpK2Xovv33nFfruIrpz0QWxlgpZk,2663
|
|
68
68
|
letta_client/core/http_client.py,sha256=Z77OIxIbL4OAB2IDqjRq_sYa5yNYAWfmdhdCSSvh6Y4,19552
|
|
@@ -132,6 +132,8 @@ letta_client/steps/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_p
|
|
|
132
132
|
letta_client/steps/client.py,sha256=Vqw3coPITSFK8skl5fBa6YWqL_0UuAkYAFFeKipL0NU,11242
|
|
133
133
|
letta_client/tags/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
134
134
|
letta_client/tags/client.py,sha256=1xIPtMWJ6ssAhPEFgl5CyJHyvND9MHCLIbEzQWxntZ0,5167
|
|
135
|
+
letta_client/telemetry/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
136
|
+
letta_client/telemetry/client.py,sha256=mQkmgGhM2jauFGVx1Lyr76HXOAr7KD5HzapZ7XWSTAY,4643
|
|
135
137
|
letta_client/templates/__init__.py,sha256=6kqaRnkWVngMoV08wPrkA6urr_lCnE6FRIVq4jj4z1M,313
|
|
136
138
|
letta_client/templates/agents/__init__.py,sha256=1tdurb6H9iIIc-Lq68A1xpuidIej7LU1Lz9zCSO4seM,141
|
|
137
139
|
letta_client/templates/agents/client.py,sha256=WVZzpkkUUiaF2SEYptSgx9Cx5kAM7QhjPp_Yox29WmA,8041
|
|
@@ -148,7 +150,7 @@ letta_client/tools/types/add_mcp_server_request.py,sha256=EieZjfOT95sjkpxXdqy7gl
|
|
|
148
150
|
letta_client/tools/types/add_mcp_server_response_item.py,sha256=TWdsKqGb1INhYtpGnAckz0Pw4nZShumSp4pfocRfxCA,270
|
|
149
151
|
letta_client/tools/types/delete_mcp_server_response_item.py,sha256=MeZObU-7tMSCd-S5yuUjNDse6A1hUz1LLjbko0pXaro,273
|
|
150
152
|
letta_client/tools/types/list_mcp_servers_response_value.py,sha256=AIoXu4bO8QNSU7zjL1jj0Rg4313wVtPaTt13W0aevLQ,273
|
|
151
|
-
letta_client/types/__init__.py,sha256=
|
|
153
|
+
letta_client/types/__init__.py,sha256=kcK4mjiH606XYmLgiH14ZLkaNe6nCfbB2ogKccj7fN0,21031
|
|
152
154
|
letta_client/types/action_model.py,sha256=y1e2XMv3skFaNJIBdYoBKgiORzGh05aOVvu-qVR9uHg,1240
|
|
153
155
|
letta_client/types/action_parameters_model.py,sha256=LgKf5aPZG3-OHGxFdXiSokIDgce8c02xPYIAY05VgW8,828
|
|
154
156
|
letta_client/types/action_response_model.py,sha256=yq2Fd9UU8j7vvtE3VqXUoRRvDzWcfJPj_95ynGdeHCs,824
|
|
@@ -171,8 +173,8 @@ letta_client/types/auth_scheme_field.py,sha256=W4-qgKtKUSpBHaSvjLyzLybOIsGo7Ggk4
|
|
|
171
173
|
letta_client/types/bad_request_error_body.py,sha256=E4_eWEc9xeW9BkXGViBDrevV8Jf6PjgEweeGS3vJLD4,567
|
|
172
174
|
letta_client/types/base_tool_rule_schema.py,sha256=FbnJy6gb8wY_DPiU3Gs-u1Ol_l4K7-nAmPTc1oR3kOo,582
|
|
173
175
|
letta_client/types/batch_job.py,sha256=s7mWlU0m7miuf9BTCTKo1rWidSXXcjJoTnS366lcA1Y,2201
|
|
174
|
-
letta_client/types/block.py,sha256=
|
|
175
|
-
letta_client/types/block_update.py,sha256=
|
|
176
|
+
letta_client/types/block.py,sha256=6lgWkLdI9mFeRwzcRVkIPkbkevkaj_lRA6H6u7SsZ7E,3042
|
|
177
|
+
letta_client/types/block_update.py,sha256=QtHcp1nYyiF0UDlpsbfFxFSqCtoykajh2JrkLDcLXHA,1638
|
|
176
178
|
letta_client/types/chat_completion_assistant_message_param.py,sha256=QwxAJ9RQqxtZKnt6g6RfDppuMIt-1RAIlpnfSrVdHgg,1219
|
|
177
179
|
letta_client/types/chat_completion_assistant_message_param_content.py,sha256=CJ7Z_Jik2fzBYGy0UuvgDk0aLt3-Xpj3qswBLmWM0Sg,323
|
|
178
180
|
letta_client/types/chat_completion_assistant_message_param_content_item.py,sha256=tF-E0jNH0ilRJgm4vPTqHguCb-TZZ0LJfTXxOnon23w,405
|
|
@@ -230,7 +232,7 @@ letta_client/types/conflict_error_body.py,sha256=Mena-q1jti6nv_7-xrp6sDb_5MXNKPG
|
|
|
230
232
|
letta_client/types/context_window_overview.py,sha256=9pwiObSxu-SFyQ1pxSTlQiRatVAyFgqa6t0_qrrsGfU,2815
|
|
231
233
|
letta_client/types/continue_tool_rule.py,sha256=AIKTGsQrJdSNsMCqdSqMqjKS7s610vDO8taVEbSJ6Yc,867
|
|
232
234
|
letta_client/types/core_memory_block_schema.py,sha256=DGHyLAcFhHBm7oXkhkGIkkckcl9S2bCaU9b3qrUeNtc,984
|
|
233
|
-
letta_client/types/create_block.py,sha256=
|
|
235
|
+
letta_client/types/create_block.py,sha256=RD82zeWrJpCoWTMltMgLc0SeTgmMe1v3R2jUPIEmIj8,1419
|
|
234
236
|
letta_client/types/dynamic_manager.py,sha256=5DRNqtUnjeTwOe5mkNB-SXItqLOfEX0avSrwsrJt1Aw,853
|
|
235
237
|
letta_client/types/dynamic_manager_update.py,sha256=Kew94BsFP6vP9pUXpZDMFZAo3TyaYWKu1KPgoQQjKYg,888
|
|
236
238
|
letta_client/types/e_2_b_sandbox_config.py,sha256=w3R4QpPjeie5aKw8sb_eKhl78J0k5vLCcATNS3Qaeyw,957
|
|
@@ -309,6 +311,7 @@ letta_client/types/payment_required_error_body.py,sha256=CXPzl1jrozG5PAiJakOK29q
|
|
|
309
311
|
letta_client/types/pip_requirement.py,sha256=Hmh7VpJhdSfFkafh6QwAehCp0MQUBXv1YAoYP-2wV2M,773
|
|
310
312
|
letta_client/types/provider.py,sha256=9xl9T3TjkjpGX0mfH04CtCF0lcdoTmsGT_K16xR3n7M,1476
|
|
311
313
|
letta_client/types/provider_category.py,sha256=St4tSc_Wc5huF79kb088-L-tRz9Cj2_b5DqEoU4eDIs,156
|
|
314
|
+
letta_client/types/provider_trace.py,sha256=sLDiO-N9KbgA9ppwMRSw8Qlf52PApocjeXgbBans-94,2200
|
|
312
315
|
letta_client/types/provider_type.py,sha256=ks7hOrwFjZXJdQDWQMtFPZI0LHZKaDm-YZ1fYry11ZY,443
|
|
313
316
|
letta_client/types/reasoning_content.py,sha256=aId-87QjQ4sm_fuCmzIdZZghr-9DFeVV-Lv9x5iVw3I,995
|
|
314
317
|
letta_client/types/reasoning_message.py,sha256=YzZMr_orwDVcrbiSED_kN3004MA579xGe-iRW9hLngg,1606
|
|
@@ -385,6 +388,6 @@ letta_client/voice/__init__.py,sha256=7hX85553PiRMtIMM12a0DSoFzsglNiUziYR2ekS84Q
|
|
|
385
388
|
letta_client/voice/client.py,sha256=STjswa5oOLoP59QwTJvQwi73kgn0UzKOaXc2CsTRI4k,6912
|
|
386
389
|
letta_client/voice/types/__init__.py,sha256=FRc3iKRTONE4N8Lf1IqvnqWZ2kXdrFFvkL7PxVcR8Ew,212
|
|
387
390
|
letta_client/voice/types/create_voice_chat_completions_request_body.py,sha256=ZLfKgNK1T6IAwLEvaBVFfy7jEAoPUXP28n-nfmHkklc,391
|
|
388
|
-
letta_client-0.1.
|
|
389
|
-
letta_client-0.1.
|
|
390
|
-
letta_client-0.1.
|
|
391
|
+
letta_client-0.1.144.dist-info/METADATA,sha256=2sJ0TphGdbppOTzzywv_4NQmKmlr84T__JrlOQPLG5o,5042
|
|
392
|
+
letta_client-0.1.144.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
|
393
|
+
letta_client-0.1.144.dist-info/RECORD,,
|
|
File without changes
|