Documentation
¶
Index ¶
- Constants
- func BlockedError(err error) error
- func DecodeDenseF32(encoded []byte, dimensions int) ([]float32, error)
- func EncodeDenseF32(vector []float32) []byte
- func FatalConfigError(err error) error
- func IsBlocked(err error) bool
- func IsFatalConfig(err error) bool
- func IsRetryable(err error) bool
- func RetryableError(err error) error
- func ValidateDenseF32(vector []float32, dimensions int, normalization string) error
- func ValidateEncodedVector(encoded []byte, dimensions int, representation, normalization string) error
- func ValidateRequest(req Request) error
- func ValidateResponse(expected Info, req Request, response Response) error
- type Failure
- type FailureKind
- type Info
- type Ollama
- type OllamaOptions
- type Profile
- type Provider
- type Purpose
- type Request
- type Response
Constants ¶
View Source
const ( ProviderOllama = "ollama" DefaultOllamaRequestTimeout = 2 * time.Minute )
View Source
const ( RepresentationDenseF32 = "dense_f32" NormalizationL2 = "l2" NormalizationNone = "none" )
Variables ¶
This section is empty.
Functions ¶
func BlockedError ¶
func EncodeDenseF32 ¶
func FatalConfigError ¶
func IsFatalConfig ¶
func IsRetryable ¶
func RetryableError ¶
func ValidateDenseF32 ¶
func ValidateEncodedVector ¶
func ValidateRequest ¶
Types ¶
type Failure ¶
type Failure struct {
Kind FailureKind
Err error
}
type FailureKind ¶
type FailureKind string
const ( FailureRetryable FailureKind = "retryable" FailureBlocked FailureKind = "blocked" FailureFatalConfig FailureKind = "fatal_config" )
type Ollama ¶
type Ollama struct {
// contains filtered or unexported fields
}
func NewOllama ¶
func NewOllama(opts OllamaOptions) (*Ollama, error)
type OllamaOptions ¶
type Profile ¶
Click to show internal directories.
Click to hide internal directories.