.NET API
TraconBuilderConversationMemoryExtensions
Tracon.Core.dllSetup of conversation memory.
public static class TraconBuilderConversationMemoryExtensions- Inheritance
- object ← TraconBuilderConversationMemoryExtensions
- Inherited Members
- object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Methods
Section titled “Methods”UseConversationMemory(ITraconBuilder, Action<TraconConversationMemoryOptions>)
Section titled “ UseConversationMemory(ITraconBuilder, Action<TraconConversationMemoryOptions>)”Sets up conversation memory: an agent whose definition turns on MemorySettings.EnableConversationMemory finds what the same user said in earlier sessions with that agent and gets it as context.
public static ITraconBuilder UseConversationMemory(this ITraconBuilder builder, Action<TraconConversationMemoryOptions> configure)Parameters
Section titled “Parameters”builder ITraconBuilder
The Tracon configuration chain.
configure Action<TraconConversationMemoryOptions>
Sets TraconConversationMemoryOptions.VectorDimensions and, if you want, the collection name.
Returns
Section titled “Returns”The chain, for further configuration.
Remarks
Section titled “Remarks”Register a Microsoft.Extensions.VectorData.VectorStore in the service collection. The
connector package you choose and its embedding model live inside that store; Tracon takes
the store from the container when it compiles an agent that asks for memory, and the build
stops with the missing registration’s name if there is none.
A record is scoped by tenant, agent and user, and carries its session. A run with no user, or no
session, neither reads nor writes memory. The store is the host’s data: Tracon deletes the records of
a session when the session goes (an erasure of its data subject, DELETE /api/sessions/{id},
or its retention period), but cannot delete what the store keeps for its own reasons, such as backups.
builder.AddTracon() .UseConversationMemory(options => options.VectorDimensions = 1536);Exceptions
Section titled “Exceptions”builder or configure is null.