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.1.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.1.tar.gz.

File metadata

File hashes

Hashes for llama_index_embeddings_zhipuai-0.3.1.tar.gz
Algorithm Hash digest
SHA256 15fb0b86b9c1214ed1588cc42d4d713ec28a49390acdfe6371762e43676d774b
MD5 4bb560bf4487dd28ca9cb43b73c81157
BLAKE2b-256 39e7443c519be95ecf26b0955c38502ee5bbc5d4c9e4b262f59d5c5c1757c59f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_embeddings_zhipuai-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c4495c05ebc3802b25b01698f0568bfa9f9d2610e2f7a18e1aa95efa505e87df
MD5 a6397bc1915b75fd311d10651a222914
BLAKE2b-256 7386c1da2e2ed2ba670d7619140afd90c2ebcdcbe99c917029eeb2fe08da4004

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