openai_api_rust 0.1.9

A very simple Rust library for OpenAI API, free from complex async operations and redundant dependencies.
Documentation
Build #2342723 2025-07-23 08:16:36
# rustc version
rustc 1.90.0-nightly (a7a1618e6 2025-07-22)# docs.rs version
docsrs 0.6.0 (4b4a3779 2025-07-22)# build log
[INFO] running `Command { std: "docker" "create" "-v" "/home/cratesfyi/workspace-builder/builds/openai_api_rust-0.1.9/target:/opt/rustwide/target:rw,Z" "-v" "/home/cratesfyi/workspace-builder/builds/openai_api_rust-0.1.9/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:cf8efcab8866f2cf4285301c7418e2f4f2a9b088c91ba69c40d5b659f81557f7" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "rustdoc" "--lib" "-Zrustdoc-map" "--config" "build.rustdocflags=[\"--cfg\", \"docsrs\", \"-Z\", \"unstable-options\", \"--emit=invocation-specific\", \"--resource-suffix\", \"-20250722-1.90.0-nightly-a7a1618e6\", \"--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] 8ae216186fa7cfbf2866bc0731c81a63ca25ef17a414d69eb3d9175f4c591573
[INFO] running `Command { std: "docker" "start" "-a" "8ae216186fa7cfbf2866bc0731c81a63ca25ef17a414d69eb3d9175f4c591573", 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.65s
[INFO] [stderr]    Generated /opt/rustwide/target/x86_64-unknown-linux-gnu/doc/openai_api_rust/index.html
[INFO] running `Command { std: "docker" "inspect" "8ae216186fa7cfbf2866bc0731c81a63ca25ef17a414d69eb3d9175f4c591573", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "8ae216186fa7cfbf2866bc0731c81a63ca25ef17a414d69eb3d9175f4c591573", kill_on_drop: false }`
[INFO] [stdout] 8ae216186fa7cfbf2866bc0731c81a63ca25ef17a414d69eb3d9175f4c591573