Documentation
¶
Index ¶
Constants ¶
View Source
const ( ProviderOpenAI = "openai" ProviderOllama = "ollama" ProviderLlamaCpp = "llamacpp" ProviderOpenAICompatible = "openai_compatible" DefaultOpenAIBaseURL = "https://api.openai.com/v1" DefaultOllamaBaseURL = "http://127.0.0.1:11434" DefaultLlamaCppBaseURL = "http://127.0.0.1:8080/v1" DefaultOpenAIModel = "text-embedding-3-small" DefaultLocalEmbeddingModel = "nomic-embed-text" DefaultBatchSize = 64 DefaultMaxInputChars = 12000 DefaultRequestTimeout = 2 * time.Minute DefaultProbeTimeout = 2 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func IsRateLimitError ¶
Types ¶
type CheckResult ¶
type CheckResult struct {
Provider string
Model string
BaseURL string
Status string
Warning string
Probed bool
}
func CheckProvider ¶
func CheckProvider(ctx context.Context, cfg Config) CheckResult
type EmbeddingBatch ¶
type Option ¶
type Option func(*providerOptions)
func WithAPIKey ¶ added in v0.5.3
func WithHTTPClient ¶
func WithRequestTimeout ¶
func WithUserAgent ¶ added in v0.5.3
Click to show internal directories.
Click to hide internal directories.