次の方法で共有


IEvaluationTokenCounter Interface

Definition

Counts the number of tokens present in evaluation prompts that are to be sent to an AI model.

public interface class IEvaluationTokenCounter
public interface IEvaluationTokenCounter
type IEvaluationTokenCounter = interface
Public Interface IEvaluationTokenCounter

Remarks

IEvaluators that rely on an AI model to perform evaluations can use IEvaluationTokenCounter to ensure that the evaluation prompts they use do not exceed the specified InputTokenLimit.

The token counting implementation can vary depending on the AI model that is used. Use the ToTokenCounter(Tokenizer, Int32) extension method to get a IEvaluationTokenCounter from the Tokenizer for a given AI model.

Properties

InputTokenLimit

The input token limit for the AI model / deployment in use.

Methods

CountTokens(String)

Counts the number of tokens present in the supplied content.

Applies to