| Crates.io | topkio |
| lib.rs | topkio |
| version | 0.1.5 |
| created_at | 2025-01-21 15:46:47.485083+00 |
| updated_at | 2025-01-30 02:36:49.171436+00 |
| description | Not all AI agent frameworks are called topkio. |
| homepage | |
| repository | https://github.com/zTgx/topkio.rs.git |
| max_upload_size | |
| id | 1525002 |
| size | 103,673 |
Not all AI agent frameworks are called topkio.
Small, fast, powerful, and easy to use.
WIP
use topkio::{AgentBuilder, OpenAIClient};
#[tokio::main]
async fn main() {
let client = OpenAIClient::with_ollama("http://localhost:11434/v1");
let agent = AgentBuilder::new(client, "llama3.2")
.stream(true)
.temperature(0.8)
.build();
let f = |res: &str| {
print!("{}", res);
};
let prompt = "Entertain me";
let _ = agent.prompt(prompt, f).await;
println!("\n");
}