llm_stream 0.3.1

A very simple Rust library to simplify streaming api interaction with LLMs, free from complex async operations and redundant dependencies.
Documentation

Build #1359637 2024-09-15 00:21:33

# rustc version rustc 1.83.0-nightly (9c01301c5 2024-09-05)

# docs.rs version docsrs 0.6.0 (1b41ab79 2024-09-12)

# build log [INFO] running `Command { std: "docker" "create" "-v" "/home/cratesfyi/workspace-builder/builds/llm_stream-0.3.1/target:/opt/rustwide/target:rw,Z" "-v" "/home/cratesfyi/workspace-builder/builds/llm_stream-0.3.1/source:/opt/rustwide/workdir:ro,Z" "-v" "/home/cratesfyi/workspace-builder/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/home/cratesfyi/workspace-builder/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "DOCS_RS=1" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "6442450944" "--cpus" "6" "--user" "1001:1001" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:96c0aa5895ecf336b730ef27bcdde6e21027415df19888aad3cf1448e5d65d90" "/opt/rustwide/cargo-home/bin/cargo" "+nightly-2024-09-06" "rustdoc" "--lib" "-Zrustdoc-map" "--config" "build.rustdocflags=[\"--cfg\", \"docsrs\", \"-Z\", \"unstable-options\", \"--emit=invocation-specific\", \"--resource-suffix\", \"-20240905-1.83.0-nightly-9c01301c5\", \"--static-root-path\", \"/-/rustdoc.static/\", \"--cap-lints\", \"warn\", \"--extern-html-root-takes-precedence\"]" "--offline" "-Zunstable-options" "--config=doc.extern-map.registries.crates-io=\"https://docs.rs/{pkg_name}/{version}/x86_64-unknown-linux-gnu\"" "-Zrustdoc-scrape-examples" "-j6" "--target" "x86_64-unknown-linux-gnu", kill_on_drop: false }` [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] [stdout] f47eb4a58616e9caf985d9fd0b68b58fd9177a0d6425280611d3c724ec51529a [INFO] running `Command { std: "docker" "start" "-a" "f47eb4a58616e9caf985d9fd0b68b58fd9177a0d6425280611d3c724ec51529a", kill_on_drop: false }` [INFO] [stderr] warning: Rustdoc did not scrape the following examples because they require dev-dependencies: stream_anthropic, stream_copilot, stream_google, stream_mistral, stream_mistral_fim, stream_openai [INFO] [stderr] If you want Rustdoc to scrape these examples, then add `doc-scrape-examples = true` [INFO] [stderr] to the [[example]] target configuration of at least one example. [INFO] [stderr] warning: target filter specified, but no targets matched; this is a no-op [INFO] [stderr] Documenting llm_stream v0.3.1 (/opt/rustwide/workdir) [INFO] [stderr] warning: unresolved link to `DONE` [INFO] [stderr] --> src/mistral.rs:46:175 [INFO] [stderr] | [INFO] [stderr] 46 | ...available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or... [INFO] [stderr] | ^^^^ no item named `DONE` in scope [INFO] [stderr] | [INFO] [stderr] = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` [INFO] [stderr] = note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default [INFO] [stderr] [INFO] [stderr] warning: unresolved link to `DONE` [INFO] [stderr] --> src/mistral_fim.rs:30:175 [INFO] [stderr] | [INFO] [stderr] 30 | ...available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or... [INFO] [stderr] | ^^^^ no item named `DONE` in scope [INFO] [stderr] | [INFO] [stderr] = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` [INFO] [stderr] [INFO] [stderr] warning: unresolved link to `DONE` [INFO] [stderr] --> src/openai.rs:75:188 [INFO] [stderr] | [INFO] [stderr] 75 | ...available, with the stream terminated by a data: [DONE] message. [INFO] [stderr] | ^^^^ no item named `DONE` in scope [INFO] [stderr] | [INFO] [stderr] = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` [INFO] [stderr] [INFO] [stderr] warning: this URL is not a hyperlink [INFO] [stderr] --> src/anthropic.rs:42:59 [INFO] [stderr] | [INFO] [stderr] 42 | /// See this link for additional details and options: https://docs.anthropic.com/claude/docs/models-overview [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: bare URLs are not automatically turned into clickable links [INFO] [stderr] = note: `#[warn(rustdoc::bare_urls)]` on by default [INFO] [stderr] help: use an automatic link instead [INFO] [stderr] | [INFO] [stderr] 42 | /// See this link for additional details and options: <https://docs.anthropic.com/claude/docs/models-overview> [INFO] [stderr] | + + [INFO] [stderr] [INFO] [stderr] warning: `llm_stream` (lib doc) generated 4 warnings (run `cargo fix --lib -p llm_stream` to apply 1 suggestion) [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.77s [INFO] [stderr] Generated /opt/rustwide/target/x86_64-unknown-linux-gnu/doc/llm_stream/index.html [INFO] running `Command { std: "docker" "inspect" "f47eb4a58616e9caf985d9fd0b68b58fd9177a0d6425280611d3c724ec51529a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f47eb4a58616e9caf985d9fd0b68b58fd9177a0d6425280611d3c724ec51529a", kill_on_drop: false }` [INFO] [stdout] f47eb4a58616e9caf985d9fd0b68b58fd9177a0d6425280611d3c724ec51529a