AIProjectMemoryStores.CreateMemory Method

Definition

Overloads

Name Description
CreateMemory(String, BinaryContent, RequestOptions)

[Protocol Method] Create a memory item in a memory store.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
CreateMemory(String, String, String, MemoryItemKind, CancellationToken)

Create a memory item in a memory store.

CreateMemory(String, BinaryContent, RequestOptions)

Source:
AIProjectMemoryStores.cs

[Protocol Method] Create a memory item in a memory store.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual System.ClientModel.ClientResult CreateMemory(string name, System.ClientModel.BinaryContent content, System.ClientModel.Primitives.RequestOptions options = default);
abstract member CreateMemory : string * System.ClientModel.BinaryContent * System.ClientModel.Primitives.RequestOptions -> System.ClientModel.ClientResult
override this.CreateMemory : string * System.ClientModel.BinaryContent * System.ClientModel.Primitives.RequestOptions -> System.ClientModel.ClientResult
Public Overridable Function CreateMemory (name As String, content As BinaryContent, Optional options As RequestOptions = Nothing) As ClientResult

Parameters

name
String

The name of the memory store.

content
BinaryContent

The content to send as the body of the request.

options
RequestOptions

The request options, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The response returned from the service.

Exceptions

name or content is null.

name is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Applies to

CreateMemory(String, String, String, MemoryItemKind, CancellationToken)

Source:
AIProjectMemoryStores.cs

Create a memory item in a memory store.

public virtual System.ClientModel.ClientResult<Azure.AI.Projects.Memory.MemoryItem> CreateMemory(string name, string scope, string content, Azure.AI.Projects.Memory.MemoryItemKind kind, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateMemory : string * string * string * Azure.AI.Projects.Memory.MemoryItemKind * System.Threading.CancellationToken -> System.ClientModel.ClientResult<Azure.AI.Projects.Memory.MemoryItem>
override this.CreateMemory : string * string * string * Azure.AI.Projects.Memory.MemoryItemKind * System.Threading.CancellationToken -> System.ClientModel.ClientResult<Azure.AI.Projects.Memory.MemoryItem>
Public Overridable Function CreateMemory (name As String, scope As String, content As String, kind As MemoryItemKind, Optional cancellationToken As CancellationToken = Nothing) As ClientResult(Of MemoryItem)

Parameters

name
String

The name of the memory store.

scope
String

The namespace that logically groups and isolates memories, such as a user ID.

content
String

The content of the memory.

kind
MemoryItemKind

The kind of the memory item.

cancellationToken
CancellationToken

The cancellation token that can be used to cancel the operation.

Returns

Exceptions

name, scope or content is null.

name, scope or content is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Applies to