openai_api_rust 0.1.9

A very simple Rust library for OpenAI API, free from complex async operations and redundant dependencies.
Documentation
Build #1896757 2025-03-22 09:31:29
# rustc version
rustc 1.87.0-nightly (be73c1f46 2025-03-21)# docs.rs version
docsrs 0.6.0 (004a02c4 2025-03-05)# build log
[INFO] running `Command { std: "docker" "create" "-v" "/home/cratesfyi/workspace/builds/openai_api_rust-0.1.9/target:/opt/rustwide/target:rw,Z" "-v" "/home/cratesfyi/workspace/builds/openai_api_rust-0.1.9/source:/opt/rustwide/workdir:ro,Z" "-v" "/home/cratesfyi/workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/home/cratesfyi/workspace/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:4b26683ee3c49f365255c425c23003cbf4366de097804722c29c5bbbee3624d2" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "rustdoc" "--lib" "-Zrustdoc-map" "--config" "build.rustdocflags=[\"--cfg\", \"docsrs\", \"-Z\", \"unstable-options\", \"--emit=invocation-specific\", \"--resource-suffix\", \"-20250321-1.87.0-nightly-be73c1f46\", \"--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] [stdout] 87da7017844f852797ac4d0e1123046d818100ddd55cb661c8b0eca1a05e2708
[INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.
[INFO] running `Command { std: "docker" "start" "-a" "87da7017844f852797ac4d0e1123046d818100ddd55cb661c8b0eca1a05e2708", kill_on_drop: false }`
[INFO] [stderr] warning: target filter specified, but no targets matched; this is a no-op
[INFO] [stderr]  Documenting openai_api_rust v0.1.9 (/opt/rustwide/workdir)
[INFO] [stderr] warning: unresolved link to `DONE`
[INFO] [stderr]   --> src/apis/chat.rs:41:45
[INFO] [stderr]    |
[INFO] [stderr] 41 |     /// with the stream terminated by a data: [DONE] message. See the OpenAI Cookbook for example code.
[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/apis/completions.rs:70:45
[INFO] [stderr]    |
[INFO] [stderr] 70 |     /// 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/apis/audio.rs:33:17
[INFO] [stderr]    |
[INFO] [stderr] 33 |     /// ISO-639-1: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
[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] 33 |     /// ISO-639-1: <https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes>
[INFO] [stderr]    |                    +                                                     +
[INFO] [stderr] 
[INFO] [stderr] warning: this URL is not a hyperlink
[INFO] [stderr]   --> src/apis/completions.rs:96:16
[INFO] [stderr]    |
[INFO] [stderr] 96 |     /// See more: https://platform.openai.com/docs/api-reference/parameter-details
[INFO] [stderr]    |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stderr]    |
[INFO] [stderr]    = note: bare URLs are not automatically turned into clickable links
[INFO] [stderr] help: use an automatic link instead
[INFO] [stderr]    |
[INFO] [stderr] 96 |     /// See more: <https://platform.openai.com/docs/api-reference/parameter-details>
[INFO] [stderr]    |                   +                                                                +
[INFO] [stderr] 
[INFO] [stderr] warning: this URL is not a hyperlink
[INFO] [stderr]    --> src/apis/completions.rs:124:18
[INFO] [stderr]     |
[INFO] [stderr] 124 |     /// Learn more: https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids
[INFO] [stderr]     |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stderr]     |
[INFO] [stderr]     = note: bare URLs are not automatically turned into clickable links
[INFO] [stderr] help: use an automatic link instead
[INFO] [stderr]     |
[INFO] [stderr] 124 |     /// Learn more: <https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids>
[INFO] [stderr]     |                     +                                                                          +
[INFO] [stderr] 
[INFO] [stderr] warning: `openai_api_rust` (lib doc) generated 5 warnings (run `cargo fix --lib -p openai_api_rust` to apply 3 suggestions)
[INFO] [stderr]     Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.74s
[INFO] [stderr]    Generated /opt/rustwide/target/x86_64-unknown-linux-gnu/doc/openai_api_rust/index.html
[INFO] running `Command { std: "docker" "inspect" "87da7017844f852797ac4d0e1123046d818100ddd55cb661c8b0eca1a05e2708", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "87da7017844f852797ac4d0e1123046d818100ddd55cb661c8b0eca1a05e2708", kill_on_drop: false }`
[INFO] [stdout] 87da7017844f852797ac4d0e1123046d818100ddd55cb661c8b0eca1a05e2708