Skip to content

GustyCube/EasilyAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

EasilyAI

A unified Python library for AI services

PyPI Version CI/CD Status Docs Status Code Coverage Downloads Python Versions License Contributors

Overview

EasilyAI is a powerful Python library that simplifies AI application development by providing a unified interface for multiple AI services including OpenAI, Anthropic, Google Gemini, X.AI Grok, and Ollama. Whether you need text generation, image creation, or text-to-speech functionality, EasilyAI offers a consistent API that makes switching between providers effortless.


πŸš€ Key Features

  • πŸ”„ Multi-Provider Support: Seamlessly switch between OpenAI, Anthropic, Google Gemini, X.AI Grok, and Ollama
  • πŸ“ Text Generation: Advanced language models for chat, completion, and creative writing
  • 🎨 Image Generation: Create stunning visuals with DALL-E and other image models
  • πŸ—£οΈ Text-to-Speech: High-quality voice synthesis with multiple voice options
  • πŸ”— Pipeline System: Chain multiple AI operations into powerful workflows
  • πŸ› οΈ Custom AI Integration: Easily extend with your own AI services
  • ⚑ Unified API: One consistent interface for all providers and tasks
  • 🎯 Auto Task Detection: Intelligent request routing based on content type

πŸ“¦ Installation

pip install easilyai

πŸš€ Quick Start

Get up and running in minutes with these simple examples:

Basic Text Generation

import easilyai

# Create an app with your preferred provider
app = easilyai.create_app(
    name="my_ai_app",
    service="openai",  # or "anthropic", "gemini", "grok", "ollama"
    apikey="YOUR_API_KEY",
    model="gpt-4"
)

# Generate text
response = app.request("Explain quantum computing in simple terms")
print(response)

Text-to-Speech

# Create a TTS app
tts_app = easilyai.create_tts_app(
    name="my_tts_app",
    service="openai",
    apikey="YOUR_API_KEY",
    model="tts-1"
)

# Convert text to speech
tts_app.request_tts(
    text="Hello from EasilyAI!",
    voice="onyx",
    output_file="greeting.mp3"
)

AI Pipeline

# Chain multiple AI operations
pipeline = easilyai.EasilyAIPipeline(app)
pipeline.add_task("generate_text", "Write a haiku about coding")
pipeline.add_task("generate_image", "A serene coding environment")

results = pipeline.run()

πŸ› οΈ Supported AI Providers

Provider Text Generation Image Generation Text-to-Speech
OpenAI βœ… βœ… βœ…
Anthropic βœ… ❌ ❌
Google Gemini βœ… ❌ ❌
X.AI Grok βœ… ❌ ❌
Ollama βœ… ❌ ❌
Custom AI βœ… βœ… βœ…

πŸ“š Documentation

For comprehensive guides, API reference, and advanced usage examples, visit our documentation:

πŸ“– View Full Documentation β†’

🀝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ”— Links