Files
vecna/pkg/embedclient/client.go
Hein 4009a54e39 feat: 🎉 Vectors na Vectors, the begining
Translate 1536 <-> 768 , 3072 <-> 2048
2026-04-11 18:05:05 +02:00

28 lines
568 B
Go

package embedclient
import "context"
// Request is a batch of texts to embed.
type Request struct {
Texts []string
Model string
}
// Usage reports token consumption from the backing model.
type Usage struct {
PromptTokens int
TotalTokens int
}
// Response holds the raw embeddings returned by the backing model.
type Response struct {
Embeddings [][]float32
Model string
Usage Usage
}
// Client sends text to a backing embedding model and returns raw vectors.
type Client interface {
Embed(ctx context.Context, req Request) (Response, error)
}