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

@@ -516,6 +516,7 @@ class AgentsClient:
516
516
  self,
517
517
  *,
518
518
  file: core.File,
519
+ override_embedding_model: typing.Optional[str] = None,
519
520
  append_copy_suffix: typing.Optional[bool] = OMIT,
520
521
  override_existing_tools: typing.Optional[bool] = OMIT,
521
522
  override_embedding_handle: typing.Optional[str] = OMIT,
@@ -533,6 +534,8 @@ class AgentsClient:
533
534
  file : core.File
534
535
  See core.File for more documentation
535
536
 
537
+ override_embedding_model : typing.Optional[str]
538
+
536
539
  append_copy_suffix : typing.Optional[bool]
537
540
  If set to True, appends "_copy" to the end of the agent name.
538
541
 
@@ -571,6 +574,7 @@ class AgentsClient:
571
574
  """
572
575
  _response = self._raw_client.import_file(
573
576
  file=file,
577
+ override_embedding_model=override_embedding_model,
574
578
  append_copy_suffix=append_copy_suffix,
575
579
  override_existing_tools=override_existing_tools,
576
580
  override_embedding_handle=override_embedding_handle,
@@ -1504,6 +1508,7 @@ class AsyncAgentsClient:
1504
1508
  self,
1505
1509
  *,
1506
1510
  file: core.File,
1511
+ override_embedding_model: typing.Optional[str] = None,
1507
1512
  append_copy_suffix: typing.Optional[bool] = OMIT,
1508
1513
  override_existing_tools: typing.Optional[bool] = OMIT,
1509
1514
  override_embedding_handle: typing.Optional[str] = OMIT,
@@ -1521,6 +1526,8 @@ class AsyncAgentsClient:
1521
1526
  file : core.File
1522
1527
  See core.File for more documentation
1523
1528
 
1529
+ override_embedding_model : typing.Optional[str]
1530
+
1524
1531
  append_copy_suffix : typing.Optional[bool]
1525
1532
  If set to True, appends "_copy" to the end of the agent name.
1526
1533
 
@@ -1567,6 +1574,7 @@ class AsyncAgentsClient:
1567
1574
  """
