Table of Contents

Class TokenCount

Namespace
Glitch9.AIDevKit

Used to set 'max_tokens', 'max_completions_tokens', 'max_output_tokens', etc. Must be greater than or equal to 1024. Set it null to disable the limit.

[Serializable]
public class TokenCount : NullableRangedInt<TokenCount>
Inheritance
object
TokenCount

Constructors

TokenCount()

public TokenCount()

TokenCount(TokenCountPreset)

public TokenCount(TokenCountPreset preset)

Parameters

preset TokenCountPreset

TokenCount(int)

public TokenCount(int value)

Parameters

value int

Fields

Long

public const int Long = 4096

Field Value

int

Medium

public const int Medium = 2048

Field Value

int

Short

public const int Short = 1024

Field Value

int

VeryLong

public const int VeryLong = 8192

Field Value

int

Properties

Default

public override int Default { get; }

Property Value

int

Max

public override int Max { get; }

Property Value

int

Min

public override int Min { get; }

Property Value

int

Methods

CheckIfDefaultPreset(int)

public static bool CheckIfDefaultPreset(int value)

Parameters

value int

Returns

bool

Operators

implicit operator int?(TokenCount)

public static implicit operator int?(TokenCount p)

Parameters

p TokenCount

Returns

int?

implicit operator TokenCount(TokenCountPreset)

public static implicit operator TokenCount(TokenCountPreset preset)

Parameters

preset TokenCountPreset

Returns

TokenCount

implicit operator TokenCount(int)

public static implicit operator TokenCount(int v)

Parameters

v int

Returns

TokenCount