Skip to main content

Python SDK for interacting with Onyx Generative AI Services

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

Onyx GenAI SDK

The goal of this project is to simplify the developer experience when interacting with Onyx GenAI Services. This project provides wrappers around the the underlying APIs provided by the service.

Table of Contents

  1. Installation
  2. Using the SDK in Onyx
  3. Running the Project Locally
  4. Running Unit Tests
  5. Running Code Quality Checks

Installation

To install with pip, run:

pip install onyxgenai

To install with conda, run:

conda install -c conda-forge onyxgenai

Using the SDK in Onyx

  1. Create a Conda Store Environment with all dependencies listed in the requirements.txt

  2. Start your JupyterLab Server

  3. Create a new Jupyter Notebook

  4. Install the SDK as indicated above

  5. Add the onyxgenai client imports to your project

For more in depth examples, see notebooks section of this repo.

Embedding Client

The Embedding Client provides access to the Onyx GenAI Embedding Service. The client provides access to functionality such as:

  • Generating Text and Image Embeddings and Vector Storage
  • Retrieving Vector Store Collections
  • Vector Database Search

Model Client

The Model Client provides access to the Onyx GenAI Model Store Service. The client provides access to functionality such as:

  • Retrieving Model Info
  • Retrieving Active Model Deployment Info
  • Deploying and Deleting Model Deployments
  • Performing Text and Image Prediction and Embedding
  • Generating Text Completions from an LLM

Running the Project Locally

  1. To create an environment, run the following:
virtualenv -p python3 venv
source venv/bin/activate
  1. To install dependencies, run the following:
pip install .
pip install -e ".[dev]" # Optional

Running Unit Tests

  1. To run unit tests, run the following:
pytest

Running Code Quality Checks

  1. To run code quality checks, run the following:
ruff check .

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

onyxgenai-1.0.4.tar.gz (17.1 kB view details)

Uploaded Source

Built Distribution

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

onyxgenai-1.0.4-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file onyxgenai-1.0.4.tar.gz.

File metadata

  • Download URL: onyxgenai-1.0.4.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.15

File hashes

Hashes for onyxgenai-1.0.4.tar.gz
Algorithm Hash digest
SHA256 f84e546077bb26bf501252646e8bfab5ff58b15d5d0fcf93877efb6eac49dff9
MD5 b186ae07809e59bd15002ac4b9fcf793
BLAKE2b-256 e9dbbb36b1afead6224e605447d5b3989ffde93250f609b2a60528da4a01b3cc

See more details on using hashes here.

File details

Details for the file onyxgenai-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: onyxgenai-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.15

File hashes

Hashes for onyxgenai-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b223d2cd52c10fc0a5edc52654390141f79f33646621b4edbfe6dc6efa0a2d11
MD5 9575b39f5f71dd230cd54414a0afa4ba
BLAKE2b-256 8c37546a7aa2f4186da7f657ae90e404da72f1ec4976a1a369f46e92c92c0e84

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