1568
1575
  _response = await self._raw_client.import_file(
1569
1576
  file=file,
1577
+ override_embedding_model=override_embedding_model,
1570
1578
  append_copy_suffix=append_copy_suffix,
1571
1579
  override_existing_tools=override_existing_tools,
1572
1580
  override_embedding_handle=override_embedding_handle,
@@ -5,7 +5,6 @@ import typing
5
5
 
6
6
  from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
7
7
  from ...core.request_options import RequestOptions
8
- from ...types.embedding_config import EmbeddingConfig
9
8
  from ...types.passage import Passage
10
9
  from .raw_client import AsyncRawPassagesClient, RawPassagesClient
11
10
 
@@ -93,7 +92,13 @@ class PassagesClient:
93
92
  return _response.data
94
93
 
95
94
  def create(
96
- self, agent_id: str, *, text: str, request_options: typing.Optional[RequestOptions] = None
95
+ self,
96
+ agent_id: str,
97
+ *,
98
+ text: str,
99
+ tags: typing.Optional[typing.Sequence[str]] = OMIT,
100
+ created_at: typing.Optional[dt.datetime] = OMIT,
101
+ request_options: typing.Optional[RequestOptions] = None,
97
102
  ) -> typing.List[Passage]:
98
103
  """
99
104
  Insert a memory into an agent's archival memory store.
@@ -105,6 +110,12 @@ class PassagesClient:
105
110
  text : str
106
111
  Text to write to archival memory.
107
112
 
113
+ tags : typing.Optional[typing.Sequence[str]]
114
+ Optional list of tags to attach to the memory.
115
+
116
+ created_at : typing.Optional[dt.datetime]
117
+ Optional timestamp for the memory (defaults to current UTC time).
118
+
108
119
  request_options : typing.Optional[RequestOptions]
109
120
  Request-specific configuration.
110
121
 
@@ -126,7 +137,9 @@ class PassagesClient:
126
137
  text="text",
127
138
  )
128
139
  """
129
- _response = self._raw_client.create(agent_id, text=text, request_options=request_options)
140
+ _response = self._raw_client.create(
141
+ agent_id, text=text, tags=tags, created_at=created_at, request_options=request_options
142
+ )
130
143
  return _response.data
131
144
 
132
145
  def delete(
@@ -165,85 +178,20 @@ class PassagesClient:
165
178
  _response = self._raw_client.delete(agent_id, memory_id, request_options=request_options)
166
179
  return _response.data
167
180
 
168
- def modify(
169
- self,
170
- agent_id: str,
171
- memory_id: str,
172
- *,
173
- id: str,
174
- created_by_id: typing.Optional[str] = OMIT,
175
- last_updated_by_id: typing.Optional[str] = OMIT,
176
- created_at: typing.Optional[dt.datetime] = OMIT,
177
- updated_at: typing.Optional[dt.datetime] = OMIT,
178
- is_deleted: typing.Optional[bool] = OMIT,
179
- archive_id: typing.Optional[str] = OMIT,
180
- source_id: typing.Optional[str] = OMIT,
181
- file_id: typing.Optional[str] = OMIT,
182
- file_name: typing.Optional[str] = OMIT,
183
- metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
184
- text: typing.Optional[str] = OMIT,
185
- embedding: typing.Optional[typing.Sequence[float]] = OMIT,
186
- embedding_config: typing.Optional[EmbeddingConfig] = OMIT,
187
- request_options: typing.Optional[RequestOptions] = None,
188
- ) -> typing.List[Passage]:
181
+ def modify(self, agent_id: str, memory_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None:
189
182
  """
190
- Modify a memory in the agent's archival memory store.
191
-
192
183
  Parameters
193
184
  ----------
194
185
  agent_id : str
195
186
 
196
187
  memory_id : str
197
188
 
198
- id : str
199
- The unique identifier of the passage.
200
-
201
- created_by_id : typing.Optional[str]
202
- The id of the user that made this object.
203
-
204
- last_updated_by_id : typing.Optional[str]
205
- The id of the user that made this object.
206
-
207
- created_at : typing.Optional[dt.datetime]
208
- The timestamp when the object was created.
209
-
210
- updated_at : typing.Optional[dt.datetime]
211
- The timestamp when the object was last updated.
212
-
213
- is_deleted : typing.Optional[bool]
214
- Whether this passage is deleted or not.
215
-
216
- archive_id : typing.Optional[str]
217
- The unique identifier of the archive containing this passage.
218
-
219
- source_id : typing.Optional[str]
220
- The data source of the passage.
221
-
222
- file_id : typing.Optional[str]
223
- The unique identifier of the file associated with the passage.
224
-
225
- file_name : typing.Optional[str]
226
- The name of the file (only for source passages).
227
-
228
- metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
229
- The metadata of the passage.
230
-
231
- text : typing.Optional[str]
232
- The text of the passage.
233
-
234
- embedding : typing.Optional[typing.Sequence[float]]
235
- The embedding of the passage.
236
-
237
- embedding_config : typing.Optional[EmbeddingConfig]
238
- The embedding configuration used by the passage.
239
-
240
189
  request_options : typing.Optional[RequestOptions]
241
190
  Request-specific configuration.
242
191
 
243
192
  Returns
244
193
  -------
245
- typing.List[Passage]
246
- Successful Response
194
+ None
247
195
 
248
196
  Examples
249
197
  --------
@@ -256,28 +204,9 @@ class PassagesClient:
256
204
  client.agents.passages.modify(
257
205
  agent_id="agent_id",
258
206
  memory_id="memory_id",
259
- id="id",
260
207
  )
261
208
  """
262
- _response = self._raw_client.modify(
263
- agent_id,
264
- memory_id,
265
- id=id,
266
- created_by_id=created_by_id,
267
- last_updated_by_id=last_updated_by_id,
268
- created_at=created_at,
269
- updated_at=updated_at,
270
- is_deleted=is_deleted,
271
- archive_id=archive_id,
272
- source_id=source_id,
273
- file_id=file_id,
274
- file_name=file_name,
275
- metadata=metadata,
276
- text=text,
277
- embedding=embedding,
278
- embedding_config=embedding_config,
279
- request_options=request_options,
280
- )
209
+ _response = self._raw_client.modify(agent_id, memory_id, request_options=request_options)
281
210
  return _response.data
282
211
 
283
212
 
@@ -369,7 +298,13 @@ class AsyncPassagesClient:
369
298
  return _response.data
370
299
 
371
300
  async def create(
372
- self, agent_id: str, *, text: str, request_options: typing.Optional[RequestOptions] = None
301
+ self,
302
+ agent_id: str,
303
+ *,
304
+ text: str,
305
+ tags: typing.Optional[typing.Sequence[str]] = OMIT,
306
+ created_at: typing.Optional[dt.datetime] = OMIT,
307
+ request_options: typing.Optional[RequestOptions] = None,
373
308
  ) -> typing.List[Passage]:
374
309
  """
375
310
  Insert a memory into an agent's archival memory store.
@@ -381,6 +316,12 @@ class AsyncPassagesClient:
381
316
  text : str
382
317
  Text to write to archival memory.
383
318
 
319
+ tags : typing.Optional[typing.Sequence[str]]
320
+ Optional list of tags to attach to the memory.
321
+
322
+ created_at : typing.Optional[dt.datetime]
323
+ Optional timestamp for the memory (defaults to current UTC time).
324
+
384
325
  request_options : typing.Optional[RequestOptions]
385
326
  Request-specific configuration.
386
327
 
@@ -410,7 +351,9 @@ class AsyncPassagesClient:
410
351
 
411
352
  asyncio.run(main())
412
353
  """
413
- _response = await self._raw_client.create(agent_id, text=text, request_options=request_options)
354
+ _response = await self._raw_client.create(
355
+ agent_id, text=text, tags=tags, created_at=created_at, request_options=request_options
356
+ )
414
357
  return _response.data
415
358
 
416
359
  async def delete(
@@ -458,84 +401,21 @@ class AsyncPassagesClient:
458
401
  return _response.data
459
402
 
460
403
  async def modify(
461
- self,
462
- agent_id: str,
463
- memory_id: str,
464
- *,
465
- id: str,
466
- created_by_id: typing.Optional[str] = OMIT,
467
- last_updated_by_id: typing.Optional[str] = OMIT,
468
- created_at: typing.Optional[dt.datetime] = OMIT,
469
- updated_at: typing.Optional[dt.datetime] = OMIT,
470
- is_deleted: typing.Optional[bool] = OMIT,
471
- archive_id: typing.Optional[str] = OMIT,
472
- source_id: typing.Optional[str] = OMIT,
473
- file_id: typing.Optional[str] = OMIT,
474
- file_name: typing.Optional[str] = OMIT,
475
- metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
476
- text: typing.Optional[str] = OMIT,
477
- embedding: typing.Optional[typing.Sequence[float]] = OMIT,
478
- embedding_config: typing.Optional[EmbeddingConfig] = OMIT,
479
- request_options: typing.Optional[RequestOptions] = None,
480
- ) -> typing.List[Passage]:
404
+ self, agent_id: str, memory_id: str, *, request_options: typing.Optional[RequestOptions] = None
405
+ ) -> None:
481
406
  """
482
- Modify a memory in the agent's archival memory store.
483
-
484
407
  Parameters
485
408
  ----------
486
409
  agent_id : str
487
410
 
488
411
  memory_id : str
489
412
 
490
- id : str
491
- The unique identifier of the passage.
492
-
493
- created_by_id : typing.Optional[str]
494
- The id of the user that made this object.
495
-
496
- last_updated_by_id : typing.Optional[str]
497
- The id of the user that made this object.
498
-
499
- created_at : typing.Optional[dt.datetime]
500
- The timestamp when the object was created.
501
-
502
- updated_at : typing.Optional[dt.datetime]
503
- The timestamp when the object was last updated.
504
-
505
- is_deleted : typing.Optional[bool]
506
- Whether this passage is deleted or not.
507
-
508
- archive_id : typing.Optional[str]
509
- The unique identifier of the archive containing this passage.
510
-
511
- source_id : typing.Optional[str]
512
- The data source of the passage.
513
-
514
- file_id : typing.Optional[str]
515
- The unique identifier of the file associated with the passage.
516
-
517
- file_name : typing.Optional[str]
518
- The name of the file (only for source passages).
519
-
520
- metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
521
- The metadata of the passage.
522
-
523
- text : typing.Optional[str]
524
- The text of the passage.
525
-
526
- embedding : typing.Optional[typing.Sequence[float]]
527
- The embedding of the passage.
528
-
529
- embedding_config : typing.Optional[EmbeddingConfig]
530
- The embedding configuration used by the passage.
531
-
532
413
  request_options : typing.Optional[RequestOptions]
533
414
  Request-specific configuration.
534
415
 
535
416
  Returns
536
417
  -------
537
- typing.List[Passage]
538
- Successful Response
418
+ None
539
419
 
540
420
  Examples
541
421
  --------
@@ -553,29 +433,10 @@ class AsyncPassagesClient:
553
433
  await client.agents.passages.modify(
554
434
  agent_id="agent_id",
555
435
  memory_id="memory_id",
556
- id="id",
557
436
  )
558
437
 
559
438
 
560
439
  asyncio.run(main())
561
440
  """
562
- _response = await self._raw_client.modify(
563
- agent_id,
564
- memory_id,
565
- id=id,
566
- created_by_id=created_by_id,
567
- last_updated_by_id=last_updated_by_id,
568
- created_at=created_at,
569
- updated_at=updated_at,
570
- is_deleted=is_deleted,
571
- archive_id=archive_id,
572
- source_id=source_id,
573
- file_id=file_id,
574
- file_name=file_name,
575
- metadata=metadata,
576
- text=text,
577
- embedding=embedding,
578
- embedding_config=embedding_config,
579
- request_options=request_options,
580
- )
441
+ _response = await self._raw_client.modify(agent_id, memory_id, request_options=request_options)
581
442
  return _response.data
@@ -9,10 +9,8 @@ from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
9
9
  from ...core.http_response import AsyncHttpResponse, HttpResponse
10
10
  from ...core.jsonable_encoder import jsonable_encoder
11
11
  from ...core.request_options import RequestOptions
12
- from ...core.serialization import convert_and_respect_annotation_metadata
13
12
  from ...core.unchecked_base_model import construct_type
14
13
  from ...errors.unprocessable_entity_error import UnprocessableEntityError
15
- from ...types.embedding_config import EmbeddingConfig
16
14
  from ...types.http_validation_error import HttpValidationError
17
15
  from ...types.passage import Passage
18
16
 
@@ -104,7 +102,13 @@ class RawPassagesClient:
104
102
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
105
103
 
106
104
  def create(
107
- self, agent_id: str, *, text: str, request_options: typing.Optional[RequestOptions] = None
105
+ self,
106
+ agent_id: str,
107
+ *,
108
+ text: str,
109
+ tags: typing.Optional[typing.Sequence[str]] = OMIT,
110
+ created_at: typing.Optional[dt.datetime] = OMIT,
111
+ request_options: typing.Optional[RequestOptions] = None,
108
112
  ) -> HttpResponse[typing.List[Passage]]:
109
113
  """
110
114
  Insert a memory into an agent's archival memory store.
@@ -116,6 +120,12 @@ class RawPassagesClient:
116
120
  text : str
117
121
  Text to write to archival memory.
118
122
 
123
+ tags : typing.Optional[typing.Sequence[str]]
124
+ Optional list of tags to attach to the memory.
125
+
126
+ created_at : typing.Optional[dt.datetime]
127
+ Optional timestamp for the memory (defaults to current UTC time).
128
+
119
129
  request_options : typing.Optional[RequestOptions]
120
130
  Request-specific configuration.
121
131
 
@@ -129,6 +139,8 @@ class RawPassagesClient:
129
139
  method="POST",
130
140
  json={
131
141
  "text": text,
142
+ "tags": tags,
143
+ "created_at": created_at,
132
144
  },
133
145
  headers={
134
146
  "content-type": "application/json",
@@ -216,133 +228,30 @@ class RawPassagesClient:
216
228
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
217
229
 
218
230
  def modify(
219
- self,
220
- agent_id: str,
221
- memory_id: str,
222
- *,
223
- id: str,
224
- created_by_id: typing.Optional[str] = OMIT,
225
- last_updated_by_id: typing.Optional[str] = OMIT,
226
- created_at: typing.Optional[dt.datetime] = OMIT,
227
- updated_at: typing.Optional[dt.datetime] = OMIT,
228
- is_deleted: typing.Optional[bool] = OMIT,
229
- archive_id: typing.Optional[str] = OMIT,
230
- source_id: typing.Optional[str] = OMIT,
231
- file_id: typing.Optional[str] = OMIT,
232
- file_name: typing.Optional[str] = OMIT,
233
- metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
234
- text: typing.Optional[str] = OMIT,
235
- embedding: typing.Optional[typing.Sequence[float]] = OMIT,
236
- embedding_config: typing.Optional[EmbeddingConfig] = OMIT,
237
- request_options: typing.Optional[RequestOptions] = None,
238
- ) -> HttpResponse[typing.List[Passage]]:
231
+ self, agent_id: str, memory_id: str, *, request_options: typing.Optional[RequestOptions] = None
232
+ ) -> HttpResponse[None]:
239
233
  """
240
- Modify a memory in the agent's archival memory store.
241
-
242
234
  Parameters
243
235
  ----------
244
236
  agent_id : str
245
237
 
246
238
  memory_id : str
247
239
 
248
- id : str
249
- The unique identifier of the passage.
250
-
251
- created_by_id : typing.Optional[str]
252
- The id of the user that made this object.
253
-
254
- last_updated_by_id : typing.Optional[str]
255
- The id of the user that made this object.
256
-
257
- created_at : typing.Optional[dt.datetime]
258
- The timestamp when the object was created.
259
-
260
- updated_at : typing.Optional[dt.datetime]
261
- The timestamp when the object was last updated.
262
-
263
- is_deleted : typing.Optional[bool]
264
- Whether this passage is deleted or not.
265
-
266
- archive_id : typing.Optional[str]
267
- The unique identifier of the archive containing this passage.
268
-
269
- source_id : typing.Optional[str]
270
- The data source of the passage.
271
-
272
- file_id : typing.Optional[str]
273
- The unique identifier of the file associated with the passage.
274
-
275
- file_name : typing.Optional[str]
276
- The name of the file (only for source passages).
277
-
278
- metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
279
- The metadata of the passage.
280
-
281
- text : typing.Optional[str]
282
- The text of the passage.
283
-
284
- embedding : typing.Optional[typing.Sequence[float]]
285
- The embedding of the passage.
286
-
287
- embedding_config : typing.Optional[EmbeddingConfig]
288
- The embedding configuration used by the passage.
289
-
290
240
  request_options : typing.Optional[RequestOptions]
291
241
  Request-specific configuration.
292
242
 
293
243
  Returns
294
244
  -------
295
- HttpResponse[typing.List[Passage]]
296
- Successful Response
245
+ HttpResponse[None]
297
246
  """
298
247
  _response = self._client_wrapper.httpx_client.request(
299
248
  f"v1/agents/{jsonable_encoder(agent_id)}/archival-memory/{jsonable_encoder(memory_id)}",
300
249
  method="PATCH",
301
- json={
302
- "created_by_id": created_by_id,
303
- "last_updated_by_id": last_updated_by_id,
304
- "created_at": created_at,
305
- "updated_at": updated_at,
306
- "is_deleted": is_deleted,
307
- "archive_id": archive_id,
308
- "source_id": source_id,
309
- "file_id": file_id,
310
- "file_name": file_name,
311
- "metadata_": metadata,
312
- "text": text,
313
- "embedding": embedding,
314
- "embedding_config": convert_and_respect_annotation_metadata(
315
- object_=embedding_config, annotation=EmbeddingConfig, direction="write"
316
- ),
317
- "id": id,
318
- },
319
- headers={
320
- "content-type": "application/json",
321
- },
322
250
  request_options=request_options,
323
- omit=OMIT,
324
251
  )
325
252
  try:
326
253
  if 200 <= _response.status_code < 300:
327
- _data = typing.cast(
328
- typing.List[Passage],
329
- construct_type(
330
- type_=typing.List[Passage], # type: ignore
331
- object_=_response.json(),
332
- ),
333
- )
334
- return HttpResponse(response=_response, data=_data)
335
- if _response.status_code == 422:
336
- raise UnprocessableEntityError(
337
- headers=dict(_response.headers),
338
- body=typing.cast(
339
- HttpValidationError,
340
- construct_type(
341
- type_=HttpValidationError, # type: ignore
342
- object_=_response.json(),
343
- ),
344
- ),
345
- )
254
+ return HttpResponse(response=_response, data=None)
346
255
  _response_json = _response.json()
347
256
  except JSONDecodeError:
348
257
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
@@ -433,7 +342,13 @@ class AsyncRawPassagesClient:
433
342
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
434
343
 
435
344
  async def create(
436
- self, agent_id: str, *, text: str, request_options: typing.Optional[RequestOptions] = None
345
+ self,
346
+ agent_id: str,
347
+ *,
348
+ text: str,
349
+ tags: typing.Optional[typing.Sequence[str]] = OMIT,
350
+ created_at: typing.Optional[dt.datetime] = OMIT,
351
+ request_options: typing.Optional[RequestOptions] = None,
437
352
  ) -> AsyncHttpResponse[typing.List[Passage]]:
438
353
  """
439
354
  Insert a memory into an agent's archival memory store.
@@ -445,6 +360,12 @@ class AsyncRawPassagesClient:
445
360
  text : str
446
361
  Text to write to archival memory.
447
362
 
363
+ tags : typing.Optional[typing.Sequence[str]]
364
+ Optional list of tags to attach to the memory.
365
+
366
+ created_at : typing.Optional[dt.datetime]
367
+ Optional timestamp for the memory (defaults to current UTC time).
368
+
448
369
  request_options : typing.Optional[RequestOptions]
449
370
  Request-specific configuration.
450
371
 
@@ -458,6 +379,8 @@ class AsyncRawPassagesClient:
458
379
  method="POST",
459
380
  json={
460
381
  "text": text,
382
+ "tags": tags,
383
+ "created_at": created_at,
461
384
  },
462
385
  headers={
463
386
  "content-type": "application/json",
@@ -545,133 +468,30 @@ class AsyncRawPassagesClient:
545
468
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
546
469
 
547
470
  async def modify(
548
- self,
549
- agent_id: str,
550
- memory_id: str,
551
- *,
552
- id: str,
553
- created_by_id: typing.Optional[str] = OMIT,
554
- last_updated_by_id: typing.Optional[str] = OMIT,
555
- created_at: typing.Optional[dt.datetime] = OMIT,
556
- updated_at: typing.Optional[dt.datetime] = OMIT,
557
- is_deleted: typing.Optional[bool] = OMIT,
558
- archive_id: typing.Optional[str] = OMIT,
559
- source_id: typing.Optional[str] = OMIT,
560
- file_id: typing.Optional[str] = OMIT,
561
- file_name: typing.Optional[str] = OMIT,
562
- metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
563
- text: typing.Optional[str] = OMIT,
564
- embedding: typing.Optional[typing.Sequence[float]] = OMIT,
565
- embedding_config: typing.Optional[EmbeddingConfig] = OMIT,
566
- request_options: typing.Optional[RequestOptions] = None,
567
- ) -> AsyncHttpResponse[typing.List[Passage]]:
471
+ self, agent_id: str, memory_id: str, *, request_options: typing.Optional[RequestOptions] = None
472
+ ) -> AsyncHttpResponse[None]:
568
473
  """
569
- Modify a memory in the agent's archival memory store.
570
-
571
474
  Parameters
572
475
  ----------
573
476
  agent_id : str
574
477
 
575
478
  memory_id : str
576
479
 
577
- id : str
578
- The unique identifier of the passage.
579
-
580
- created_by_id : typing.Optional[str]
581
- The id of the user that made this object.
582
-
583
- last_updated_by_id : typing.Optional[str]
584
- The id of the user that made this object.
585
-
586
- created_at : typing.Optional[dt.datetime]
587
- The timestamp when the object was created.
588
-
589
- updated_at : typing.Optional[dt.datetime]
590
- The timestamp when the object was last updated.
591
-
592
- is_deleted : typing.Optional[bool]
593
- Whether this passage is deleted or not.
594
-
595
- archive_id : typing.Optional[str]
596
- The unique identifier of the archive containing this passage.
597
-
598
- source_id : typing.Optional[str]
599
- The data source of the passage.
600
-
601
- file_id : typing.Optional[str]
602
- The unique identifier of the file associated with the passage.
603
-
604
- file_name : typing.Optional[str]
605
- The name of the file (only for source passages).
606
-
607
- metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
608
- The metadata of the passage.
609
-
610
- text : typing.Optional[str]
611
- The text of the passage.
612
-
613
- embedding : typing.Optional[typing.Sequence[float]]
614
- The embedding of the passage.
615
-
616
- embedding_config : typing.Optional[EmbeddingConfig]
617
- The embedding configuration used by the passage.
618
-
619
480
  request_options : typing.Optional[RequestOptions]
620
481
  Request-specific configuration.
621
482
 
622
483
  Returns
623
484
  -------
624
- AsyncHttpResponse[typing.List[Passage]]
625
- Successful Response
485
+ AsyncHttpResponse[None]
626
486
  """
627
487
  _response = await self._client_wrapper.httpx_client.request(
628
488
  f"v1/agents/{jsonable_encoder(agent_id)}/archival-memory/{jsonable_encoder(memory_id)}",
629
489
  method="PATCH",
630
- json={
631
- "created_by_id": created_by_id,
632
- "last_updated_by_id": last_updated_by_id,
633
- "created_at": created_at,
634
- "updated_at": updated_at,
635
- "is_deleted": is_deleted,
636
- "archive_id": archive_id,
637
- "source_id": source_id,
638
- "file_id": file_id,
639
- "file_name": file_name,
640
- "metadata_": metadata,
641
- "text": text,
642
- "embedding": embedding,
643
- "embedding_config": convert_and_respect_annotation_metadata(
644
- object_=embedding_config, annotation=EmbeddingConfig, direction="write"
645
- ),
646
- "id": id,
647
- },
648
- headers={
649
- "content-type": "application/json",
650
- },
651
490
  request_options=request_options,
652
- omit=OMIT,
653
491
  )
654
492
  try:
655
493
  if 200 <= _response.status_code < 300:
656
- _data = typing.cast(
657
- typing.List[Passage],
658
- construct_type(
659
- type_=typing.List[Passage], # type: ignore
660
- object_=_response.json(),
661
- ),
662
- )
663
- return AsyncHttpResponse(response=_response, data=_data)
664
- if _response.status_code == 422:
665
- raise UnprocessableEntityError(
666
- headers=dict(_response.headers),
667
- body=typing.cast(
668
- HttpValidationError,
669
- construct_type(
670
- type_=HttpValidationError, # type: ignore
671
- object_=_response.json(),
672
- ),
673
- ),
674
- )
494
+ return AsyncHttpResponse(response=_response, data=None)
675
495
  _response_json = _response.json()
676
496
  except JSONDecodeError:
677
497
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
@@ -565,6 +565,7 @@ class RawAgentsClient:
565
565
  self,
566
566
  *,
567
567
  file: core.File,
568
+ override_embedding_model: typing.Optional[str] = None,
568
569
  append_copy_suffix: typing.Optional[bool] = OMIT,
569
570
  override_existing_tools: typing.Optional[bool] = OMIT,
570
571
  override_embedding_handle: typing.Optional[str] = OMIT,
@@ -582,6 +583,8 @@ class RawAgentsClient:
582
583
  file : core.File
583
584
  See core.File for more documentation
584
585
 
586
+ override_embedding_model : typing.Optional[str]
587
+
585
588
  append_copy_suffix : typing.Optional[bool]
586
589
  If set to True, appends "_copy" to the end of the agent name.
587
590
 
@@ -622,6 +625,11 @@ class RawAgentsClient:
622
625
  files={
623
626
  "file": file,
624
627
  },
628
+ headers={
629
+ "x-override-embedding-model": str(override_embedding_model)
630
+ if override_embedding_model is not None
631
+ else None,
632
+ },
625
633
  request_options=request_options,
626
634
  omit=OMIT,
627
635
  force_multipart=True,
@@ -1700,6 +1708,7 @@ class AsyncRawAgentsClient:
1700
1708
  self,
1701
1709
  *,
1702
1710
  file: core.File,
1711
+ override_embedding_model: typing.Optional[str] = None,
1703
1712
  append_copy_suffix: typing.Optional[bool] = OMIT,
1704
1713
  override_existing_tools: typing.Optional[bool] = OMIT,
1705
1714
  override_embedding_handle: typing.Optional[str] = OMIT,
@@ -1717,6 +1726,8 @@ class AsyncRawAgentsClient:
1717
1726
  file : core.File
1718
1727
  See core.File for more documentation
1719
1728
 
1729
+ override_embedding_model : typing.Optional[str]
1730
+
1720
1731
  append_copy_suffix : typing.Optional[bool]
1721
1732
  If set to True, appends "_copy" to the end of the agent name.
1722
1733
 
@@ -1757,6 +1768,11 @@ class AsyncRawAgentsClient:
1757
1768
  files={
1758
1769
  "file": file,
1759
1770
  },
1771
+ headers={
1772
+ "x-override-embedding-model": str(override_embedding_model)
1773
+ if override_embedding_model is not None
1774
+ else None,
1775
+ },
1760
1776
  request_options=request_options,
1761
1777
  omit=OMIT,
1762
1778
  force_multipart=True,
@@ -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.291",
27
+ "User-Agent": "letta-client/0.1.293",
28
28
  "X-Fern-Language": "Python",
29
29
  "X-Fern-SDK-Name": "letta-client",
30
- "X-Fern-SDK-Version": "0.1.291",
30
+ "X-Fern-SDK-Version": "0.1.293",
31
31
  **(self.get_custom_headers() or {}),
32
32
  }
33
33
  if self._project is not None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: letta-client
3
- Version: 0.1.291
3
+ Version: 0.1.293
4
4
  Summary:
5
5
  Requires-Python: >=3.8,<4.0
6
6
  Classifier: Intended Audience :: Developers
@@ -3,7 +3,7 @@ letta_client/agents/__init__.py,sha256=mrreK8Hk5PitAA7gomrc2g9EW9idazMGLDTHBAPrR
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
5
5
  letta_client/agents/blocks/raw_client.py,sha256=Cx_85c78oqIOPZIPfCOsIa8WOL2EUNRwXJRGbOqn2AA,25570
6
- letta_client/agents/client.py,sha256=txXN5rtyN6ZArNusnIwuTvLpZkGtD1QAcmmFQQrFD0E,73762
6
+ letta_client/agents/client.py,sha256=Vbp6YR8VGA47BZdPx-sB3TP8ziFqCcR97_NBK54jiF0,74128
7
7
  letta_client/agents/context/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
8
8
  letta_client/agents/context/client.py,sha256=fhpJFWRs6INGreRyEw9gsFnlUWR48vIHbN_jVIHIBrw,3052
9
9
  letta_client/agents/context/raw_client.py,sha256=j2gko-oEFWuCgPkcX9jCv31OWvR6sTOtAYcSWllXYDs,4747
@@ -33,9 +33,9 @@ letta_client/agents/messages/types/messages_modify_request.py,sha256=0NT3pgbqQIt
33
33
  letta_client/agents/messages/types/messages_modify_response.py,sha256=1ZCFf0V0QSwtTPLp2qP-SMXVtgnRqg551G2ImXdECDo,672
34
34
  letta_client/agents/messages/types/messages_preview_raw_payload_request.py,sha256=ncI14H-30FLJujezUyk2yS7Jfqf7TqqhcWejWXQ4pcE,283
35
35
  letta_client/agents/passages/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
36
- letta_client/agents/passages/client.py,sha256=XHPpqOH2BDjHkegTRM9MRdDVxW5VH40ERSFvWchWT48,16785
37
- letta_client/agents/passages/raw_client.py,sha256=TnNrFsnrexrPVmemkFbRIBfFMcq1Iap2qk23L7mr1Z0,25710
38
- letta_client/agents/raw_client.py,sha256=s8Ry5sNnTqwuKdYu3WM5xL_rCGQ0oUseRP0BzIwmM9I,97322
36
+ letta_client/agents/passages/client.py,sha256=AJvkZDBFHBxPxP0acxcZ7ugfv-y32y7wyyJiK-uQch4,11839
37
+ letta_client/agents/passages/raw_client.py,sha256=_LCdUryyZrLYRdZeCmHChcS3nqwUKG4X4369YF3Cops,18644
38
+ letta_client/agents/raw_client.py,sha256=h3USsoctFijFNYUQDi6OdgvpJBtj7a8ekrL58EtsV7A,97954
39
39
  letta_client/agents/sources/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
40
40
  letta_client/agents/sources/client.py,sha256=lCqB6FF9svrwf0oZSFs41WKlMXc-YRhUeb4FZkHbicM,6868
41
41
  letta_client/agents/sources/raw_client.py,sha256=ts4c5UBuXzrHU-lFWWrYniQqrMEc8SN0rfiqNXJLP5Y,12399
@@ -89,7 +89,7 @@ letta_client/client_side_access_tokens/types/client_side_access_tokens_list_clie
89
89
  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
90
90
  letta_client/core/__init__.py,sha256=tpn7rjb6C2UIkYZYIqdrNpI7Yax2jw88sXh2baxaxAI,1715
91
91
  letta_client/core/api_error.py,sha256=44vPoTyWN59gonCIZMdzw7M1uspygiLnr3GNFOoVL2Q,614
92
- letta_client/core/client_wrapper.py,sha256=gV0nEWwpEBvS9vZK596Xs0YJu6X-ymdb4sdwLQF-i6Q,2776
92
+ letta_client/core/client_wrapper.py,sha256=EM4T1dbCbYKzBog8hqvDPwSuQiLUCRlYJar0el1nu84,2776
93
93
  letta_client/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
94
94
  letta_client/core/file.py,sha256=d4NNbX8XvXP32z8KpK2Xovv33nFfruIrpz0QWxlgpZk,2663
95
95
  letta_client/core/force_multipart.py,sha256=awxh5MtcRYe74ehY8U76jzv6fYM_w_D3Rur7KQQzSDk,429
@@ -566,6 +566,6 @@ letta_client/version.py,sha256=bttKLbIhO3UonCYQlqs600zzbQgfhCCMjeXR9WRzid4,79
566
566
  letta_client/voice/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
567
567
  letta_client/voice/client.py,sha256=EbIVOQh4HXqU9McATxwga08STk-HUwPEAUr_UHqyKHg,3748
568
568
  letta_client/voice/raw_client.py,sha256=KvM_3GXuSf51bubM0RVBnxvlf20qZTFMnaA_BzhXzjQ,5938
569
- letta_client-0.1.291.dist-info/METADATA,sha256=qwofn-msHVh-6Do02jW7Sk28tLk7OzTJP0c1VAFVMSw,5782
570
- letta_client-0.1.291.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
571
- letta_client-0.1.291.dist-info/RECORD,,
569
+ letta_client-0.1.293.dist-info/METADATA,sha256=FWl33Kgq1_RdVZzn3L90rrNgA_8gESWR9Fm4Yxps1v4,5782
570
+ letta_client-0.1.293.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
571
+ letta_client-0.1.293.dist-info/RECORD,,