ZhipuAI embedding model integration.
Setup:
To use, you should have the ``zhipuai`` python package installed, and the
environment variable ``ZHIPU_API_KEY`` set with your API KEY.
More instructions about ZhipuAi Embeddings, you can get it
from https://open.bigmodel.cn/dev/api#vector
.. code-block:: bash
pip install -U zhipuai
export ZHIPU_API_KEY="your-api-key"
Key init args ā completion params:
model: Optional[str]
Name of ZhipuAI model to use.
api_key: str
Automatically inferred from env var ZHIPU_API_KEY if not provided.
See full list of supported init args and their descriptions in the params section.
Instantiate:
.. code-block:: python
from langchain_community.embeddings import ZhipuAIEmbeddings
embed = ZhipuAIEmbeddings(
model="embedding-2",
# api_key="...",
)