pub fn run_agent(
endpoint: &str,
model: &str,
system_prompt: &str,
user_message: &str,
callback: &mut dyn FnMut(&str) -> Result<()>,
) -> Result<String>Expand description
Run an agent loop using direct HTTP with function calling.
This creates an agent loop where:
- Model receives a prompt and thinks about what to do
- Model requests tool execution if needed
- Runtime executes the tool
- Runtime feeds result back to model
- Loop continues until task is complete