# IEmbeddingGenerationService

## Overview

The [IEmbeddingGenerationService](/ai/components/api/services/iembeddinggenerationservice.md) offers a unified interface to embedding generation endpoints. It is used by all Wisej.AI components and tools that need to convert text chunks into vectors. Typically, it works in conjunction with the `IEmbeddingStorageService`.

The `DefaultEmbeddingGenerationService` implementation, as registered by Wisej.AI, utilizes the OpenAI endpoint. It accesses the [API key stored](/ai/components/api/helpers/wisej.ai.helpers.apikeys.md) in `ApiKeys.json` or the corresponding environment variable and employs the "text-embedding-3-small" model (1,536 dimensions) for generating embeddings.

See [Embedding Generation](/ai/concepts/vector-databases.md#embedding-generation) for more information on how to change the default model and provider.

## Default Implementation

The default implementation of the [`IEmbeddingGenerationService`](/ai/components/api/services/iembeddinggenerationservice.md) interface is provided by the [`DefaultEmbeddingGenerationService`](/ai/components/api/services/iembeddinggenerationservice/wisej.ai.services.defaultembeddinggenerationservice.md) class. This class employs the [`OpenAIEndpoint`](/ai/components/api/smartendpoint/wisej.ai.endpoints.openaiendpoint.md) as its standard endpoint for embedding generation. In addition to the DefaultEmbeddingGeneration service, Wisej.AI also offers the [HuggingFaceEmbeddingGenerationService](/ai/components/api/services/iembeddinggenerationservice/wisej.ai.services.huggingfaceembeddinggenerationservice.md) implementation.

For further details and to access the source code of the built-in implementations, please refer to the [Embedding Generation](/ai/concepts/vector-databases.md#embedding-generation) page.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wisej.com/ai/components/built-in-services/iembeddinggenerationservice.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
