Adds function calling
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user