{"id":23552254,"url":"https://github.com/gustycube/easilyai","last_synced_at":"2025-04-28T13:32:19.806Z","repository":{"id":268478334,"uuid":"904473404","full_name":"GustyCube/EasilyAI","owner":"GustyCube","description":"A python library that simplifies the usage of AI! ","archived":false,"fork":false,"pushed_at":"2025-01-27T17:23:38.000Z","size":669,"stargazers_count":16,"open_issues_count":6,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-30T10:04:28.223Z","etag":null,"topics":["ai","claude","collaborate","deepsource","easy","gemini","generative-ai","grok","library","llm","ollama","openai","pip","pipeline","python","pythonlibrary"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/EasilyAI/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GustyCube.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-17T00:47:09.000Z","updated_at":"2025-03-29T13:35:09.000Z","dependencies_parsed_at":"2024-12-17T03:46:29.294Z","dependency_job_id":"dccb717f-f278-4582-b634-8c9c1f6d8f30","html_url":"https://github.com/GustyCube/EasilyAI","commit_stats":null,"previous_names":["gustycube/easyai","gustycube/easilyai"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GustyCube%2FEasilyAI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GustyCube%2FEasilyAI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GustyCube%2FEasilyAI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GustyCube%2FEasilyAI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GustyCube","download_url":"https://codeload.github.com/GustyCube/EasilyAI/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251319757,"owners_count":21570451,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","claude","collaborate","deepsource","easy","gemini","generative-ai","grok","library","llm","ollama","openai","pip","pipeline","python","pythonlibrary"],"created_at":"2024-12-26T11:09:55.555Z","updated_at":"2025-04-28T13:32:19.736Z","avatar_url":"https://github.com/GustyCube.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003eEasilyAI\u003c/h1\u003e\n  \u003cp\u003e\n    \u003cp align=\"center\"\u003e\n    \u003ca href=\"https://pypi.org/project/easilyai\"\u003e\u003cimg src=\"https://img.shields.io/pypi/v/easilyai.svg\" alt=\"PyPI\"\u003e\u003c/a\u003e\n    \u003ca href=\"tox.ini\"\u003e\u003cimg src=\"https://img.shields.io/pypi/pyversions/easilyai\" alt=\"Supported Python Versions\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://pypi.org/project/easilyai\"\u003e\u003cimg src=\"https://img.shields.io/pypi/dm/easilyai\" alt=\"PyPI Downloads\"\u003e\u003c/a\u003e\n    \u003ca href=\"LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/GustyCube/EasilyAI\" alt=\"License\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://app.deepsource.com/gh/GustyCube/EasilyAI/\"\u003e\n    \u003cimg src=\"https://app.deepsource.com/gh/GustyCube/EasilyAI.svg/?label=code+coverage\u0026show_trend=true\u0026token=Vidoy6h5_sKpG-0YdVA_ISy_\"alt=\"DeepSource\u003c/a\u003e\n    \u003ca href=\"https://github.com/gustycube/EasilyAI/graphs/contributors\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/contributors/gustycube/easilyai.svg\" alt=\"Contributors\"\u003e\n\u003c/a\u003e\n\n\u003c/p\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n**EasilyAI** is a Python library that simplifies AI app development by integrating popular AI services like **OpenAI** and **Ollama**. It provides a clean, unified interface for text generation, image generation, and text-to-speech (TTS) tasks.\n\n---\n\n## Features\n- **App Creation**: Simplify initializing AI services like OpenAI and Ollama.\n- **Text-to-Speech**: Convert text to speech with OpenAI's TTS API (with voice selection).\n- **Custom AI Support**: Integrate and register custom AI models.\n- **Unified Request Handling**: Automatically determine task types like text, image, or TTS requests.\n- **Pipeline Support**: Chain multiple tasks into a seamless workflow.\n\n---\n\n## Installation\n\nInstall the library via pip:\n\n```bash\npip install easilyai\n```\n\n---\n\n## Quick Start\n\n### 1. Create an AI App\n\nCreate an app for OpenAI:\n\n```python\nimport easilyai\n\n# Initialize an OpenAI App\napp = easilyai.create_app(\n    name=\"my_ai_app\",\n    service=\"openai\",\n    apikey=\"YOUR_OPENAI_API_KEY\",\n    model=\"gpt-4\"\n)\n\n# Make a request\nresponse = app.request(\"Tell me a joke about AI.\")\nprint(response)\n```\n\n---\n\n### 2. Generate Text-to-Speech\n\nCreate a dedicated TTS app and specify the model and voice:\n\n```python\n# Initialize a TTS App\ntts_app = easilyai.create_tts_app(\n    name=\"my_tts_app\",\n    service=\"openai\",\n    apikey=\"YOUR_OPENAI_API_KEY\",\n    model=\"tts-1\"\n)\n\n# Convert text to speech\noutput_file = tts_app.request_tts(\n    text=\"Hello, I am your AI assistant!\",\n    tts_model=\"tts-1\",\n    voice=\"onyx\",\n    output_file=\"hello_ai.mp3\"\n)\nprint(f\"TTS output saved to: {output_file}\")\n```\n\n---\n\n### 3. Use Pipelines\n\nChain multiple tasks (text generation, image generation, and TTS):\n\n```python\n# Create a pipeline\npipeline = easilyai.EasilyAIPipeline(app)\n\n# Add tasks\npipeline.add_task(\"generate_text\", \"Write a poem about AI and nature.\")\npipeline.add_task(\"generate_image\", \"A futuristic city with flying cars.\")\npipeline.add_task(\"text_to_speech\", \"Here is a talking car in a futuristic world!\")\n\n# Run the pipeline\nresults = pipeline.run()\n\n# Print results\nfor task_result in results:\n    print(f\"Task: {task_result['task']}\\nResult: {task_result['result']}\\n\")\n```\n\n---\n\n### 4. Register Custom AI Services\n\nIntegrate your own AI models into EasilyAI:\n\n```python\nfrom easilyai.custom_ai import CustomAIService, register_custom_ai\n\n# Define a custom AI service\nclass MyCustomAI(CustomAIService):\n    def generate_text(self, prompt):\n        return f\"Custom AI response for: {prompt}\"\n\n    def text_to_speech(self, text, **kwargs):\n        return f\"Custom TTS Output: {text}\"\n\n# Register the custom AI\nregister_custom_ai(\"my_custom_ai\", MyCustomAI)\n\n# Use the custom AI\ncustom_app = easilyai.create_app(name=\"custom_app\", service=\"my_custom_ai\", model=\"v1\")\nprint(custom_app.request(\"What is 2 + 2?\"))\n```\n\n---\n\n## Supported Services\n\n1. **OpenAI**\n   - Text Generation (ChatGPT models like `gpt-4o`)\n   - Image Generation (`dall-e-3`)\n   - Text-to-Speech (`tts-1`, voices: `onyx`, `alloy`, etc.)\n\n2. **Ollama**\n   - Local LLM text generation (e.g., `llama3.1`).\n\n3. **Custom AI**\n   - Extend functionality by registering your own AI services.\n\n---\n\n## Error Handling\n\nEasilyAI includes robust error handling with informative, emoji-coded messages.\n\nExamples:\n- 🔐 **Missing API Key**: \"No API key provided! Add your API key to initialize the service.\"\n- 🚫 **Invalid Request**: \"The request is invalid. Please check your inputs.\"\n- 🌐 **Connection Error**: \"Unable to connect to the API. Ensure the server is running.\"\n- ⏳ **Rate Limit Exceeded**: \"Too many requests! Wait and try again.\"\n\n---\n\n## Future Features\n\n- Full support for additional TTS providers.\n- Model-specific optimizations.\n- Enhanced CLI tools for developers.\n\n---\n\n## Contributing\n\nContributions are welcome! To contribute:\n1. Fork the repository.\n2. Create a new branch.\n3. Submit a pull request with detailed changes.\n\n---\n\n## License\n\nThis project is licensed under the **MIT License**. See the [LICENSE](LICENSE) file for details.\n\n---\n\n## Links\n\n- Documentation: [coming soon]\n- GitHub Repository: https://github.com/GustyCube/EasilyAI\n\n---\n\n## Contact\n\nFor questions, bugs, or feature requests, please reach out to **GustyCube** at **gc@gustycube.xyz**.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgustycube%2Feasilyai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgustycube%2Feasilyai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgustycube%2Feasilyai/lists"}