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.1.0.tar.gz (2.5 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.1.0.tar.gz.

File metadata

  • Download URL: llama_index_embeddings_zhipuai-0.1.0.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-1025-azure

File hashes

Hashes for llama_index_embeddings_zhipuai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 90768617d88c5b38175385c173f735906218c9b1335ea067df567adbfddf2ec8
MD5 ca25218ff6bb9332eedcf5491c341783
BLAKE2b-256 451d516c2f6af3ea2fffcf59012cef72f99da41d92bbcd50c493cf54bc85c6b6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_embeddings_zhipuai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3b6938b8dd3c27a25cc5b12c775a83481f558952c5e428a1d5bd14658a91efb9
MD5 529dcf863c2d9d693bd746e616a2344f
BLAKE2b-256 0c537e1f1751c0edef6a4811d59cf375ea560a19821c149d7109fb7e3f277f87

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