Skip to content

feat: Huggingface provider integration #717

feat: Huggingface provider integration

feat: Huggingface provider integration #717

Triggered via pull request February 25, 2025 02:12
Status Failure
Total duration 2m 50s
Artifacts

ci.yaml

on: pull_request
stable / fmt
16s
stable / fmt
stable / check rig-core wasm target
25s
stable / check rig-core wasm target
stable / clippy
41s
stable / clippy
stable / test
2m 41s
stable / test
stable / doc
44s
stable / doc
Fit to window
Zoom out
Zoom in

Annotations

7 errors and 10 warnings
stable / fmt
Process completed with exit code 1.
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
stable / fmt: rig-core/examples/agent_with_huggingface.rs#L31
Diff in /home/runner/work/rig/rig/rig-core/examples/agent_with_huggingface.rs
stable / fmt: rig-core/examples/agent_with_huggingface.rs#L92
Diff in /home/runner/work/rig/rig/rig-core/examples/agent_with_huggingface.rs
stable / fmt: rig-core/examples/huggingface_streaming.rs#L1
Diff in /home/runner/work/rig/rig/rig-core/examples/huggingface_streaming.rs
stable / fmt: rig-core/src/providers/huggingface/client.rs#L64
Diff in /home/runner/work/rig/rig/rig-core/src/providers/huggingface/client.rs
stable / fmt: rig-core/src/providers/huggingface/client.rs#L79
Diff in /home/runner/work/rig/rig/rig-core/src/providers/huggingface/client.rs
stable / fmt: rig-core/src/providers/huggingface/client.rs#L113
Diff in /home/runner/work/rig/rig/rig-core/src/providers/huggingface/client.rs
stable / fmt: rig-core/src/providers/huggingface/completion.rs#L529
Diff in /home/runner/work/rig/rig/rig-core/src/providers/huggingface/completion.rs
stable / fmt: rig-core/src/providers/huggingface/completion.rs#L541
Diff in /home/runner/work/rig/rig/rig-core/src/providers/huggingface/completion.rs
stable / fmt: rig-core/src/providers/huggingface/streaming.rs#L1
Diff in /home/runner/work/rig/rig/rig-core/src/providers/huggingface/streaming.rs
stable / fmt: rig-core/src/providers/huggingface/streaming.rs#L9
Diff in /home/runner/work/rig/rig/rig-core/src/providers/huggingface/streaming.rs