# EmbaasEmbeddings

> **Class** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/embeddings/embaas/EmbaasEmbeddings)

Embaas's embedding service.

To use, you should have the
environment variable ``EMBAAS_API_KEY`` set with your API key, or pass
it as a named parameter to the constructor.

## Signature

```python
EmbaasEmbeddings()
```

## Description

**Example:**

.. code-block:: python

# initialize with default model and instruction
from langchain_community.embeddings import EmbaasEmbeddings
emb = EmbaasEmbeddings()

# initialize with custom model and instruction
from langchain_community.embeddings import EmbaasEmbeddings
emb_model = "instructor-large"
emb_inst = "Represent the Wikipedia document for retrieval"
emb = EmbaasEmbeddings(
    model=emb_model,
    instruction=emb_inst
)

## Extends

- `BaseModel`
- `Embeddings`

## Properties

- `model`
- `instruction`
- `api_url`
- `embaas_api_key`
- `max_retries`
- `timeout`
- `model_config`

## Methods

- [`validate_environment()`](https://reference.langchain.com/python/langchain-community/embeddings/embaas/EmbaasEmbeddings/validate_environment)
- [`embed_documents()`](https://reference.langchain.com/python/langchain-community/embeddings/embaas/EmbaasEmbeddings/embed_documents)
- [`embed_query()`](https://reference.langchain.com/python/langchain-community/embeddings/embaas/EmbaasEmbeddings/embed_query)

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/4b280287bd55b99b44db2dd849f02d66c89534d5/libs/community/langchain_community/embeddings/embaas.py#L23)