Skip to main content

AI that works out of the box.

Project description

[!WARNING] Project is in its early stage of development. Current version is not stable.

🐈‍⬛ nyai

Versative AI client and toolkit that works out of the box. Work with AI models from different providers seamlessly. Powered by OpenAI's Python SDK behind the scenes to handle dozens of AI providers without all the complexity.

Supports the following out of the box:

  • OpenAI
  • SambaNova
  • Anthropic
  • Cohere
  • Fireworks
  • Together
  • Vertex AI

📦 Setup

pip install nyai

🛠️ Usage

Set up a base client from one of the supported providers.

from nyai import Client

client = Client(provider="sambanova",
                api_key="API_KEY")

Extend these clients with better functionality.

from nyai.llm import LLM

llm = LLM(client, model="Meta-Llama-3.2-3B-Instruct")
for chunk in llm.stream("Tell me a joke"):
    print(chunk, end="")

Want to add your own Provider?

from nyai.providers import Provider
from nyai import Client

perplexity = Provider(name="Perplexity", endpoint="https://api.perplexity.ai")
client = Client(provider=perplexity, api_key="API_KEY")

Docs to be continued...

🎯 Motivation

Handling LLMs or other AI models from different providers should be easy. Nyai aims to be a dirt simple solution and toolkit that makes interactions with multiple AI providers seamless. Why not use LangChain instead? Why would you do that to yourself. Nyai was also originally built for Openmacro.

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

nyai-0.0.2.tar.gz (6.9 kB view details)

Uploaded Source

File details

Details for the file nyai-0.0.2.tar.gz.

File metadata

  • Download URL: nyai-0.0.2.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for nyai-0.0.2.tar.gz
Algorithm Hash digest
SHA256 481726ef5ff5452a7fcaa26ed5dcfe43841d3ccb971662bbfed88b190eeb567c
MD5 2b724d6722fadf56ab091d1b4756f584
BLAKE2b-256 76a4afce06bf65e24e9cf817b68d1d69c1edbfd1b0f01cf3c757c34b2751c9ea

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