vectorization

package
v0.0.0-...-8e53faf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2026 License: Unlicense Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a shared HTTP client for the Vectorizer service.

func New

func New(baseURL string) *Client

New creates a new Vectorizer client. TODO: Improve http client configuration.

func (*Client) HealthCheck

func (c *Client) HealthCheck() error

HealthCheck checks if the Vectorizer service is available.

func (*Client) Vectorize

func (c *Client) Vectorize(text string) ([]byte, error)

Vectorize generates an embedding vector for the given text. This is a convenience method that calls VectorizeBatch with a single text.

func (*Client) VectorizeBatch

func (c *Client) VectorizeBatch(texts []string) ([][]byte, error)

VectorizeBatch generates embedding vectors for a batch of texts. The returned embeddings are in the same order as the input texts. This method sends all texts to the vectorizer in a single request.

type EmbeddingData

type EmbeddingData struct {
	Embedding string `json:"embedding"`
	Dimension int    `json:"dimension"`
}

EmbeddingData represents a single embedding from the vectorizer.

type Response

type Response struct {
	Embeddings []EmbeddingData `json:"embeddings"`
}

Response represents the response from the Vectorizer service.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL