# SolarEmbeddings

> **Class** in `langchain_community`

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

Solar's embedding service.

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

## Signature

```python
SolarEmbeddings()
```

## Description

**Example:**

.. code-block:: python

from langchain_community.embeddings import SolarEmbeddings
embeddings = SolarEmbeddings()

query_text = "This is a test query."
query_result = embeddings.embed_query(query_text)

document_text = "This is a test document."
document_result = embeddings.embed_documents([document_text])

## Extends

- `BaseModel`
- `Embeddings`

## Properties

- `endpoint_url`
- `model`
- `solar_api_key`
- `model_config`

## Methods

- [`validate_environment()`](https://reference.langchain.com/python/langchain-community/embeddings/solar/SolarEmbeddings/validate_environment)
- [`embed()`](https://reference.langchain.com/python/langchain-community/embeddings/solar/SolarEmbeddings/embed)
- [`embed_documents()`](https://reference.langchain.com/python/langchain-community/embeddings/solar/SolarEmbeddings/embed_documents)
- [`embed_query()`](https://reference.langchain.com/python/langchain-community/embeddings/solar/SolarEmbeddings/embed_query)

## ⚠️ Deprecated

Deprecated since version 0.0.34.

---

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