omniai  by ksylvest

Unified Ruby API for diverse AI providers

Created 1 year ago
250 stars

Top 100.0% on SourcePulse

GitHubView on GitHub
Project Summary

OmniAI offers a unified Ruby API designed to standardize interactions with multiple AI providers, including OpenAI, Anthropic, Google, Mistral, and DeepSeek. It simplifies AI development by providing a consistent interface for features such as chat, text-to-speech, speech-to-text, and embeddings, enabling seamless interoperability and effortless switching between services. This makes integrations more flexible and reliable for developers.

How It Works

OmniAI functions as an abstraction layer, presenting a common interface to various AI models and services. It achieves this through provider-specific client classes (e.g., OmniAI::OpenAI, OmniAI::Anthropic), each implementing a standardized set of methods for AI tasks. This approach allows developers to integrate with different AI backends without rewriting their core logic, promoting code reusability and adaptability.

Quick Start & Requirements

  • Installation: Install the core gem with gem install omniai. Provider-specific gems (e.g., gem install omniai-openai) are also required.
  • Prerequisites: A Ruby environment.
  • Dependencies: Individual provider gems are necessary for each AI service you intend to use.
  • Documentation: Examples are provided within the README, covering chat, vision, tools, history, schema generation, CLI usage, TTS, STT, and embeddings.

Highlighted Details

  • Supports a wide range of AI providers and functionalities, including chat (with vision, streaming, tool use, and history), text-to-speech, speech-to-text, and embeddings.
  • Enables defining custom tools for LLMs to interact with, as demonstrated in the Google Gemini example.
  • Features a command-line interface (CLI) for quick testing and exploration of various AI capabilities.
  • Allows for structured data generation from LLMs using schema definitions.
  • Offers configurable logging and request timeouts.

Maintenance & Community

The provided README does not contain information regarding maintainers, community channels (e.g., Discord, Slack), sponsorships, or a public roadmap.

Licensing & Compatibility

The README does not explicitly state the project's license. This omission requires further investigation before adoption, especially concerning commercial use or integration into closed-source projects.

Limitations & Caveats

The primary limitation is the absence of explicit licensing information, which is critical for determining compatibility and usage rights. Users must also install separate gems for each AI provider they wish to integrate with, adding a layer of dependency management.

Health Check
Last Commit

1 day ago

Responsiveness

1 day

Pull Requests (30d)
3
Issues (30d)
0
Star History
3 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.