Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CohereClient ¶
type CohereClient struct {
// contains filtered or unexported fields
}
func NewCohereClient ¶
func NewCohereClient(apiKey string) (*CohereClient, error)
type EmbeddingRequest ¶
type EmbeddingRequest struct {
// ID of the model to use.
Model string `json:"model"`
Texts []string `json:"texts"`
InputType string `json:"input_type,omitempty"`
EmbeddingTypes []string `json:"embedding_types"`
// Allowed values: NONE,START, END (default)
// Passing START will discard the start of the input.
// END will discard the end of the input. In both cases, input is discarded until the remaining input is
// exactly the maximum input token length for the model.
// If NONE is selected, when the input exceeds the maximum input token length an error will be returned.
Truncate string `json:"truncate,omitempty"`
}
type EmbeddingResponse ¶
type EmbeddingResponse struct {
Id string `json:"id"`
Embeddings Embeddings `json:"embeddings"`
}
type Embeddings ¶
Currently only float32/int8 is supported
type RerankResponse ¶
type RerankResponse struct {
Results []RerankResult `json:"results"`
Id string `json:"id"`
Meta Meta `json:"meta"`
}
type RerankResult ¶
Click to show internal directories.
Click to hide internal directories.