| Crates.io | osai_core |
| lib.rs | osai_core |
| version | 0.1.0 |
| created_at | 2025-07-17 15:39:19.860659+00 |
| updated_at | 2025-07-17 15:39:19.860659+00 |
| description | Core logic for OSAI browser-based AI systems |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1757718 |
| size | 119,240 |
osai_core is the low-level engine for the OSAI system, supporting AI interactions via WebSocket and HTTP. Designed for Raspberry Pi and local edge AI deployments.
use osai_core::OSAI;
use std::io::{Write};
use std::io;
#[tokio::main]
async fn main() {
println!("input command");
let mut in_cmd = String::new();
io::stdin().read_line(&mut in_cmd).unwrap();
let cmd = in_cmd.trim();
let osai = OSAI::new();
if cmd == "server"{
let _ = osai.run().await;
}else if cmd == "http_server"{
OSAI::http_server().await;
}else if cmd == "text" {
OSAI::send_text_cli().await;
}else{
println!("no cmd");
}
}