batch_create_memory_records¶
Operation¶
batch_create_memory_records
¶
batch_create_memory_records(request: BatchCreateMemoryRecordsInput | BatchCreateMemoryRecordsInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[BatchCreateMemoryRecordsInputDict]) -> BatchCreateMemoryRecordsOutput
Creates multiple memory records in a single batch operation for the specified memory with custom content.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
BatchCreateMemoryRecordsInput | BatchCreateMemoryRecordsInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
**kwargs
|
Unpack[BatchCreateMemoryRecordsInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
BatchCreateMemoryRecordsOutput
|
An instance of |
batch_create_memory_records
async
¶
batch_create_memory_records(request: BatchCreateMemoryRecordsInput | BatchCreateMemoryRecordsInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[BatchCreateMemoryRecordsInputDict]) -> BatchCreateMemoryRecordsOutput
Creates multiple memory records in a single batch operation for the specified memory with custom content.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
BatchCreateMemoryRecordsInput | BatchCreateMemoryRecordsInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
**kwargs
|
Unpack[BatchCreateMemoryRecordsInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
BatchCreateMemoryRecordsOutput
|
An instance of |
Input¶
Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.
BatchCreateMemoryRecordsInputDict
¶
Bases: TypedDict
Dictionary form of BatchCreateMemoryRecordsInput.
Attributes¶
client_token
instance-attribute
¶
client_token: str | None
A unique, case-sensitive identifier to ensure idempotent processing of the batch request.
This field is autopopulated if not provided.
memory_id
instance-attribute
¶
The unique ID of the memory resource where records will be created.
record_expiry_specification
instance-attribute
¶
record_expiry_specification: RecordExpirySpecification | RecordExpirySpecificationDict | None
The record expiry (long-term memory time-to-live) applied to every
record created by this request. Set recordExpiryDurationDays to the
number of days after which the records expire. Only the expiry provided
here is applied; the records' strategy association has no effect on
their expiry. If you do not provide this value, the records do not
expire. The REMOVE action does not apply when creating records.
records
instance-attribute
¶
A list of memory record creation inputs to be processed in the batch operation.
BatchCreateMemoryRecordsInput
dataclass
¶
Bases: _SerdeShape
Dataclass for BatchCreateMemoryRecordsInput structure.
Attributes¶
client_token
class-attribute
instance-attribute
¶
client_token: str | None = ...
A unique, case-sensitive identifier to ensure idempotent processing of the batch request.
This field is autopopulated if not provided.
memory_id
class-attribute
instance-attribute
¶
memory_id: str | None = ...
The unique ID of the memory resource where records will be created.
record_expiry_specification
class-attribute
instance-attribute
¶
record_expiry_specification: RecordExpirySpecification | None = ...
The record expiry (long-term memory time-to-live) applied to every
record created by this request. Set recordExpiryDurationDays to the
number of days after which the records expire. Only the expiry provided
here is applied; the records' strategy association has no effect on
their expiry. If you do not provide this value, the records do not
expire. The REMOVE action does not apply when creating records.
records
class-attribute
instance-attribute
¶
records: list[MemoryRecordCreateInput] | None = ...
A list of memory record creation inputs to be processed in the batch operation.
Output¶
BatchCreateMemoryRecordsOutput
dataclass
¶
Bases: _SerdeShape
Dataclass for BatchCreateMemoryRecordsOutput structure.
Attributes¶
failed_records
instance-attribute
¶
failed_records: list[MemoryRecordOutput]
A list of memory records that failed to be created, including error details for each failure.
response_metadata
class-attribute
instance-attribute
¶
Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.
successful_records
instance-attribute
¶
successful_records: list[MemoryRecordOutput]
A list of memory records that were successfully created during the batch operation.