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.2.0.tar.gz (2.6 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.2.0.tar.gz.

File metadata

File hashes

Hashes for llama_index_embeddings_zhipuai-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d1fb3fbae40823b892105aadc724e8d5161a4806f1dd4a172199841bb8fd99ca
MD5 65afa4b9b4a849c9ed0c5e66df71cda6
BLAKE2b-256 3990ff915e52e5d60366f4684c6ea483ad99e8a429cbe63d8ec82a8bd00f8097

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_embeddings_zhipuai-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5646dbc1a70dc0265e5aec6a0ac9000e76086f0dc8d7a72b22f9a86bfd1e9e56
MD5 147c402acf3813f2a053e90df6ab29d2
BLAKE2b-256 6aaf5b62fbc4256f00173b35e14bb406415f4202d2d323adda3991d9ba142ce2

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