Class TokenCount
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
-
objectTokenCount
Constructors
TokenCount()
public TokenCount()
TokenCount(TokenCountPreset)
public TokenCount(TokenCountPreset preset)
Parameters
presetTokenCountPreset
TokenCount(int)
public TokenCount(int value)
Parameters
valueint
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
valueint
Returns
- bool
Operators
implicit operator int?(TokenCount)
public static implicit operator int?(TokenCount p)
Parameters
Returns
- int?
implicit operator TokenCount(TokenCountPreset)
public static implicit operator TokenCount(TokenCountPreset preset)
Parameters
presetTokenCountPreset
Returns
implicit operator TokenCount(int)
public static implicit operator TokenCount(int v)
Parameters
vint