You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A reliable, autonomous LLM runtime and driver orchestration engine.
Capable of processing natural language and automatically executing OS-native drivers, fundamentally enabling the LLM to truly take over the computer.
Synchronous blocking call. The function waits until the task completes and returns the result directly.
2. How it works
Call execute() method
Task starts immediately in the current thread
Code pauses and waits for completion
Returns HippoxStringResult result directly
3. Use when
You need the result immediately and don't want to manage task state.
use hippox::Hippox;use langhub::types::ModelProvider;#[tokio::main]asyncfnmain() -> anyhow::Result<()>{let hippox = Hippox::builder(ModelProvider::OpenAI).api_key("sk-xxx").build().await?;// Execute and wait for resultlet result = hippox.execute("Calculate 15 * 3",None).await;println!("Result: {}", result);Ok(())}
Custom Drivers and Driver Classification
use hippox_drivers::{Driver,DriverCallback,DriverCategory,DriverContext,DriverError,DriverResult,DriverParameter, register_driver,};use serde_json::{json,Value};use std::collections::HashMap;use std::sync::Arc;constCATEGORY_WEATHER:DriverCategory = DriverCategory::Custom("weather_ops");#[derive(Debug)]pubstructWeatherDriver;#[async_trait::async_trait]implDriverforWeatherDriver{fnname(&self) -> &str{"weather_query"}fndescription(&self) -> &str{"Query weather for a city"}fncategory(&self) -> DriverCategory{CATEGORY_WEATHER}fnparameters(&self) -> Vec<DriverParameter>{vec![DriverParameter{
name:"city".to_string(),
param_type:"string".to_string(),
description:"City name".to_string(),
required:true,default:None,
example:Some(Value::String("Beijing".to_string())),
enum_values:None,}]}fnexample_call(&self) -> DriverResult<Value>{Ok(json!({"action":"weather_query","parameters":{"city":"Beijing"}}))}fnexample_output(&self) -> String{"Weather for Beijing: 25°C, Sunny".to_string()}asyncfnexecute(&self,parameters:&HashMap<String,Value>,_callback:Option<&dynDriverCallback>,_context:Option<&DriverContext>,) -> DriverResult<String>{let city = parameters.get("city").and_then(|v| v.as_str()).ok_or_else(|| DriverError::missing_parameter("city"))?;Ok(format!("Weather for {}: 25°C, Sunny", city))}}#[tokio::main]asyncfnmain() -> anyhow::Result<()>{// Register custom driverregister_driver(CATEGORY_WEATHER,"weather_query".to_string(),Arc::new(WeatherDriver),);// Verify: get driver and executeuse hippox_drivers::get_driver_by_name;let driver = get_driver_by_name("weather_query").unwrap();letmut params = HashMap::new();
params.insert("city".to_string(),json!("Shanghai"));let result = driver.execute(¶ms,None,None).await?;println!("{}", result);// Weather for Shanghai: 25°C, Sunny// Verify custom category is registereduse hippox_drivers::get_all_categorys;println!("All categories: {:?}", get_all_categorys());// includes "weather_ops"Ok(())}
Configuration
1. HippoxConfig
/// Hippox global configuration#[derive(Debug,Clone, serde::Deserialize, serde::Serialize)]pubstructHippoxConfig{/// Language setting: "en" or "zh"publang:String,/// AI identity information (name, role, personality, etc.)pubidentity_information:IdentityInformation,}
2. IdentityInformation
/// AI identity configuration#[derive(Debug,Clone, serde::Deserialize, serde::Serialize)]pubstructIdentityInformation{/// AI name, e.g., "Assistant", "Hippox"pubname:Option<String>,/// Gender, e.g., "male", "female", "neutral"pubsex:Option<String>,/// Age, e.g., "25", "young"pubage:Option<String>,/// Species, e.g., "AI", "human", "robot"pubspecies:Option<String>,/// Role, e.g., "assistant", "teacher", "life coach"pubrole:Option<String>,/// Personality, e.g., "friendly", "humorous", "professional"pubpersonality:Option<String>,/// Tone style, e.g., "casual", "formal", "poetic"pubtone_style:Option<String>,/// Knowledge scope, e.g., "general", "medical", "programming"pubknowledge_scope:Option<String>,/// Catchphrase, e.g., "Haha", "I see", "Let's go"pubcatchphrase:Option<String>,/// Prohibited topics, e.g., "no politics", "no medical advice"pubtaboos:Option<String>,}
🦛A reliable, autonomous LLM runtime and driver orchestration engine. Capable of processing natural language and automatically executing OS-native drivers, fundamentally enabling the LLM to truly take over the computer.