Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cohere ¶ added in v0.0.30
type Cohere struct {
// contains filtered or unexported fields
}
func (*Cohere) GetNumTokens ¶ added in v0.0.30
GetNumTokens returns the number of tokens in the provided text.
func (*Cohere) GetNumTokensFromMessage ¶ added in v0.0.30
func (t *Cohere) GetNumTokensFromMessage(messages schema.ChatMessages) (uint, error)
GetNumTokensFromMessage returns the number of tokens in the provided chat messages.
type GPT2 ¶ added in v0.0.24
type GPT2 struct {
// contains filtered or unexported fields
}
func (*GPT2) GetNumTokens ¶ added in v0.0.24
GetNumTokens returns the number of tokens in the provided text.
func (*GPT2) GetNumTokensFromMessage ¶ added in v0.0.24
func (t *GPT2) GetNumTokensFromMessage(messages schema.ChatMessages) (uint, error)
GetNumTokensFromMessage returns the number of tokens in the provided chat messages.
type OpenAI ¶
type OpenAI struct {
// contains filtered or unexported fields
}
func (*OpenAI) GetNumTokens ¶
GetNumTokens returns the number of tokens in the provided text.
func (*OpenAI) GetNumTokensFromMessage ¶
func (t *OpenAI) GetNumTokensFromMessage(messages schema.ChatMessages) (uint, error)
GetNumTokensFromMessage returns the number of tokens in the provided chat messages.
Click to show internal directories.
Click to hide internal directories.