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.5.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.5-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for onyxgenai-1.0.5.tar.gz
Algorithm Hash digest
SHA256 5f82d2b54865f9ecb2815c4441b140824422c89a06f361671c7b928e629591f9
MD5 14ed7dad0ffdbb77c1a5ec48150d06aa
BLAKE2b-256 5118695065cb363f10bfefad83b39d50dd58252f3d01a095d20d0747aacf791c

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for onyxgenai-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 2cae2e2a845b0f7b4a778e915e4f382ad6f83700618744f36003d39ba2452365
MD5 e87dace78998c424989a8186fb8015bb
BLAKE2b-256 797d0c7cc6cfee053bcdb330688b41302412062102398f16bc823b409806a839

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