Table of Contents

Method GetThreadAsync

Namespace
Oscova.Agents.Conversations
Assembly
Oscova.Agents.dll

GetThreadAsync(string, string, CancellationToken, int?, string?, string?)

Returns an owned thread, optionally paging complete display exchanges without trimming its model session.

public Task<ChatThread?> GetThreadAsync(string userId, string threadId, CancellationToken ct = default, int? messageLimit = null, string? beforeMessageId = null, string? firstMessageId = null)

Parameters

userId string

The owning user.

threadId string

The conversation identity.

ct CancellationToken

Cancels the read.

messageLimit int?

Positive target display count, or null for complete history. Exchanges may exceed the target.

beforeMessageId string?

Existing message excluded from an older page, requiring messageLimit.

firstMessageId string?

Existing first message retained when refreshing a loaded window, requiring messageLimit and no beforeMessageId.

Returns

Task<ChatThread?>