ollama-rest.rs
Asynchronous Rust bindings of Ollama REST API, using reqwest, tokio, serde, and chrono.
Install
Features
| name | status |
|---|---|
| Completion | Working ✅ |
| Embedding | Working ✅ |
| Model creation | Working ✅ |
| Model deletion | Working ✅ |
| Model pulling | Working ✅ |
| Model copying | Working ✅ |
| Local models | Working ✅ |
| Running models | Working ✅ |
| Model pushing | Experimental 🧪 |
| Tools | Experimental 🧪 |
At a glance
See source of this example.
use Write;
use ;
use json;
// By default checking Ollama at 127.0.0.1:11434
let ollama = default;
let request = .unwrap;
let mut stream = ollama.generate_streamed.await.unwrap;
while let Some = stream.next.await
println!;
Or, make your own chatbot interface! See this example (CLI) and this example (REST API).