letta-client 0.1.121__py3-none-any.whl → 0.1.122__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.

Files changed (50) hide show
  1. letta_client/__init__.py +7 -6
  2. letta_client/agents/__init__.py +2 -1
  3. letta_client/agents/client.py +90 -581
  4. letta_client/agents/groups/client.py +167 -0
  5. letta_client/agents/messages/client.py +145 -0
  6. letta_client/agents/passages/client.py +289 -0
  7. letta_client/base_client.py +12 -0
  8. letta_client/batches/__init__.py +2 -0
  9. letta_client/{messages/batches → batches}/client.py +19 -19
  10. letta_client/blocks/__init__.py +3 -0
  11. letta_client/blocks/agents/__init__.py +2 -0
  12. letta_client/blocks/agents/client.py +149 -0
  13. letta_client/blocks/client.py +4 -127
  14. letta_client/core/client_wrapper.py +1 -1
  15. letta_client/embeddings/__init__.py +2 -0
  16. letta_client/embeddings/client.py +108 -0
  17. letta_client/groups/client.py +0 -124
  18. letta_client/groups/messages/client.py +124 -0
  19. letta_client/identities/__init__.py +3 -0
  20. letta_client/identities/client.py +4 -154
  21. letta_client/identities/properties/__init__.py +2 -0
  22. letta_client/identities/properties/client.py +181 -0
  23. letta_client/messages/__init__.py +0 -3
  24. letta_client/messages/client.py +0 -4
  25. letta_client/models/client.py +4 -97
  26. letta_client/providers/client.py +173 -10
  27. letta_client/runs/__init__.py +3 -0
  28. letta_client/runs/client.py +34 -480
  29. letta_client/runs/messages/__init__.py +2 -0
  30. letta_client/runs/messages/client.py +234 -0
  31. letta_client/runs/steps/__init__.py +2 -0
  32. letta_client/runs/steps/client.py +217 -0
  33. letta_client/runs/usage/__init__.py +2 -0
  34. letta_client/runs/usage/client.py +145 -0
  35. letta_client/sources/client.py +6 -4
  36. letta_client/steps/client.py +78 -4
  37. letta_client/tags/__init__.py +2 -0
  38. letta_client/tags/client.py +92 -0
  39. letta_client/templates/__init__.py +5 -6
  40. letta_client/templates/agents/__init__.py +5 -0
  41. letta_client/templates/agents/client.py +208 -0
  42. letta_client/templates/agents/types/__init__.py +5 -0
  43. letta_client/templates/{types/templates_create_agents_response.py → agents/types/agents_create_response.py} +4 -4
  44. letta_client/templates/client.py +6 -191
  45. letta_client/templates/types/__init__.py +1 -6
  46. letta_client/tools/client.py +4 -4
  47. {letta_client-0.1.121.dist-info → letta_client-0.1.122.dist-info}/METADATA +1 -1
  48. {letta_client-0.1.121.dist-info → letta_client-0.1.122.dist-info}/RECORD +50 -31
  49. /letta_client/{messages/batches → agents/groups}/__init__.py +0 -0
  50. {letta_client-0.1.121.dist-info → letta_client-0.1.122.dist-info}/WHEEL +0 -0
