Share via


TextSummarizer.IsPromptLargerThanContext Method

Definition

Overloads

Name Description
IsPromptLargerThanContext(String, UInt64)

Returns whether the text input is too large for the context window.

IsPromptLargerThanContext(ConversationItem[], ConversationSummaryOptions, UInt64)

Returns whether the text of a conversation is too large for the context window.

IsPromptLargerThanContext(String, UInt64)

Returns whether the text input is too large for the context window.

public:
 virtual bool IsPromptLargerThanContext(Platform::String ^ text, [Out] unsigned long long & cutoffPosition) = IsPromptLargerThanContext;
bool IsPromptLargerThanContext(winrt::hstring const& text, [Out] uint64_t & cutoffPosition);
public bool IsPromptLargerThanContext(string text, out ulong cutoffPosition);
Public Function IsPromptLargerThanContext (text As String, ByRef cutoffPosition As ULong) As Boolean

Parameters

text
String

Platform::String

winrt::hstring

cutoffPosition
UInt64

unsigned long long

uint64_t

Returns

Boolean

bool

True, if the text input is too large; otherwise, false. The default is false.

Remarks

A context window acts like the model's short-term memory, holding the input prompt and the preceding conversation to maintain coherence. A larger context window enables more detailed conversations and processes larger documents but increases processing time, cost, and potentially reduces accuracy.

Applies to

IsPromptLargerThanContext(ConversationItem[], ConversationSummaryOptions, UInt64)

Returns whether the text of a conversation is too large for the context window.

public:
 virtual bool IsPromptLargerThanContext(Platform::Array <ConversationItem ^> ^ messages, ConversationSummaryOptions ^ options, [Out] unsigned long long & cutoffPosition) = IsPromptLargerThanContext;
bool IsPromptLargerThanContext(winrt::array_view <ConversationItem const&> const& messages, ConversationSummaryOptions const& options, [Out] uint64_t & cutoffPosition);
public bool IsPromptLargerThanContext(ConversationItem[] messages, ConversationSummaryOptions options, out ulong cutoffPosition);
Public Function IsPromptLargerThanContext (messages As ConversationItem(), options As ConversationSummaryOptions, ByRef cutoffPosition As ULong) As Boolean

Parameters

messages
ConversationItem[]

The collection of conversation posts and responses to summarize.

options
ConversationSummaryOptions

The configuration options for summarizing a conversation.

cutoffPosition
UInt64

unsigned long long

uint64_t

The location in the text input where truncation occurs based on the size of the context window.

Returns

Boolean

bool

True, if the text input is too large; otherwise, false. The default is false.

Remarks

A context window acts like the model's short-term memory, holding the input prompt and the preceding conversation to maintain coherence. A larger context window enables more detailed conversations and processes larger documents but increases processing time, cost, and potentially reduces accuracy.

Applies to