Table of Contents

Method SaveInformation

Namespace
LMKit.Agents
Assembly
LM-Kit.NET.dll

SaveInformation(string, string, string, MetadataCollection, CancellationToken)

Synchronously saves text information into the specified memory collection.

public DataSource SaveInformation(string collection, string text, string id, MetadataCollection additionalMetadata = null, CancellationToken cancellationToken = default)

Parameters

collection string

The identifier for the memory collection where the information will be stored.

text string

The text content to be saved.

id string

A unique identifier for the stored piece of information.

additionalMetadata MetadataCollection

Optional additional metadata to associate with the stored information.

cancellationToken CancellationToken

Optional token to monitor for cancellation requests.

Returns

DataSource

A DataSource instance representing the stored data.

Exceptions

ArgumentException

Thrown if collection, text, or id is null or empty.