Metadata-Version: 2.1
Name: llama-index-embeddings-zhipuai
Version: 0.2.0
Summary: llama-index embeddings zhipuai integration
License: MIT
Author: nightosong
Requires-Python: >=3.9,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: llama-index-core (>=0.12.0,<0.13.0)
Requires-Dist: zhipuai (>=2.1.5.20230904,<3.0.0.0)
Description-Content-Type: text/markdown

# LlamaIndex Embeddings Integration: ZhipuAI

### Installation

```bash
%pip install llama-index-embeddings-zhipuai
!pip install llama-index
```

### Basic usage

```py
# Import ZhipuAI
from llama_index.embeddings.zhipuai import ZhipuAIEmbedding

embedding = ZhipuAIEmbedding(model="embedding-2", api_key="YOUR API KEY")

response = embedding.get_general_text_embedding("who are you?")
print(response)

# Output: [0.1, 0.2, ...]

import asyncio

response = asyncio.run(embedding.aget_general_text_embedding("who are you?"))
print(response)
# Output: [0.1, 0.2, ...]
```

### ZhipuAI Documentation

https://bigmodel.cn/dev/howuse/introduction

