Skip to main content

llama-index embeddings zhipuai integration

Project description

LlamaIndex Embeddings Integration: ZhipuAI

Installation

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

Basic usage

# 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llama_index_embeddings_zhipuai-0.3.0.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file llama_index_embeddings_zhipuai-0.3.0.tar.gz.

File metadata

File hashes

Hashes for llama_index_embeddings_zhipuai-0.3.0.tar.gz
Algorithm Hash digest
SHA256 5dc7ee284f98fff3afb043646366ecef7cf681b1fd74cf06417d7e8230c7142f
MD5 203b3e0823c82df449bcba9750e3c665
BLAKE2b-256 f04fa5e349af8da29edb146372c8801141687f144ee18ef84ffd6918918abc51

See more details on using hashes here.

File details

Details for the file llama_index_embeddings_zhipuai-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_embeddings_zhipuai-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e4a85f7a5a7b7f22291e186aba023390fbbf70c6f273fc0adeead97791bfbcbb
MD5 fdb1e0165aaaf4047f931ed4ade25133
BLAKE2b-256 76bc328d9c1706690449c2dcb663aafdbc1363a6dc618201673558b078c66ecb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page