|
/// A task that represents the asynchronous retrieval operation. |
|
/// The task result contains the serialized session state, or <see langword="null"/> if not found. |
|
/// </returns> |
|
public abstract ValueTask<AgentSession> GetSessionAsync( |
|
AIAgent agent, |
|
string conversationId, |
|
CancellationToken cancellationToken = default); |
Judging by 1) existing implementations (noop session store, in memory session store), 2) use by AIHostAgent, 3) and the nullability contract, the description should say that a new session must be returned if not found, and that null should not be returned.
agent-framework/dotnet/src/Microsoft.Agents.AI.Hosting/AgentSessionStore.cs
Lines 39 to 45 in b2e7706
Judging by 1) existing implementations (noop session store, in memory session store), 2) use by AIHostAgent, 3) and the nullability contract, the description should say that a new session must be returned if not found, and that
nullshould not be returned.