Skip to main content

No project description provided

Project description

VoyageAI Python Library

The VoyageAI Python library provides convenient access to the VoyageAI API.

Installation

Use pip to install the package:

pip install voyageai

Usage

First, import the libary at the top of a file:

import voyageai

The library needs to be configured with your VoyageAI API key. Either set it as the VOYAGEAI_API_KEY environment variable before using the library:

export VOYAGEAI_API_KEY="[ Your VoyageAI API key ]"

Or set voyageai.api_key to its value:

voyageai.api_key = "[ Your VoyageAI API key ]"

Embedding

The VoyageAI embedding is accessible through our API (see documentation at ...). This library provides Python SDKs for calling the embedding API.

text = "This is a sample text."
model = "voyage-api-v0"
embedding = voyageai.Embedding.create(input=text, model=model)["data"][0]["embedding"]

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

voyageai-0.1.2.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

voyageai-0.1.2-py3-none-any.whl (22.3 kB view details)

Uploaded Python 3

File details

Details for the file voyageai-0.1.2.tar.gz.

File metadata

  • Download URL: voyageai-0.1.2.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.9.18 Darwin/23.0.0

File hashes

Hashes for voyageai-0.1.2.tar.gz
Algorithm Hash digest
SHA256 f0a3a6181e6528368ad856995a665528151a26b82bb186170745f047f01aba9c
MD5 d11c2abcb447b63feeb436a906c29faa
BLAKE2b-256 50eac505265933332c1668b5c0bce948501eade5db3c45449383f4fb0032722e

See more details on using hashes here.

File details

Details for the file voyageai-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: voyageai-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 22.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.9.18 Darwin/23.0.0

File hashes

Hashes for voyageai-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3f422c2398fe5c355ae39b3a971ddbd1bb5db311d41ecd2ad6bb8b712f6688a7
MD5 2e3f32a787b19e5af21d9c728b8a84df
BLAKE2b-256 b2aba4c3cd0549dfbe1f8eb6b8edbae81f8f6aed0a8a9232fcff967309e79efa

See more details on using hashes here.

Supported by

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