Skip to content

Improve: use llm to extract structured data #8

Improve: use llm to extract structured data

Improve: use llm to extract structured data #8

GitHub Actions / clippy failed Nov 1, 2024 in 0s

clippy

1 error, 8 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 1
Warning 8
Note 0
Help 0

Versions

  • rustc 1.81.0 (eeb90cda1 2024-09-04)
  • cargo 1.81.0 (2dbb1af80 2024-08-20)
  • clippy 0.1.81 (eeb90cd 2024-09-04)

Annotations

Check warning on line 34 in src/server/errors.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unreachable pattern

warning: unreachable pattern
  --> src/server/errors.rs:34:13
   |
34 |             _ => ("runtime error", StatusCode::INTERNAL_SERVER_ERROR),
   |             ^
   |
   = note: `#[warn(unreachable_patterns)]` on by default

Check failure on line 27 in src/publish/pgsql/models.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

no method named `datetime` found for reference `&publish::models::PublishNews` in the current scope

error[E0599]: no method named `datetime` found for reference `&publish::models::PublishNews` in the current scope
  --> src/publish/pgsql/models.rs:27:29
   |
27 |             .datetime(value.datetime().to_owned())
   |                             ^^^^^^^^
   |
help: there is a method `date` with a similar name
   |
27 |             .datetime(value.date().to_owned())
   |                             ~~~~

Check warning on line 147 in src/crawler/llm/prompt.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

constants have by default a `'static` lifetime

warning: constants have by default a `'static` lifetime
   --> src/crawler/llm/prompt.rs:147:55
    |
147 | pub(super) const _SCRAPE_HTML_SYSTEM_PROMPT_AS_JSON: &'static str = r#"
    |                                                      -^^^^^^^---- help: consider removing `'static`: `&str`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes

Check warning on line 85 in src/crawler/llm/prompt.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

constants have by default a `'static` lifetime

warning: constants have by default a `'static` lifetime
  --> src/crawler/llm/prompt.rs:85:54
   |
85 | pub(super) const _SCRAPE_HTML_SYSTEM_PROMPT_AS_XML: &'static str = r#"
   |                                                     -^^^^^^^---- help: consider removing `'static`: `&str`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes

Check warning on line 45 in src/crawler/llm/prompt.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

constants have by default a `'static` lifetime

warning: constants have by default a `'static` lifetime
  --> src/crawler/llm/prompt.rs:45:54
   |
45 | pub(super) const SCRAPE_HTML_SYSTEM_PROMPT_AS_TEXT: &'static str = r#"
   |                                                     -^^^^^^^---- help: consider removing `'static`: `&str`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes

Check warning on line 5 in src/crawler/llm/prompt.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

constants have by default a `'static` lifetime

warning: constants have by default a `'static` lifetime
 --> src/crawler/llm/prompt.rs:5:51
  |
5 | pub(super) const _SCRAPE_HTML_SYSTEM_PROMPT_SUM: &'static str = r#"
  |                                                  -^^^^^^^---- help: consider removing `'static`: `&str`
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes

Check warning on line 3 in src/crawler/llm/prompt.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

constants have by default a `'static` lifetime

warning: constants have by default a `'static` lifetime
 --> src/crawler/llm/prompt.rs:3:36
  |
3 | pub(super) const USER_QUERY_NAME: &'static str = "user-query";
  |                                   -^^^^^^^---- help: consider removing `'static`: `&str`
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes

Check warning on line 2 in src/crawler/llm/prompt.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

constants have by default a `'static` lifetime

warning: constants have by default a `'static` lifetime
 --> src/crawler/llm/prompt.rs:2:39
  |
2 | pub(super) const SYSTEM_PROMPT_NAME: &'static str = "system-prompt";
  |                                      -^^^^^^^---- help: consider removing `'static`: `&str`
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes

Check warning on line 1 in src/crawler/llm/prompt.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

constants have by default a `'static` lifetime

warning: constants have by default a `'static` lifetime
 --> src/crawler/llm/prompt.rs:1:35
  |
1 | pub(super) const LLM_MODEL_NAME: &'static str = "gpt-4o-2024-08-06";
  |                                  -^^^^^^^---- help: consider removing `'static`: `&str`
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
  = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default