Documentation
¶
Overview ¶
Package embedding abstracts the text embedding service used by the semantic cache of mod_ai_cache.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewOpenAIProvider ¶
NewOpenAIProvider creates an OpenAI compatible embedding provider.
Types ¶
type Config ¶
type Config struct {
ServiceHost string
ServicePort int
UseHttps bool
ApiKey string // bearer credential, never logged
Model string
TimeoutMs int
}
Config carries the connection info of an OpenAI compatible embedding service.
type EmbeddingProvider ¶
EmbeddingProvider turns a question text into a dense vector. Implementations must enforce the configured timeout internally.