| Crates.io | aineed-core |
| lib.rs | aineed-core |
| version | 0.1.1 |
| created_at | 2024-12-26 23:17:45.057952+00 |
| updated_at | 2024-12-27 00:15:56.162836+00 |
| description | Core library for the aineed AI assistant tool |
| homepage | |
| repository | https://github.com/nbiish/aineed |
| max_upload_size | |
| id | 1496042 |
| size | 43,888 |
aineed is a versatile AI assistant tool that provides a unified interface for interacting with multiple AI providers, including OpenAI, Anthropic, TogetherAI, and OpenRouter. It's available as both a Rust crate and a Python package, making it easy to integrate into your projects regardless of your preferred language.
Multiple AI Providers: Supports a wide range of AI models:
Text Generation: Create compelling content, generate code, or get answers to your questions with powerful language models.
Image Generation: Turn your ideas into stunning visuals with state-of-the-art image generation models.
File Processing: Seamlessly process files as input and output for your AI tasks.
Cross-Platform: Use aineed as a command-line tool or integrate it into your Python scripts.
Configurable: Customize parameters like token limits and temperature to fine-tune the AI's output.
We are excited to announce upcoming features for aineed:
aineed.aineed to your specific needs.Stay tuned for these and more updates in future releases!
If you find aineed helpful,
consider supporting its development!
I'm a full-time student and this is a side project:
Thank you for your support!
To install aineed as a Rust crate, use Cargo:
cargo install aineed
This will download and compile aineed from crates.io and add it to your Cargo bin directory.
To install aineed as a Python package, use pip:
pip install aineed
This will download and install aineed from PyPI along with its dependencies.
Before using aineed, you need to set your API keys for the providers you want to use:
aineed --set-openai "your-openai-key-here"
aineed --set-anthropic "your-anthropic-key-here"
aineed --set-togetherai "your-togetherai-key-here"
aineed --set-openrouter "your-openrouter-key-here"
Generate text using various models:
# OpenAI
aineed openai:gpt-3.5-turbo -p "Who are the Anishinaabe?"
# Anthropic
aineed anthropic:claude-3-sonnet -p "Tell me a story" -o story.txt
# TogetherAI
aineed togetherai:llama-2-70b -p "Explain quantum physics" -s
# OpenRouter
aineed openrouter:mistralai/mistral-7b-instruct -p "What is the capital of France?"
Create images from text prompts:
# OpenAI DALL-E 3
aineed openai:dall-e-3 -i -p "A cyberpunk scene with neon lights and flying cars"
# TogetherAI FLUX
aineed togetherai:black-forest-labs/FLUX.1-schnell -i -p "A fantasy landscape with a dragon and a castle"
Process files with aineed:
# Summarize a file using OpenAI GPT-4
aineed openai:gpt-4 -f input.txt -p "Summarize this" > summary.txt
# Analyze text from stdin using Anthropic Claude 3
cat input.txt | aineed anthropic:claude-3 -p "Analyze this text"
from aineed import Client
# Set API key for OpenAI
Client.set_api_key("openai", "your-openai-key-here")
from aineed import Client
# Create a client for OpenAI GPT-3.5 Turbo
client = Client("openai:gpt-4o-mini")
# Generate text
async def main():
text = await client.generate("Tell me a story about a robot Nanaboozhoo doing magic.")
print(text)
if __name__ == "__main__":
import asyncio
asyncio.run(main())
from aineed import Client
# Create a client for OpenAI DALL-E 3
client = Client("openai:dall-e-3")
# Generate an image
async def main():
image_path = await client.generate_image("A futuristic Anishinaabe cityscape at night", "output.png")
print(f"Image saved to: {image_path}")
if __name__ == "__main__":
import asyncio
asyncio.run(main())
import os
os.system("aineed openai:gpt-4o-mini -p 'Who are the Anishinaabe?'")
You can configure aineed to use default providers and models, so you don't have to specify them every time.
To set a default provider, use the --set-default-provider flag:
aineed --set-default-provider openai
To set a default model for a provider, use the --set-default-model flag:
aineed --set-default-model openai gpt-4
Now, when you run aineed without specifying a provider or model, it will use the defaults you've set.
Contributions to aineed are welcome! If you'd like to contribute, please follow these steps:
aineed repository.Please ensure your code follows the project's coding style and includes appropriate tests.
aineed is released under the MIT License. See the LICENSE file for more details.
Note: Will not contain all available models from providers as they change often
aineed -p "Cyberpunk Nanaboozhoo" -t 234 -o cyberpunk-nanaboozhoo.txt
aineed openai:gpt-3.5-turbo -p "who are the Anishinaabe?"
aineed openrouter:google/gemini-exp-1206:free -p "who are the Anishinaabe?" -o Anishinaabe.txt
aineed openai:dall-e-3 -i -p "Cyberpunk Nanaboozhoo"
aineed togetherai:black-forest-labs/FLUX.1-schnell -i -p "Cyberpunk Nanaboozhoo" -o cyberpunk-nanaboozhoo.png
aineed anthropic:claude-3-5-sonnet-latest -p "Give me a silly Nanaboozhoo story" -o silly-nanaboozhoo-story.txt
aineed openai:gpt-4o-turbo -s -p "Tell me a story about Nanaboozhoo and the rabbits"
cat story.txt | aineed openai:gpt-3.5-turbo -s -t 100 -p "summarize this" > summary.txt
aineed anthropic:claude-3-5-sonnet-latest -f story.txt -p "summarize this" > summary.txt
aineed togetherai:meta-llama/Llama-3.3-70b-instruct-turbo -p "Tell me a story about Nanaboozhoo and the rabbits" -s -o nanaboozhoo-and-the-rabbits.txt
aineed openrouter:google/gemini-2.0-flash-exp --temp 0.9 -t 999 -p "Tell me a Nanaboozhoo fantasy adventure" -o nanaboozhoo-fantasy-adventure.txt