@@ -0,0 +1,234 @@
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 ...types.message_role import MessageRole
6
+ from ...core.request_options import RequestOptions
7
+ from ...types.letta_message_union import LettaMessageUnion
8
+ from ...core.jsonable_encoder import jsonable_encoder
9
+ from ...core.unchecked_base_model import construct_type
10
+ from ...errors.unprocessable_entity_error import UnprocessableEntityError
11
+ from ...types.http_validation_error import HttpValidationError
12
+ from json.decoder import JSONDecodeError
13
+ from ...core.api_error import ApiError
14
+ from ...core.client_wrapper import AsyncClientWrapper
15
+
16
+
17
+ class MessagesClient:
18
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
19
+ self._client_wrapper = client_wrapper
20
+
21
+ def list(
22
+ self,
23
+ run_id: str,
24
+ *,
25
+ before: typing.Optional[str] = None,
26
+ after: typing.Optional[str] = None,
27
+ limit: typing.Optional[int] = None,
28
+ order: typing.Optional[str] = None,
29
+ role: typing.Optional[MessageRole] = None,
30
+ request_options: typing.Optional[RequestOptions] = None,
31
+ ) -> typing.List[LettaMessageUnion]:
32
+ """
33
+ Get messages associated with a run with filtering options.
34
+
35
+ Args:
36
+ run_id: ID of the run
37
+ before: A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.
38
+ after: A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
39
+ limit: Maximum number of messages to return
40
+ order: Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.
41
+ role: Filter by role (user/assistant/system/tool)
42
+ return_message_object: Whether to return Message objects or LettaMessage objects
43
+ user_id: ID of the user making the request
44
+
45
+ Returns:
46
+ A list of messages associated with the run. Default is List[LettaMessage].
47
+
48
+ Parameters
49
+ ----------
50
+ run_id : str
51
+
52
+ before : typing.Optional[str]
53
+ Cursor for pagination
54
+
55
+ after : typing.Optional[str]
56
+ Cursor for pagination
57
+
58
+ limit : typing.Optional[int]
59
+ Maximum number of messages to return
60
+
61
+ order : typing.Optional[str]
62
+ Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.
63
+
64
+ role : typing.Optional[MessageRole]
65
+ Filter by role
66
+
67
+ request_options : typing.Optional[RequestOptions]
68
+ Request-specific configuration.
69
+
70
+ Returns
71
+ -------
72
+ typing.List[LettaMessageUnion]
73
+ Successful Response
74
+
75
+ Examples
76
+ --------
77
+ from letta_client import Letta
78
+
79
+ client = Letta(
80
+ token="YOUR_TOKEN",
81
+ )
82
+ client.runs.messages.list(
83
+ run_id="run_id",
84
+ )
85
+ """
86
+ _response = self._client_wrapper.httpx_client.request(
87
+ f"v1/runs/{jsonable_encoder(run_id)}/messages",
88
+ method="GET",
89
+ params={
90
+ "before": before,
91
+ "after": after,
92
+ "limit": limit,
93
+ "order": order,
94
+ "role": role,
95
+ },
96
+ request_options=request_options,
97
+ )
98
+ try:
99
+ if 200 <= _response.status_code < 300:
100
+ return typing.cast(
101
+ typing.List[LettaMessageUnion],
102
+ construct_type(
103
+ type_=typing.List[LettaMessageUnion], # type: ignore
104
+ object_=_response.json(),
105
+ ),
106
+ )
107
+ if _response.status_code == 422:
108
+ raise UnprocessableEntityError(
109
+ typing.cast(
110
+ HttpValidationError,
111
+ construct_type(
112
+ type_=HttpValidationError, # type: ignore
113
+ object_=_response.json(),
114
+ ),
115
+ )
116
+ )
117
+ _response_json = _response.json()
118
+ except JSONDecodeError:
119
+ raise ApiError(status_code=_response.status_code, body=_response.text)
120
+ raise ApiError(status_code=_response.status_code, body=_response_json)
121
+
122
+
123
+ class AsyncMessagesClient:
124
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
125
+ self._client_wrapper = client_wrapper
126
+
127
+ async def list(
128
+ self,
129
+ run_id: str,
130
+ *,
131
+ before: typing.Optional[str] = None,
132
+ after: typing.Optional[str] = None,
133
+ limit: typing.Optional[int] = None,
134
+ order: typing.Optional[str] = None,
135
+ role: typing.Optional[MessageRole] = None,
136
+ request_options: typing.Optional[RequestOptions] = None,
137
+ ) -> typing.List[LettaMessageUnion]:
138
+ """
139
+ Get messages associated with a run with filtering options.
140
+
141
+ Args:
142
+ run_id: ID of the run
143
+ before: A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.
144
+ after: A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
145
+ limit: Maximum number of messages to return
146
+ order: Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.
147
+ role: Filter by role (user/assistant/system/tool)
148
+ return_message_object: Whether to return Message objects or LettaMessage objects
149
+ user_id: ID of the user making the request
150
+
151
+ Returns:
152
+ A list of messages associated with the run. Default is List[LettaMessage].
153
+
154
+ Parameters
155
+ ----------
156
+ run_id : str
157
+
158
+ before : typing.Optional[str]
159
+ Cursor for pagination
160
+
161
+ after : typing.Optional[str]
162
+ Cursor for pagination
163
+
164
+ limit : typing.Optional[int]
165
+ Maximum number of messages to return
166
+
167
+ order : typing.Optional[str]
168
+ Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.
169
+
170
+ role : typing.Optional[MessageRole]
171
+ Filter by role
172
+
173
+ request_options : typing.Optional[RequestOptions]
174
+ Request-specific configuration.
175
+
176
+ Returns
177
+ -------
178
+ typing.List[LettaMessageUnion]
179
+ Successful Response
180
+
181
+ Examples
182
+ --------
183
+ import asyncio
184
+
185
+ from letta_client import AsyncLetta
186
+
187
+ client = AsyncLetta(
188
+ token="YOUR_TOKEN",
189
+ )
190
+
191
+
192
+ async def main() -> None:
193
+ await client.runs.messages.list(
194
+ run_id="run_id",
195
+ )
196
+
197
+
198
+ asyncio.run(main())
199
+ """
200
+ _response = await self._client_wrapper.httpx_client.request(
201
+ f"v1/runs/{jsonable_encoder(run_id)}/messages",
202
+ method="GET",
203
+ params={
204
+ "before": before,
205
+ "after": after,
206
+ "limit": limit,
207
+ "order": order,
208
+ "role": role,
209
+ },
210
+ request_options=request_options,
211
+ )
212
+ try:
213
+ if 200 <= _response.status_code < 300:
214
+ return typing.cast(
215
+ typing.List[LettaMessageUnion],
216
+ construct_type(
217
+ type_=typing.List[LettaMessageUnion], # type: ignore
218
+ object_=_response.json(),
219
+ ),
220
+ )
221
+ if _response.status_code == 422:
222
+ raise UnprocessableEntityError(
223
+ typing.cast(
224
+ HttpValidationError,
225
+ construct_type(
226
+ type_=HttpValidationError, # type: ignore
227
+ object_=_response.json(),
228
+ ),
229
+ )
230
+ )
231
+ _response_json = _response.json()
232
+ except JSONDecodeError:
233
+ raise ApiError(status_code=_response.status_code, body=_response.text)
234
+ raise ApiError(status_code=_response.status_code, body=_response_json)
@@ -0,0 +1,2 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
@@ -0,0 +1,217 @@
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.step import Step
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 StepsClient:
17
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
18
+ self._client_wrapper = client_wrapper
19
+
20
+ def list(
21
+ self,
22
+ run_id: str,
23
+ *,
24
+ before: typing.Optional[str] = None,
25
+ after: typing.Optional[str] = None,
26
+ limit: typing.Optional[int] = None,
27
+ order: typing.Optional[str] = None,
28
+ request_options: typing.Optional[RequestOptions] = None,
29
+ ) -> typing.List[Step]:
30
+ """
31
+ Get messages associated with a run with filtering options.
32
+
33
+ Args:
34
+ run_id: ID of the run
35
+ before: A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.
36
+ after: A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
37
+ limit: Maximum number of steps to return
38
+ order: Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.
39
+
40
+ Returns:
41
+ A list of steps associated with the run.
42
+
43
+ Parameters
44
+ ----------
45
+ run_id : str
46
+
47
+ before : typing.Optional[str]
48
+ Cursor for pagination
49
+
50
+ after : typing.Optional[str]
51
+ Cursor for pagination
52
+
53
+ limit : typing.Optional[int]
54
+ Maximum number of messages to return
55
+
56
+ order : typing.Optional[str]
57
+ Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.
58
+
59
+ request_options : typing.Optional[RequestOptions]
60
+ Request-specific configuration.
61
+
62
+ Returns
63
+ -------
64
+ typing.List[Step]
65
+ Successful Response
66
+
67
+ Examples
68
+ --------
69
+ from letta_client import Letta
70
+
71
+ client = Letta(
72
+ token="YOUR_TOKEN",
73
+ )
74
+ client.runs.steps.list(
75
+ run_id="run_id",
76
+ )
77
+ """
78
+ _response = self._client_wrapper.httpx_client.request(
79
+ f"v1/runs/{jsonable_encoder(run_id)}/steps",
80
+ method="GET",
81
+ params={
82
+ "before": before,
83
+ "after": after,
84
+ "limit": limit,
85
+ "order": order,
86
+ },
87
+ request_options=request_options,
88
+ )
89
+ try:
90
+ if 200 <= _response.status_code < 300:
91
+ return typing.cast(
92
+ typing.List[Step],
93
+ construct_type(
94
+ type_=typing.List[Step], # type: ignore
95
+ object_=_response.json(),
96
+ ),
97
+ )
98
+ if _response.status_code == 422:
99
+ raise UnprocessableEntityError(
100
+ typing.cast(
101
+ HttpValidationError,
102
+ construct_type(
103
+ type_=HttpValidationError, # type: ignore
104
+ object_=_response.json(),
105
+ ),
106
+ )
107
+ )
108
+ _response_json = _response.json()
109
+ except JSONDecodeError:
110
+ raise ApiError(status_code=_response.status_code, body=_response.text)
111
+ raise ApiError(status_code=_response.status_code, body=_response_json)
112
+
113
+
114
+ class AsyncStepsClient:
115
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
116
+ self._client_wrapper = client_wrapper
117
+
118
+ async def list(
119
+ self,
120
+ run_id: str,
121
+ *,
122
+ before: typing.Optional[str] = None,
123
+ after: typing.Optional[str] = None,
124
+ limit: typing.Optional[int] = None,
125
+ order: typing.Optional[str] = None,
126
+ request_options: typing.Optional[RequestOptions] = None,
127
+ ) -> typing.List[Step]:
128
+ """
129
+ Get messages associated with a run with filtering options.
130
+
131
+ Args:
132
+ run_id: ID of the run
133
+ before: A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.
134
+ after: A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
135
+ limit: Maximum number of steps to return
136
+ order: Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.
137
+
138
+ Returns:
139
+ A list of steps associated with the run.
140
+
141
+ Parameters
142
+ ----------
143
+ run_id : str
144
+
145
+ before : typing.Optional[str]
146
+ Cursor for pagination
147
+
148
+ after : typing.Optional[str]
149
+ Cursor for pagination
150
+
151
+ limit : typing.Optional[int]
152
+ Maximum number of messages to return
153
+
154
+ order : typing.Optional[str]
155
+ Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.
156
+
157
+ request_options : typing.Optional[RequestOptions]
158
+ Request-specific configuration.
159
+
160
+ Returns
161
+ -------
162
+ typing.List[Step]
163
+ Successful Response
164
+
165
+ Examples
166
+ --------
167
+ import asyncio
168
+
169
+ from letta_client import AsyncLetta
170
+
171
+ client = AsyncLetta(
172
+ token="YOUR_TOKEN",
173
+ )
174
+
175
+
176
+ async def main() -> None:
177
+ await client.runs.steps.list(
178
+ run_id="run_id",
179
+ )
180
+
181
+
182
+ asyncio.run(main())
183
+ """
184
+ _response = await self._client_wrapper.httpx_client.request(
185
+ f"v1/runs/{jsonable_encoder(run_id)}/steps",
186
+ method="GET",
187
+ params={
188
+ "before": before,
189
+ "after": after,
190
+ "limit": limit,
191
+ "order": order,
192
+ },
193
+ request_options=request_options,
194
+ )
195
+ try:
196
+ if 200 <= _response.status_code < 300:
197
+ return typing.cast(
198
+ typing.List[Step],
199
+ construct_type(
200
+ type_=typing.List[Step], # type: ignore
201
+ object_=_response.json(),
202
+ ),
203
+ )
204
+ if _response.status_code == 422:
205
+ raise UnprocessableEntityError(
206
+ typing.cast(
207
+ HttpValidationError,
208
+ construct_type(
209
+ type_=HttpValidationError, # type: ignore
210
+ object_=_response.json(),
211
+ ),
212
+ )
213
+ )
214
+ _response_json = _response.json()
215
+ except JSONDecodeError:
216
+ raise ApiError(status_code=_response.status_code, body=_response.text)
217
+ raise ApiError(status_code=_response.status_code, body=_response_json)
@@ -0,0 +1,2 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
@@ -0,0 +1,145 @@
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.usage_statistics import UsageStatistics
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 UsageClient:
17
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
18
+ self._client_wrapper = client_wrapper
19
+
20
+ def retrieve(self, run_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> UsageStatistics:
21
+ """
22
+ Get usage statistics for a run.
23
+
24
+ Parameters
25
+ ----------
26
+ run_id : str
27
+
28
+ request_options : typing.Optional[RequestOptions]
29
+ Request-specific configuration.
30
+
31
+ Returns
32
+ -------
33
+ UsageStatistics
34
+ Successful Response
35
+
36
+ Examples
37
+ --------
38
+ from letta_client import Letta
39
+
40
+ client = Letta(
41
+ token="YOUR_TOKEN",
42
+ )
43
+ client.runs.usage.retrieve(
44
+ run_id="run_id",
45
+ )
46
+ """
47
+ _response = self._client_wrapper.httpx_client.request(
48
+ f"v1/runs/{jsonable_encoder(run_id)}/usage",
49
+ method="GET",
50
+ request_options=request_options,
51
+ )
52
+ try:
53
+ if 200 <= _response.status_code < 300:
54
+ return typing.cast(
55
+ UsageStatistics,
56
+ construct_type(
57
+ type_=UsageStatistics, # 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 AsyncUsageClient:
78
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
79
+ self._client_wrapper = client_wrapper
80
+
81
+ async def retrieve(
82
+ self, run_id: str, *, request_options: typing.Optional[RequestOptions] = None
83
+ ) -> UsageStatistics:
84
+ """
85
+ Get usage statistics for a run.
86
+
87
+ Parameters
88
+ ----------
89
+ run_id : str
90
+
91
+ request_options : typing.Optional[RequestOptions]
92
+ Request-specific configuration.
93
+
94
+ Returns
95
+ -------
96
+ UsageStatistics
97
+ Successful Response
98
+
99
+ Examples
100
+ --------
101
+ import asyncio
102
+
103
+ from letta_client import AsyncLetta
104
+
105
+ client = AsyncLetta(
106
+ token="YOUR_TOKEN",
107
+ )
108
+
109
+
110
+ async def main() -> None:
111
+ await client.runs.usage.retrieve(
112
+ run_id="run_id",
113
+ )
114
+
115
+
116
+ asyncio.run(main())
117
+ """
118
+ _response = await self._client_wrapper.httpx_client.request(
119
+ f"v1/runs/{jsonable_encoder(run_id)}/usage",
120
+ method="GET",
121
+ request_options=request_options,
122
+ )
123
+ try:
124
+ if 200 <= _response.status_code < 300:
125
+ return typing.cast(
126
+ UsageStatistics,
127
+ construct_type(
128
+ type_=UsageStatistics, # type: ignore
129
+ object_=_response.json(),
130
+ ),
131
+ )
132
+ if _response.status_code == 422:
133
+ raise UnprocessableEntityError(
134
+ typing.cast(
135
+ HttpValidationError,
136
+ construct_type(
137
+ type_=HttpValidationError, # type: ignore
138
+ object_=_response.json(),
139
+ ),
140
+ )
141
+ )
142
+ _response_json = _response.json()
143
+ except JSONDecodeError:
144
+ raise ApiError(status_code=_response.status_code, body=_response.text)
145
+ raise ApiError(status_code=_response.status_code, body=_response_json)
@@ -231,7 +231,7 @@ class SourcesClient:
231
231
  raise ApiError(status_code=_response.status_code, body=_response.text)
232
232
  raise ApiError(status_code=_response.status_code, body=_response_json)
233
233
 
234
- def get_by_name(self, source_name: str, *, request_options: typing.Optional[RequestOptions] = None) -> str:
234
+ def retrieve_by_name(self, source_name: str, *, request_options: typing.Optional[RequestOptions] = None) -> str:
235
235
  """
236
236
  Get a source by name
237
237
 
@@ -254,7 +254,7 @@ class SourcesClient:
254
254
  client = Letta(
255
255
  token="YOUR_TOKEN",
256
256
  )
257
- client.sources.get_by_name(
257
+ client.sources.retrieve_by_name(
258
258
  source_name="source_name",
259
259
  )
260
260
  """
@@ -669,7 +669,9 @@ class AsyncSourcesClient:
669
669
  raise ApiError(status_code=_response.status_code, body=_response.text)
670
670
  raise ApiError(status_code=_response.status_code, body=_response_json)
671
671
 
672
- async def get_by_name(self, source_name: str, *, request_options: typing.Optional[RequestOptions] = None) -> str:
672
+ async def retrieve_by_name(
673
+ self, source_name: str, *, request_options: typing.Optional[RequestOptions] = None
674
+ ) -> str:
673
675
  """
674
676
  Get a source by name
675
677
 
@@ -697,7 +699,7 @@ class AsyncSourcesClient:
697
699
 
698
700
 
699
701
  async def main() -> None:
700
- await client.sources.get_by_name(
702
+ await client.sources.retrieve_by_name(
701
703
  source_name="source_name",
702
704
  )
703
705