NewClient creates a new client for fetching embeddings.
(modelId, namespace string)
| 39 | |
| 40 | // NewClient creates a new client for fetching embeddings. |
| 41 | func 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. |
| 49 | func (ec *EmbeddingClient) FetchEmbeddings(requests []CodeEmbeddingRequest) (*CodeEmbeddingsResponse, error) { |
no test coverage detected