feat: Huggingface provider integration #718
ci.yaml
on: pull_request
stable / fmt
30s
stable / check rig-core wasm target
34s
stable / clippy
51s
stable / test
3m 3s
stable / doc
1m 4s
Annotations
6 errors
an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true:
rig-core/src/providers/huggingface/completion.rs#L175
error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
--> rig-core/src/providers/huggingface/completion.rs:175:1
|
175 | impl Into<message::UserContent> for UserContent {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into
= note: `-D clippy::from-over-into` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::from_over_into)]`
help: replace the `Into` implementation with `From<providers::huggingface::completion::UserContent>`
|
175 ~ impl From<UserContent> for message::UserContent {
176 ~ fn from(val: UserContent) -> Self {
177 ~ match val {
|
|
this `match` can be collapsed into the outer `match`:
rig-core/src/providers/huggingface/completion.rs#L196
error: this `match` can be collapsed into the outer `match`
--> rig-core/src/providers/huggingface/completion.rs:196:33
|
196 | Some(format) => match format {
| _________________________________^
197 | | message::ContentFormat::String => Ok(UserContent::ImageUrl {
198 | | image_url: ImageUrl { url: data },
199 | | }),
... |
202 | | )),
203 | | },
| |_________________^
|
help: the outer pattern can be modified to include the inner pattern
--> rig-core/src/providers/huggingface/completion.rs:196:22
|
196 | Some(format) => match format {
| ^^^^^^ replace this binding
197 | message::ContentFormat::String => Ok(UserContent::ImageUrl {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match
= note: `-D clippy::collapsible-match` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::collapsible_match)]`
|
useless conversion to the same type: `std::string::String`:
rig-core/src/providers/huggingface/completion.rs#L274
error: useless conversion to the same type: `std::string::String`
--> rig-core/src/providers/huggingface/completion.rs:274:44
|
274 | ... Ok(text.into())
| ^^^^^^^^^^^ help: consider removing `.into()`: `text`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `-D clippy::useless-conversion` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::useless_conversion)]`
|
redundant closure:
rig-core/src/providers/huggingface/completion.rs#L370
error: redundant closure
--> rig-core/src/providers/huggingface/completion.rs:370:33
|
370 | content.map(|content| message::ToolResultContent::text(content)),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `message::ToolResultContent::text`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
= note: `-D clippy::redundant-closure` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::redundant_closure)]`
|
stable / clippy
Clippy has exited with exit code 101
|
stable / test
The process '/home/runner/.cargo/bin/cargo' failed with exit code 100
|