A simple command-line interface for interacting with AI chat services, built in Rust. It uses ApiFreeLLM as its AI api.
- Real-time AI chat through terminal
- Automatic retry on connection failures (might have to
<C-c>sometimes) - Reusable API client library
- Async/await with Tokio
git clone https://github.com/AshLink95/CrabbyBuddy.git
cd CrabbyBuddy
cargo build --releaseFor an optimized build on linux, consider
RUSTFLAGS="-C target-cpu=native -C lto=fat" cargo build --release --target x86_64-unknown-linux-gnuUsing the optimal build flag, the binary will be available at
Crabbybuddy/target/x86_64-unknown-linux-gnu/release/crabbybuddy
# Start chatting
crabbybuddy
# Show help
crabbybuddy --helpType your messages and press Enter. Type Bye! to exit.
Add to your Cargo.toml:
[dependencies]
crabbybuddy = "0.1.0"In your code, you can follow this example:
use crabbybuddy::ApiFreeLLM;
#[tokio::main]
async fn main() {
let response = ApiFreeLLM::new("Hello, AI!").await;
println!("{}", response.get_resp());
}or, check main.rs!