feat: add ollama client #643
Annotations
4 errors
Run clippy action:
rig-core/src/providers/ollama.rs#L94
error: you should consider adding a `Default` implementation for `Client`
--> rig-core/src/providers/ollama.rs:94:5
|
94 | / pub fn new() -> Self {
95 | | Self::from_url(OLLAMA_API_BASE_URL)
96 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
= note: `-D clippy::new-without-default` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::new_without_default)]`
help: try adding this
|
93 + impl Default for Client {
94 + fn default() -> Self {
95 + Self::new()
96 + }
97 + }
|
|
Run clippy action:
rig-core/src/providers/ollama.rs#L345
error: empty line after doc comment
--> rig-core/src/providers/ollama.rs:345:1
|
345 | / /// In our unified API, we set the associated Response type to be a JSON value.
346 | | // -----------------------------
347 | | // Additional conversion implementations
348 | | // -----------------------------
349 | |
| |_^
...
352 | impl TryFrom<crate::message::Message> for Vec<Message> {
| ------------------------------------------------------ the comment documents this implementation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments
= note: `-D clippy::empty-line-after-doc-comments` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::empty_line_after_doc_comments)]`
= help: if the empty line is unintentional remove it
help: if the doc comment should not document `` comment it out
|
345 | // /// In our unified API, we set the associated Response type to be a JSON value.
| ++
|
Run clippy action:
rig-core/src/providers/ollama.rs#L680
error: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
--> rig-core/src/providers/ollama.rs:680:21
|
680 | / match ac {
681 | | crate::message::AssistantContent::Text(t) => texts.push(t.text),
682 | | _ => {}
683 | | }
| |_____________________^ help: try: `if let crate::message::AssistantContent::Text(t) = ac { texts.push(t.text) }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match
= note: `-D clippy::single-match` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::single_match)]`
|
Run clippy action
Clippy has exited with exit code 101
|
Loading