Skip to content

Commit

Permalink
0.2.2 Update
Browse files Browse the repository at this point in the history
  • Loading branch information
pepperoni21 committed Dec 21, 2024
1 parent ff7984b commit 8ec3b56
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ollama-rs"
version = "0.2.1"
version = "0.2.2"
edition = "2021"
license-file = "LICENSE.md"
description = "A Rust library for interacting with the Ollama API"
Expand All @@ -22,7 +22,7 @@ scraper = { version = "0.19.0", optional = true }
text-splitter = { version = "0.13.1", optional = true }
regex = { version = "1.9.3", optional = true }
async-stream = "0.3.5"
http = {version = "1.1.0", optional = true }
http = { version = "1.1.0", optional = true }

[features]
default = ["reqwest/default-tls"]
Expand All @@ -35,10 +35,10 @@ function-calling = ["scraper", "text-splitter", "regex", "chat-history"]
[dev-dependencies]
tokio = { version = "1", features = ["full"] }
ollama-rs = { path = ".", features = [
"stream",
"headers",
"chat-history",
"function-calling",
"stream",
"headers",
"chat-history",
"function-calling",
] }
base64 = "0.22.0"
schemars = "0.8.21"
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ It was made following the [Ollama API](https://github.com/jmorganca/ollama/blob/

```toml
[dependencies]
ollama-rs = "0.2.1"
ollama-rs = "0.2.2"
```

### Initialize Ollama
Expand All @@ -25,8 +25,8 @@ let ollama = Ollama::new("http://localhost".to_string(), 11434);

## Usage

Feel free to check the [Chatbot example](https://github.com/pepperoni21/ollama-rs/blob/0.2.1/examples/basic_chatbot.rs) that shows how to use the library to create a simple chatbot in less than 50 lines of code.
You can also check some [other examples](https://github.com/pepperoni21/ollama-rs/tree/0.2.1/examples).
Feel free to check the [Chatbot example](https://github.com/pepperoni21/ollama-rs/blob/0.2.2/examples/basic_chatbot.rs) that shows how to use the library to create a simple chatbot in less than 50 lines of code.
You can also check some [other examples](https://github.com/pepperoni21/ollama-rs/tree/0.2.2/examples).

_These examples use poor error handling for simplicity, but you should handle errors properly in your code._

Expand Down Expand Up @@ -133,7 +133,7 @@ ollama.clear_messages_for_id(history_id);
ollama.clear_all_messages();
```

_Check chat with history examples for [default](https://github.com/pepperoni21/ollama-rs/blob/master/examples/chat_with_history.rs) and [stream](https://github.com/pepperoni21/ollama-rs/blob/master/examples/chat_with_history_stream.rs)_
_Check chat with history examples for [default](https://github.com/pepperoni21/ollama-rs/blob/0.2.2/examples/chat_with_history.rs) and [stream](https://github.com/pepperoni21/ollama-rs/blob/0.2.2/examples/chat_with_history_stream.rs)_

### List local models

Expand Down
4 changes: 2 additions & 2 deletions src/generation/functions/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ impl crate::Ollama {
}

let response_content: String = result.message.clone().unwrap().content;
return parser
parser
.parse(&response_content, model_name, request.tools)
.await;
.await
}
}

0 comments on commit 8ec3b56

Please sign in to comment.