Adds function calling

This commit is contained in:
2026-01-06 21:15:20 +00:00
parent ecedb1c054
commit 53353eabe0
6 changed files with 174 additions and 27 deletions

View File

@@ -3,7 +3,7 @@ use std::{env, error::Error, io::Write};
use futures_util::StreamExt;
use ollama_rs::{OllamaClient, types::pull::PullRequest};
const MODEL: &str = "HammerAI/mythomax-l2";
const MODEL: &str = "functiongemma";
#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
@@ -12,7 +12,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
let ollama_client = OllamaClient::new(server_address);
let request = PullRequest::builder(MODEL).stream(true).build();
let mut stream = ollama_client.pull(request).await;
let mut stream = ollama_client.pull(request);
while let Some(response) = stream.next().await {
let response = response?;
println!("{:?}", response);