letta-client 0.1.307__py3-none-any.whl → 0.1.309__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 CHANGED
@@ -381,6 +381,9 @@ from .projects import ProjectsListResponse, ProjectsListResponseProjectsItem
381
381
  from .runs import LettaStreamingResponse
382
382
  from .steps import StepsListRequestFeedback
383
383
  from .templates import (
384
+ TemplatesCreateTemplateRequest,
385
+ TemplatesCreateTemplateRequestAgentFile,
386
+ TemplatesCreateTemplateRequestAgentId,
384
387
  TemplatesCreateTemplateResponse,
385
388
  TemplatesDeleteTemplateResponse,
386
389
  TemplatesForkTemplateResponse,
@@ -412,6 +415,7 @@ from .templates import (
412
415
  TemplatesListTemplateVersionsResponseVersionsItem,
413
416
  TemplatesRenameTemplateResponse,
414
417
  TemplatesSaveTemplateVersionResponse,
418
+ TemplatesUpdateTemplateDescriptionResponse,
415
419
  )
416
420
  from .tools import (
417
421
  AddMcpServerRequest,
@@ -742,6 +746,9 @@ __all__ = [
742
746
  "SupervisorManagerUpdate",
743
747
  "SystemMessage",
744
748
  "TagSchema",
749
+ "TemplatesCreateTemplateRequest",
750
+ "TemplatesCreateTemplateRequestAgentFile",
751
+ "TemplatesCreateTemplateRequestAgentId",
745
752
  "TemplatesCreateTemplateResponse",
746
753
  "TemplatesDeleteTemplateResponse",
747
754
  "TemplatesForkTemplateResponse",
@@ -773,6 +780,7 @@ __all__ = [
773
780
  "TemplatesListTemplateVersionsResponseVersionsItem",
774
781
  "TemplatesRenameTemplateResponse",
775
782
  "TemplatesSaveTemplateVersionResponse",
783
+ "TemplatesUpdateTemplateDescriptionResponse",
776
784
  "TerminalToolRule",
777
785
  "TestMcpServerRequest",
778
786
  "TextContent",
@@ -24,10 +24,10 @@ class BaseClientWrapper:
24
24
 
25
25
  def get_headers(self) -> typing.Dict[str, str]:
26
26
  headers: typing.Dict[str, str] = {
27
- "User-Agent": "letta-client/0.1.307",
27
+ "User-Agent": "letta-client/0.1.309",
28
28
  "X-Fern-Language": "Python",
29
29
  "X-Fern-SDK-Name": "letta-client",
30
- "X-Fern-SDK-Version": "0.1.307",
30
+ "X-Fern-SDK-Version": "0.1.309",
31
31
  **(self.get_custom_headers() or {}),
32
32
  }
33
33
  if self._project is not None:
@@ -3,6 +3,9 @@
3
3
  # isort: skip_file
4
4
 
5
5
  from .types import (
6
+ TemplatesCreateTemplateRequest,
7
+ TemplatesCreateTemplateRequestAgentFile,
8
+ TemplatesCreateTemplateRequestAgentId,
6
9
  TemplatesCreateTemplateResponse,
7
10
  TemplatesDeleteTemplateResponse,
8
11
  TemplatesForkTemplateResponse,
@@ -34,6 +37,7 @@ from .types import (
34
37
  TemplatesListTemplateVersionsResponseVersionsItem,
35
38
  TemplatesRenameTemplateResponse,
36
39
  TemplatesSaveTemplateVersionResponse,
40
+ TemplatesUpdateTemplateDescriptionResponse,
37
41
  )
38
42
  from . import agents
39
43
  from .agents import (
@@ -46,6 +50,9 @@ __all__ = [
46
50
  "AgentsCreateRequestInitialMessageSequenceItem",
47
51
  "AgentsCreateRequestInitialMessageSequenceItemRole",
48
52
  "AgentsCreateResponse",
53
+ "TemplatesCreateTemplateRequest",
54
+ "TemplatesCreateTemplateRequestAgentFile",
55
+ "TemplatesCreateTemplateRequestAgentId",
49
56
  "TemplatesCreateTemplateResponse",
50
57
  "TemplatesDeleteTemplateResponse",
51
58
  "TemplatesForkTemplateResponse",
@@ -77,5 +84,6 @@ __all__ = [
77
84
  "TemplatesListTemplateVersionsResponseVersionsItem",
78
85
  "TemplatesRenameTemplateResponse",
79
86
  "TemplatesSaveTemplateVersionResponse",
87
+ "TemplatesUpdateTemplateDescriptionResponse",
80
88
  "agents",
81
89
  ]
@@ -6,6 +6,7 @@ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
6
6
  from ..core.request_options import RequestOptions
7
7
  from .agents.client import AgentsClient, AsyncAgentsClient
8
8
  from .raw_client import AsyncRawTemplatesClient, RawTemplatesClient
9
+ from .types.templates_create_template_request import TemplatesCreateTemplateRequest
9
10
  from .types.templates_create_template_response import TemplatesCreateTemplateResponse
10
11
  from .types.templates_delete_template_response import TemplatesDeleteTemplateResponse
11
12
  from .types.templates_fork_template_response import TemplatesForkTemplateResponse
@@ -15,6 +16,7 @@ from .types.templates_list_response import TemplatesListResponse
15
16
  from .types.templates_list_template_versions_response import TemplatesListTemplateVersionsResponse
16
17
  from .types.templates_rename_template_response import TemplatesRenameTemplateResponse
17
18
  from .types.templates_save_template_version_response import TemplatesSaveTemplateVersionResponse
19
+ from .types.templates_update_template_description_response import TemplatesUpdateTemplateDescriptionResponse
18
20
 
19
21
  # this is used as the default value for optional parameters
20
22
  OMIT = typing.cast(typing.Any, ...)
@@ -303,23 +305,18 @@ class TemplatesClient:
303
305
  self,
304
306
  project: str,
305
307
  *,
306
- agent_id: str,
307
- name: typing.Optional[str] = OMIT,
308
+ request: TemplatesCreateTemplateRequest,
308
309
  request_options: typing.Optional[RequestOptions] = None,
309
310
  ) -> TemplatesCreateTemplateResponse:
310
311
  """
311
- Creates a new template from an existing agent
312
+ Creates a new template from an existing agent or agent file
312
313
 
313
314
  Parameters
314
315
  ----------
315
316
  project : str
316
317
  The project slug
317
318
 
318
- agent_id : str
319
- The ID of the agent to use as a template, can be from any project
320
-
321
- name : typing.Optional[str]
322
- Optional custom name for the template. If not provided, a random name will be generated.
319
+ request : TemplatesCreateTemplateRequest
323
320
 
324
321
  request_options : typing.Optional[RequestOptions]
325
322
  Request-specific configuration.
@@ -332,6 +329,7 @@ class TemplatesClient:
332
329
  Examples
333
330
  --------
334
331
  from letta_client import Letta
332
+ from letta_client.templates import TemplatesCreateTemplateRequestAgentId
335
333
 
336
334
  client = Letta(
337
335
  project="YOUR_PROJECT",
@@ -339,12 +337,12 @@ class TemplatesClient:
339
337
  )
340
338
  client.templates.createtemplate(
341
339
  project="project",
342
- agent_id="agent_id",
340
+ request=TemplatesCreateTemplateRequestAgentId(
341
+ agent_id="agent_id",
342
+ ),
343
343
  )
344
344
  """
345
- _response = self._raw_client.createtemplate(
346
- project, agent_id=agent_id, name=name, request_options=request_options
347
- )
345
+ _response = self._raw_client.createtemplate(project, request=request, request_options=request_options)
348
346
  return _response.data
349
347
 
350
348
  def renametemplate(
@@ -396,6 +394,54 @@ class TemplatesClient:
396
394
  )
397
395
  return _response.data
398
396
 
397
+ def updatetemplatedescription(
398
+ self,
399
+ project: str,
400
+ template_name: str,
401
+ *,
402
+ description: typing.Optional[str] = OMIT,
403
+ request_options: typing.Optional[RequestOptions] = None,
404
+ ) -> TemplatesUpdateTemplateDescriptionResponse:
405
+ """
406
+ Updates the description for all versions of a template with the specified name. Versions are automatically stripped from the current template name if accidentally included.
407
+
408
+ Parameters
409
+ ----------
410
+ project : str
411
+ The project slug
412
+
413
+ template_name : str
414
+ The template name (version will be automatically stripped if included)
415
+
416
+ description : typing.Optional[str]
417
+ The new description for the template
418
+
419
+ request_options : typing.Optional[RequestOptions]
420
+ Request-specific configuration.
421
+
422
+ Returns
423
+ -------
424
+ TemplatesUpdateTemplateDescriptionResponse
425
+ 200
426
+
427
+ Examples
428
+ --------
429
+ from letta_client import Letta
430
+
431
+ client = Letta(
432
+ project="YOUR_PROJECT",
433
+ token="YOUR_TOKEN",
434
+ )
435
+ client.templates.updatetemplatedescription(
436
+ project="project",
437
+ template_name="template_name",
438
+ )
439
+ """
440
+ _response = self._raw_client.updatetemplatedescription(
441
+ project, template_name, description=description, request_options=request_options
442
+ )
443
+ return _response.data
444
+
399
445
  def listtemplateversions(
400
446
  self,
401
447
  project_slug: str,
@@ -774,23 +820,18 @@ class AsyncTemplatesClient:
774
820
  self,
775
821
  project: str,
776
822
  *,
777
- agent_id: str,
778
- name: typing.Optional[str] = OMIT,
823
+ request: TemplatesCreateTemplateRequest,
779
824
  request_options: typing.Optional[RequestOptions] = None,
780
825
  ) -> TemplatesCreateTemplateResponse:
781
826
  """
782
- Creates a new template from an existing agent
827
+ Creates a new template from an existing agent or agent file
783
828
 
784
829
  Parameters
785
830
  ----------
786
831
  project : str
787
832
  The project slug
788
833
 
789
- agent_id : str
790
- The ID of the agent to use as a template, can be from any project
791
-
792
- name : typing.Optional[str]
793
- Optional custom name for the template. If not provided, a random name will be generated.
834
+ request : TemplatesCreateTemplateRequest
794
835
 
795
836
  request_options : typing.Optional[RequestOptions]
796
837
  Request-specific configuration.
@@ -805,6 +846,7 @@ class AsyncTemplatesClient:
805
846
  import asyncio
806
847
 
807
848
  from letta_client import AsyncLetta
849
+ from letta_client.templates import TemplatesCreateTemplateRequestAgentId
808
850
 
809
851
  client = AsyncLetta(
810
852
  project="YOUR_PROJECT",
@@ -815,15 +857,15 @@ class AsyncTemplatesClient:
815
857
  async def main() -> None:
816
858
  await client.templates.createtemplate(
817
859
  project="project",
818
- agent_id="agent_id",
860
+ request=TemplatesCreateTemplateRequestAgentId(
861
+ agent_id="agent_id",
862
+ ),
819
863
  )
820
864
 
821
865
 
822
866
  asyncio.run(main())
823
867
  """
824
- _response = await self._raw_client.createtemplate(
825
- project, agent_id=agent_id, name=name, request_options=request_options
826
- )
868
+ _response = await self._raw_client.createtemplate(project, request=request, request_options=request_options)
827
869
  return _response.data
828
870
 
829
871
  async def renametemplate(
@@ -883,6 +925,62 @@ class AsyncTemplatesClient:
883
925
  )
884
926
  return _response.data
885
927
 
928
+ async def updatetemplatedescription(
929
+ self,
930
+ project: str,
931
+ template_name: str,
932
+ *,
933
+ description: typing.Optional[str] = OMIT,
934
+ request_options: typing.Optional[RequestOptions] = None,
935
+ ) -> TemplatesUpdateTemplateDescriptionResponse:
936
+ """
937
+ Updates the description for all versions of a template with the specified name. Versions are automatically stripped from the current template name if accidentally included.
938
+
939
+ Parameters
940
+ ----------
941
+ project : str
942
+ The project slug
943
+
944
+ template_name : str
945
+ The template name (version will be automatically stripped if included)
946
+
947
+ description : typing.Optional[str]
948
+ The new description for the template
949
+
950
+ request_options : typing.Optional[RequestOptions]
951
+ Request-specific configuration.
952
+
953
+ Returns
954
+ -------
955
+ TemplatesUpdateTemplateDescriptionResponse
956
+ 200
957
+
958
+ Examples
959
+ --------
960
+ import asyncio
961
+
962
+ from letta_client import AsyncLetta
963
+
964
+ client = AsyncLetta(
965
+ project="YOUR_PROJECT",
966
+ token="YOUR_TOKEN",
967
+ )
968
+
969
+
970
+ async def main() -> None:
971
+ await client.templates.updatetemplatedescription(
972
+ project="project",
973
+ template_name="template_name",
974
+ )
975
+
976
+
977
+ asyncio.run(main())
978
+ """
979
+ _response = await self._raw_client.updatetemplatedescription(
980
+ project, template_name, description=description, request_options=request_options
981
+ )
982
+ return _response.data
983
+
886
984
  async def listtemplateversions(
887
985
  self,
888
986
  project_slug: str,
@@ -8,11 +8,13 @@ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
8
8
  from ..core.http_response import AsyncHttpResponse, HttpResponse
9
9
  from ..core.jsonable_encoder import jsonable_encoder
10
10
  from ..core.request_options import RequestOptions
11
+ from ..core.serialization import convert_and_respect_annotation_metadata
11
12
  from ..core.unchecked_base_model import construct_type
12
13
  from ..errors.bad_request_error import BadRequestError
13
14
  from ..errors.conflict_error import ConflictError
14
15
  from ..errors.not_found_error import NotFoundError
15
16
  from ..types.conflict_error_body import ConflictErrorBody
17
+ from .types.templates_create_template_request import TemplatesCreateTemplateRequest
16
18
  from .types.templates_create_template_response import TemplatesCreateTemplateResponse
17
19
  from .types.templates_delete_template_response import TemplatesDeleteTemplateResponse
18
20
  from .types.templates_fork_template_response import TemplatesForkTemplateResponse
@@ -22,6 +24,7 @@ from .types.templates_list_response import TemplatesListResponse
22
24
  from .types.templates_list_template_versions_response import TemplatesListTemplateVersionsResponse
23
25
  from .types.templates_rename_template_response import TemplatesRenameTemplateResponse
24
26
  from .types.templates_save_template_version_response import TemplatesSaveTemplateVersionResponse
27
+ from .types.templates_update_template_description_response import TemplatesUpdateTemplateDescriptionResponse
25
28
 
26
29
  # this is used as the default value for optional parameters
27
30
  OMIT = typing.cast(typing.Any, ...)
@@ -368,23 +371,18 @@ class RawTemplatesClient:
368
371
  self,
369
372
  project: str,
370
373
  *,
371
- agent_id: str,
372
- name: typing.Optional[str] = OMIT,
374
+ request: TemplatesCreateTemplateRequest,
373
375
  request_options: typing.Optional[RequestOptions] = None,
374
376
  ) -> HttpResponse[TemplatesCreateTemplateResponse]:
375
377
  """
376
- Creates a new template from an existing agent
378
+ Creates a new template from an existing agent or agent file
377
379
 
378
380
  Parameters
379
381
  ----------
380
382
  project : str
381
383
  The project slug
382
384
 
383
- agent_id : str
384
- The ID of the agent to use as a template, can be from any project
385
-
386
- name : typing.Optional[str]
387
- Optional custom name for the template. If not provided, a random name will be generated.
385
+ request : TemplatesCreateTemplateRequest
388
386
 
389
387
  request_options : typing.Optional[RequestOptions]
390
388
  Request-specific configuration.
@@ -397,11 +395,9 @@ class RawTemplatesClient:
397
395
  _response = self._client_wrapper.httpx_client.request(
398
396
  f"v1/templates/{jsonable_encoder(project)}",
399
397
  method="POST",
400
- json={
401
- "agent_id": agent_id,
402
- "name": name,
403
- "type": "agent",
404
- },
398
+ json=convert_and_respect_annotation_metadata(
399
+ object_=request, annotation=TemplatesCreateTemplateRequest, direction="write"
400
+ ),
405
401
  headers={
406
402
  "content-type": "application/json",
407
403
  },
@@ -524,6 +520,85 @@ class RawTemplatesClient:
524
520
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
525
521
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
526
522
 
523
+ def updatetemplatedescription(
524
+ self,
525
+ project: str,
526
+ template_name: str,
527
+ *,
528
+ description: typing.Optional[str] = OMIT,
529
+ request_options: typing.Optional[RequestOptions] = None,
530
+ ) -> HttpResponse[TemplatesUpdateTemplateDescriptionResponse]:
531
+ """
532
+ Updates the description for all versions of a template with the specified name. Versions are automatically stripped from the current template name if accidentally included.
533
+
534
+ Parameters
535
+ ----------
536
+ project : str
537
+ The project slug
538
+
539
+ template_name : str
540
+ The template name (version will be automatically stripped if included)
541
+
542
+ description : typing.Optional[str]
543
+ The new description for the template
544
+
545
+ request_options : typing.Optional[RequestOptions]
546
+ Request-specific configuration.
547
+
548
+ Returns
549
+ -------
550
+ HttpResponse[TemplatesUpdateTemplateDescriptionResponse]
551
+ 200
552
+ """
553
+ _response = self._client_wrapper.httpx_client.request(
554
+ f"v1/templates/{jsonable_encoder(project)}/{jsonable_encoder(template_name)}/description",
555
+ method="PATCH",
556
+ json={
557
+ "description": description,
558
+ },
559
+ headers={
560
+ "content-type": "application/json",
561
+ },
562
+ request_options=request_options,
563
+ omit=OMIT,
564
+ )
565
+ try:
566
+ if 200 <= _response.status_code < 300:
567
+ _data = typing.cast(
568
+ TemplatesUpdateTemplateDescriptionResponse,
569
+ construct_type(
570
+ type_=TemplatesUpdateTemplateDescriptionResponse, # type: ignore
571
+ object_=_response.json(),
572
+ ),
573
+ )
574
+ return HttpResponse(response=_response, data=_data)
575
+ if _response.status_code == 400:
576
+ raise BadRequestError(
577
+ headers=dict(_response.headers),
578
+ body=typing.cast(
579
+ typing.Optional[typing.Any],
580
+ construct_type(
581
+ type_=typing.Optional[typing.Any], # type: ignore
582
+ object_=_response.json(),
583
+ ),
584
+ ),
585
+ )
586
+ if _response.status_code == 404:
587
+ raise NotFoundError(
588
+ headers=dict(_response.headers),
589
+ body=typing.cast(
590
+ typing.Optional[typing.Any],
591
+ construct_type(
592
+ type_=typing.Optional[typing.Any], # type: ignore
593
+ object_=_response.json(),
594
+ ),
595
+ ),
596
+ )
597
+ _response_json = _response.json()
598
+ except JSONDecodeError:
599
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
600
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
601
+
527
602
  def listtemplateversions(
528
603
  self,
529
604
  project_slug: str,
@@ -933,23 +1008,18 @@ class AsyncRawTemplatesClient:
933
1008
  self,
934
1009
  project: str,
935
1010
  *,
936
- agent_id: str,
937
- name: typing.Optional[str] = OMIT,
1011
+ request: TemplatesCreateTemplateRequest,
938
1012
  request_options: typing.Optional[RequestOptions] = None,
939
1013
  ) -> AsyncHttpResponse[TemplatesCreateTemplateResponse]:
940
1014
  """
941
- Creates a new template from an existing agent
1015
+ Creates a new template from an existing agent or agent file
942
1016
 
943
1017
  Parameters
944
1018
  ----------
945
1019
  project : str
946
1020
  The project slug
947
1021
 
948
- agent_id : str
949
- The ID of the agent to use as a template, can be from any project
950
-
951
- name : typing.Optional[str]
952
- Optional custom name for the template. If not provided, a random name will be generated.
1022
+ request : TemplatesCreateTemplateRequest
953
1023
 
954
1024
  request_options : typing.Optional[RequestOptions]
955
1025
  Request-specific configuration.
@@ -962,11 +1032,9 @@ class AsyncRawTemplatesClient:
962
1032
  _response = await self._client_wrapper.httpx_client.request(
963
1033
  f"v1/templates/{jsonable_encoder(project)}",
964
1034
  method="POST",
965
- json={
966
- "agent_id": agent_id,
967
- "name": name,
968
- "type": "agent",
969
- },
1035
+ json=convert_and_respect_annotation_metadata(
1036
+ object_=request, annotation=TemplatesCreateTemplateRequest, direction="write"
1037
+ ),
970
1038
  headers={
971
1039
  "content-type": "application/json",
972
1040
  },
@@ -1089,6 +1157,85 @@ class AsyncRawTemplatesClient:
1089
1157
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
1090
1158
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
1091
1159
 
1160
+ async def updatetemplatedescription(
1161
+ self,
1162
+ project: str,
1163
+ template_name: str,
1164
+ *,
1165
+ description: typing.Optional[str] = OMIT,
1166
+ request_options: typing.Optional[RequestOptions] = None,
1167
+ ) -> AsyncHttpResponse[TemplatesUpdateTemplateDescriptionResponse]:
1168
+ """
1169
+ Updates the description for all versions of a template with the specified name. Versions are automatically stripped from the current template name if accidentally included.
1170
+
1171
+ Parameters
1172
+ ----------
1173
+ project : str
1174
+ The project slug
1175
+
1176
+ template_name : str
1177
+ The template name (version will be automatically stripped if included)
1178
+
1179
+ description : typing.Optional[str]
1180
+ The new description for the template
1181
+
1182
+ request_options : typing.Optional[RequestOptions]
1183
+ Request-specific configuration.
1184
+
1185
+ Returns
1186
+ -------
1187
+ AsyncHttpResponse[TemplatesUpdateTemplateDescriptionResponse]
1188
+ 200
1189
+ """
1190
+ _response = await self._client_wrapper.httpx_client.request(
1191
+ f"v1/templates/{jsonable_encoder(project)}/{jsonable_encoder(template_name)}/description",
1192
+ method="PATCH",
1193
+ json={
1194
+ "description": description,
1195
+ },
1196
+ headers={
1197
+ "content-type": "application/json",
1198
+ },
1199
+ request_options=request_options,
1200
+ omit=OMIT,
1201
+ )
1202
+ try:
1203
+ if 200 <= _response.status_code < 300:
1204
+ _data = typing.cast(
1205
+ TemplatesUpdateTemplateDescriptionResponse,
1206
+ construct_type(
1207
+ type_=TemplatesUpdateTemplateDescriptionResponse, # type: ignore
1208
+ object_=_response.json(),
1209
+ ),
1210
+ )
1211
+ return AsyncHttpResponse(response=_response, data=_data)
1212
+ if _response.status_code == 400:
1213
+ raise BadRequestError(
1214
+ headers=dict(_response.headers),
1215
+ body=typing.cast(
1216
+ typing.Optional[typing.Any],
1217
+ construct_type(
1218
+ type_=typing.Optional[typing.Any], # type: ignore
1219
+ object_=_response.json(),
1220
+ ),
1221
+ ),
1222
+ )
1223
+ if _response.status_code == 404:
1224
+ raise NotFoundError(
1225
+ headers=dict(_response.headers),
1226
+ body=typing.cast(
1227
+ typing.Optional[typing.Any],
1228
+ construct_type(
1229
+ type_=typing.Optional[typing.Any], # type: ignore
1230
+ object_=_response.json(),
1231
+ ),
1232
+ ),
1233
+ )
1234
+ _response_json = _response.json()
1235
+ except JSONDecodeError:
1236
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
1237
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
1238
+
1092
1239
  async def listtemplateversions(
1093
1240
  self,
1094
1241
  project_slug: str,
@@ -2,6 +2,9 @@
2
2
 
3
3
  # isort: skip_file
4
4
 
5
+ from .templates_create_template_request import TemplatesCreateTemplateRequest
6
+ from .templates_create_template_request_agent_file import TemplatesCreateTemplateRequestAgentFile
7
+ from .templates_create_template_request_agent_id import TemplatesCreateTemplateRequestAgentId
5
8
  from .templates_create_template_response import TemplatesCreateTemplateResponse
6
9
  from .templates_delete_template_response import TemplatesDeleteTemplateResponse
7
10
  from .templates_fork_template_response import TemplatesForkTemplateResponse
@@ -65,8 +68,12 @@ from .templates_list_template_versions_response import TemplatesListTemplateVers
65
68
  from .templates_list_template_versions_response_versions_item import TemplatesListTemplateVersionsResponseVersionsItem
66
69
  from .templates_rename_template_response import TemplatesRenameTemplateResponse
67
70
  from .templates_save_template_version_response import TemplatesSaveTemplateVersionResponse
71
+ from .templates_update_template_description_response import TemplatesUpdateTemplateDescriptionResponse
68
72
 
69
73
  __all__ = [
74
+ "TemplatesCreateTemplateRequest",
75
+ "TemplatesCreateTemplateRequestAgentFile",
76
+ "TemplatesCreateTemplateRequestAgentId",
70
77
  "TemplatesCreateTemplateResponse",
71
78
  "TemplatesDeleteTemplateResponse",
72
79
  "TemplatesForkTemplateResponse",
@@ -98,4 +105,5 @@ __all__ = [
98
105
  "TemplatesListTemplateVersionsResponseVersionsItem",
99
106
  "TemplatesRenameTemplateResponse",
100
107
  "TemplatesSaveTemplateVersionResponse",
108
+ "TemplatesUpdateTemplateDescriptionResponse",
101
109
  ]
@@ -0,0 +1,10 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ from .templates_create_template_request_agent_file import TemplatesCreateTemplateRequestAgentFile
6
+ from .templates_create_template_request_agent_id import TemplatesCreateTemplateRequestAgentId
7
+
8
+ TemplatesCreateTemplateRequest = typing.Union[
9
+ TemplatesCreateTemplateRequestAgentId, TemplatesCreateTemplateRequestAgentFile
10
+ ]
@@ -0,0 +1,33 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
7
+ from ...core.unchecked_base_model import UncheckedBaseModel
8
+
9
+
10
+ class TemplatesCreateTemplateRequestAgentFile(UncheckedBaseModel):
11
+ """
12
+ Create a template from an uploaded agent file
13
+ """
14
+
15
+ type: typing.Literal["agent_file"] = "agent_file"
16
+ agent_file: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field()
17
+ """
18
+ The agent file to use as a template, this should be a JSON file exported from the platform
19
+ """
20
+
21
+ name: typing.Optional[str] = pydantic.Field(default=None)
22
+ """
23
+ Optional custom name for the template. If not provided, a random name will be generated.
24
+ """
25
+
26
+ if IS_PYDANTIC_V2:
27
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
28
+ else:
29
+
30
+ class Config:
31
+ frozen = True
32
+ smart_union = True
33
+ extra = pydantic.Extra.allow
@@ -0,0 +1,33 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
7
+ from ...core.unchecked_base_model import UncheckedBaseModel
8
+
9
+
10
+ class TemplatesCreateTemplateRequestAgentId(UncheckedBaseModel):
11
+ """
12
+ Create a template from an existing agent
13
+ """
14
+
15
+ type: typing.Literal["agent"] = "agent"
16
+ agent_id: str = pydantic.Field()
17
+ """
18
+ The ID of the agent to use as a template, can be from any project
19
+ """
20
+
21
+ name: typing.Optional[str] = pydantic.Field(default=None)
22
+ """
23
+ Optional custom name for the template. If not provided, a random name will be generated.
24
+ """
25
+
26
+ if IS_PYDANTIC_V2:
27
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
28
+ else:
29
+
30
+ class Config:
31
+ frozen = True
32
+ smart_union = True
33
+ extra = pydantic.Extra.allow
@@ -0,0 +1,20 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
7
+ from ...core.unchecked_base_model import UncheckedBaseModel
8
+
9
+
10
+ class TemplatesUpdateTemplateDescriptionResponse(UncheckedBaseModel):
11
+ success: bool
12
+
13
+ if IS_PYDANTIC_V2:
14
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
15
+ else:
16
+
17
+ class Config:
18
+ frozen = True
19
+ smart_union = True
20
+ extra = pydantic.Extra.allow
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: letta-client
3
- Version: 0.1.307
3
+ Version: 0.1.309
4
4
  Summary:
5
5
  Requires-Python: >=3.8,<4.0
6
6
  Classifier: Intended Audience :: Developers
@@ -1,4 +1,4 @@
1
- letta_client/__init__.py,sha256=yIQqDFRQsrM3faBRzTcdY9jIUVHAgcD3RpytQ7ee5ro,27337
1
+ letta_client/__init__.py,sha256=IIdmY3HofPua98UN0RPnbkJTH5EHoFgLO8iKy-tsPbQ,27689
2
2
  letta_client/agents/__init__.py,sha256=6U2CPqYOtgufFoEhev61AzE-oOqgAQPUBsN8H7YJDbg,2081
3
3
  letta_client/agents/blocks/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
4
4
  letta_client/agents/blocks/client.py,sha256=CUwVh5FHgD0YP3VNhUrWdkedMWk49yH3IiDD589AWEM,15809
@@ -92,7 +92,7 @@ letta_client/client_side_access_tokens/types/client_side_access_tokens_list_clie
92
92
  letta_client/client_side_access_tokens/types/client_side_access_tokens_list_client_side_access_tokens_response_tokens_item_policy_data_item_access_item.py,sha256=kNHfEWFl7u71Pu8NPqutod0a2NXfvq8il05Hqm0iBB4,284
93
93
  letta_client/core/__init__.py,sha256=tpn7rjb6C2UIkYZYIqdrNpI7Yax2jw88sXh2baxaxAI,1715
94
94
  letta_client/core/api_error.py,sha256=44vPoTyWN59gonCIZMdzw7M1uspygiLnr3GNFOoVL2Q,614
95
- letta_client/core/client_wrapper.py,sha256=8r7jrTWpdOcWp-vCZdO03D9wG4qoWLa_DSNK3NQCpwU,2776
95
+ letta_client/core/client_wrapper.py,sha256=tpWsnxrslDAHGnlZuLOEHVm6kJ_StLbTGthXT-F6I-U,2776
96
96
  letta_client/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
97
97
  letta_client/core/file.py,sha256=d4NNbX8XvXP32z8KpK2Xovv33nFfruIrpz0QWxlgpZk,2663
98
98
  letta_client/core/force_multipart.py,sha256=awxh5MtcRYe74ehY8U76jzv6fYM_w_D3Rur7KQQzSDk,429
@@ -202,7 +202,7 @@ letta_client/tags/raw_client.py,sha256=DQXEgzOuCygBMbzX63Sc9UwfueALa5rUHH3c8jb4O
202
202
  letta_client/telemetry/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
203
203
  letta_client/telemetry/client.py,sha256=cHMxfLAFjbT-XLtG0o04tGMaRnabrPuixbfHV3HFitE,3042
204
204
  letta_client/telemetry/raw_client.py,sha256=Zxs3KkYCfs6M1b4vJbzHunZs7SzSiYAiy4Nb7tFAKC8,4962
205
- letta_client/templates/__init__.py,sha256=OxELqtiAhQ5iCAQ--vMrggjS0nWGFSGs_M6Vi901brw,4020
205
+ letta_client/templates/__init__.py,sha256=A-h3ZYJPXZsRGvUdk9UrSOir_NawVjkqLVXoeX_noxI,4372
206
206
  letta_client/templates/agents/__init__.py,sha256=Nb3AeDuJhSba_DbgHKuCUY1b3PT1jj3-YMJ7uW7RIAk,393
207
207
  letta_client/templates/agents/client.py,sha256=HCCEZZ3b0tGonxDNbiPuXadoZu_x1G_OtBdTHRBpG4M,7088
208
208
  letta_client/templates/agents/raw_client.py,sha256=RGf_8ZaBbkS3sE7qrKqirL8Mu-E7CDRZNEKFWCJ3v4E,9552
@@ -210,9 +210,12 @@ letta_client/templates/agents/types/__init__.py,sha256=gDThrVEf3npLrxCqHWKgJLwB6
210
210
  letta_client/templates/agents/types/agents_create_request_initial_message_sequence_item.py,sha256=0--NEWDhbw-1WBF5wr5tl25ucWkqHvhmSm8iuQOr6tw,986
211
211
  letta_client/templates/agents/types/agents_create_request_initial_message_sequence_item_role.py,sha256=Xp6uU0_CfWtIBtHdwicF9b4yAcrCYXQyYvxtNKyq-K4,210
212
212
  letta_client/templates/agents/types/agents_create_response.py,sha256=P5sppbD_qW7I9suv5Ykm7tlgnh5a3omYggA8JgLw2RY,637
213
- letta_client/templates/client.py,sha256=jSMC0kubRHe5hsrozDYJqnQW6nPPEX4W2fOkHmABnwk,27533
214
- letta_client/templates/raw_client.py,sha256=UHqX47RgBL3hDl-Tq_OKLl_6g1FfiyOJg3gTTRPTMkY,44444
215
- letta_client/templates/types/__init__.py,sha256=YMsQMFGpYXxp6NBFIdutomxq-dPtmOgfnQrXta_Ap_A,5875
213
+ letta_client/templates/client.py,sha256=cUyfi2AqglBR8JvDzyV43znUmQnwyOdq3lrWPElTKsQ,30714
214
+ letta_client/templates/raw_client.py,sha256=U9x3mGpgptDFm2sbHri4o4yB3pPLFCoCeVP9XK18IFk,50697
215
+ letta_client/templates/types/__init__.py,sha256=Joib6wxgIzQ4cmKKD2In6Ts8iF8YuCtyrdX0pN0Izuo,6428
216
+ letta_client/templates/types/templates_create_template_request.py,sha256=8Po-a33Bdyosx-Y08cnbTmmHYog7GJC--ZcZse5Opkk,405
217
+ letta_client/templates/types/templates_create_template_request_agent_file.py,sha256=LVlJq2JWT9Bgo3BPRcLaf5inWX034SvEOEd4fkM4gvg,1058
218
+ letta_client/templates/types/templates_create_template_request_agent_id.py,sha256=M5MG3wNcbGHZR2Z-zxwgj9PA03VkKB8gTGmZQwuApuM,972
216
219
  letta_client/templates/types/templates_create_template_response.py,sha256=UKaNiwW7WNX4Q3_IqGkFJaatMcdSS-Tsf8gDT2i677w,1082
217
220
  letta_client/templates/types/templates_delete_template_response.py,sha256=_DUyWh9jtgw8u_U_JsV8N-RhPcY32QLAQZsUCSXDCTY,583
218
221
  letta_client/templates/types/templates_fork_template_response.py,sha256=zX8aCR5Z8sEgXJHHzxsPeYRNMW2HfD26EN5Mlwrt-ZI,1080
@@ -244,6 +247,7 @@ letta_client/templates/types/templates_list_template_versions_response.py,sha256
244
247
  letta_client/templates/types/templates_list_template_versions_response_versions_item.py,sha256=HS0mrUz1qROFff1ha3SBcs63gS4spj0LUYg82Slam2Y,956
245
248
  letta_client/templates/types/templates_rename_template_response.py,sha256=iH8paSt5k0jzqTDezOw2PJbgbDJIqVkA4zWnsa64JX4,583
246
249
  letta_client/templates/types/templates_save_template_version_response.py,sha256=gmRwrpCk5UM1TH2Sru4iX_ybTAMftVsHI0DOVGxdFrw,1087
250
+ letta_client/templates/types/templates_update_template_description_response.py,sha256=0dYH6_6EcEzMSaU9Igau0xKJPVYGXA9Pf9_ON6kY0es,594
247
251
  letta_client/tools/__init__.py,sha256=ZR4ev9ZmyWZl9iJPXK_FRk79YjgIytkA_2TlNS1PaQI,725
248
252
  letta_client/tools/client.py,sha256=2nJTJaRni5ShBaXZ4CztVSBMF0kdhe6QsURFDlFQvNs,67267
249
253
  letta_client/tools/raw_client.py,sha256=gO2SEYDK3TPXR4wosGtFl-fzt5McTcESN6fO9buLciQ,113641
@@ -580,6 +584,6 @@ letta_client/version.py,sha256=bttKLbIhO3UonCYQlqs600zzbQgfhCCMjeXR9WRzid4,79
580
584
  letta_client/voice/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
581
585
  letta_client/voice/client.py,sha256=EbIVOQh4HXqU9McATxwga08STk-HUwPEAUr_UHqyKHg,3748
582
586
  letta_client/voice/raw_client.py,sha256=KvM_3GXuSf51bubM0RVBnxvlf20qZTFMnaA_BzhXzjQ,5938
583
- letta_client-0.1.307.dist-info/METADATA,sha256=RlrUsBamy-O5VpgLvGZlv3uyUe4FKqWoArAayHAV66Q,5782
584
- letta_client-0.1.307.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
585
- letta_client-0.1.307.dist-info/RECORD,,
587
+ letta_client-0.1.309.dist-info/METADATA,sha256=W3_nfTYQVulj7OQn8Jeo7_g6f00kYUwHhXJ5Gl33YwY,5782
588
+ letta_client-0.1.309.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
589
+ letta_client-0.1.309.dist-info/RECORD,,