MCPcopy Create free account
hub / github.com/encoder-run/operator / NewClient

Function NewClient

pkg/embedder/client.go:41–46  ·  view source on GitHub ↗

NewClient creates a new client for fetching embeddings.

(modelId, namespace string)

Source from the content-addressed store, hash-verified

39
40// NewClient creates a new client for fetching embeddings.
41func NewClient(modelId, namespace string) *EmbeddingClient {
42 return &EmbeddingClient{
43 httpClient: &http.Client{},
44 baseURL: common.ModelServiceURL(modelId, namespace),
45 }
46}
47
48// FetchEmbeddings sends a batch of file content to the inference API and retrieves embeddings.
49func (ec *EmbeddingClient) FetchEmbeddings(requests []CodeEmbeddingRequest) (*CodeEmbeddingsResponse, error) {

Callers 3

semanticSearchPostgresFunction · 0.92
semanticSearchRedisFunction · 0.92
mainFunction · 0.92

Calls 1

ModelServiceURLFunction · 0.92

Tested by

no test coverage detected