Package com.didalgo.gpt3
Record Class Encoding.Of
java.lang.Object
java.lang.Record
com.didalgo.gpt3.Encoding.Of
- All Implemented Interfaces:
Encoding
- Enclosing interface:
- Encoding
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.didalgo.gpt3.Encoding
Encoding.Lookup, Encoding.Of
-
Field Summary
Fields inherited from interface com.didalgo.gpt3.Encoding
CL100K_BASE, ENDOFPROMPT, ENDOFTEXT, FIM_MIDDLE, FIM_PREFIX, FIM_SUFFIX, O200K_BASE, P50K_BASE, P50K_EDIT, R50K_BASE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of themergeableRanks
record component.pattern()
Returns the value of thepattern
record component.Returns the value of thespecialTokens
record component.Returns the value of thetiktokenFilename
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
Of
public Of(String tiktokenFilename, Map<ByteSequence, Integer> mergeableRanks, Map<String, Integer> specialTokens, Pattern pattern) Creates an instance of aOf
record class.- Parameters:
tiktokenFilename
- the value for thetiktokenFilename
record componentmergeableRanks
- the value for themergeableRanks
record componentspecialTokens
- the value for thespecialTokens
record componentpattern
- the value for thepattern
record component
-
-
Method Details
-
mergeableRanks
Returns the value of themergeableRanks
record component.- Specified by:
mergeableRanks
in interfaceEncoding
- Returns:
- the value of the
mergeableRanks
record component
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
tiktokenFilename
Returns the value of thetiktokenFilename
record component.- Returns:
- the value of the
tiktokenFilename
record component
-
specialTokens
Returns the value of thespecialTokens
record component.- Specified by:
specialTokens
in interfaceEncoding
- Returns:
- the value of the
specialTokens
record component
-
pattern
Returns the value of thepattern
record component.
-