# TinyAsyncOpenAIInfinityEmbeddingClient

> **Class** in `langchain_community`

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

Helper tool to embed Infinity.

It is not a part of Langchain's stable API,
direct use discouraged.

## Signature

```python
TinyAsyncOpenAIInfinityEmbeddingClient(
    self,
    host: str = 'http://localhost:7797/v1',
    aiosession: Optional[aiohttp.ClientSession] = None,
)
```

## Description

**Example:**

.. code-block:: python

mini_client = TinyAsyncInfinityEmbeddingClient(
)
embeds = mini_client.embed(
    model="BAAI/bge-small",
    text=["doc1", "doc2"]
)
# or
embeds = await mini_client.aembed(
    model="BAAI/bge-small",
    text=["doc1", "doc2"]
)

## Constructors

```python
__init__(
    self,
    host: str = 'http://localhost:7797/v1',
    aiosession: Optional[aiohttp.ClientSession] = None,
) -> None
```

| Name | Type |
|------|------|
| `host` | `str` |
| `aiosession` | `Optional[aiohttp.ClientSession]` |


## Properties

- `host`
- `aiosession`

## Methods

- [`embed()`](https://reference.langchain.com/python/langchain-community/embeddings/infinity/TinyAsyncOpenAIInfinityEmbeddingClient/embed)
- [`aembed()`](https://reference.langchain.com/python/langchain-community/embeddings/infinity/TinyAsyncOpenAIInfinityEmbeddingClient/aembed)

---

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