chatgpt-functions 0.3.6

This crate provides a wrapper around the OpenAI API to use GPT-3.5 and GPT-4 for chatbots. It also provides a way to define functions that can be called from the chatbot.
Documentation
Build #852711 2023-07-03 18:21:07
# rustc version
rustc 1.72.0-nightly (839e9a6e1 2023-07-02)# docs.rs version
docsrs 0.6.0 (eb803472 2023-06-29)# build log
[INFO] running `Command { std: "docker" "create" "-v" "/home/cratesfyi/workspace/builds/chatgpt-functions-0.3.6/target:/opt/rustwide/target:rw,Z" "-v" "/home/cratesfyi/workspace/builds/chatgpt-functions-0.3.6/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" "3221225472" "--cpus" "3" "--user" "1001:1001" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:a420fdec406141845121210faa381f8029b0be6d4170deff7c4445a424f67918" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "rustdoc" "--lib" "-Zrustdoc-map" "-Z" "unstable-options" "--config" "build.rustdocflags=[\"-Z\", \"unstable-options\", \"--emit=invocation-specific\", \"--resource-suffix\", \"-20230702-1.72.0-nightly-839e9a6e1\", \"--static-root-path\", \"/-/rustdoc.static/\", \"--cap-lints\", \"warn\", \"--disable-per-crate-search\", \"--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" "-j3" "--target" "x86_64-unknown-linux-gnu", kill_on_drop: false }`
[INFO] [stdout] e96e11260674caad02ea780cf15aa305a8a86ef371cb3a1bae4bf6b1c3c379f2
[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" "e96e11260674caad02ea780cf15aa305a8a86ef371cb3a1bae4bf6b1c3c379f2", kill_on_drop: false }`
[INFO] [stderr] warning: Rustdoc did not scrape the following examples because they require dev-dependencies: talk, talk_with_functions, talk_with_functions_json
[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 chatgpt-functions v0.3.6 (/opt/rustwide/workdir)
[INFO] [stderr] warning: this URL is not a hyperlink
[INFO] [stderr]    --> src/chat_gpt.rs:260:9
[INFO] [stderr]     |
[INFO] [stderr] 260 |     /// https://platform.openai.com/docs/api-reference/chat/create#chat/create-messages
[INFO] [stderr]     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `<https://platform.openai.com/docs/api-reference/chat/create#chat/create-messages>`
[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] 
[INFO] [stderr] warning: this URL is not a hyperlink
[INFO] [stderr]  --> src/function_specification.rs:9:5
[INFO] [stderr]   |
[INFO] [stderr] 9 | /// https://platform.openai.com/docs/api-reference/chat/create#chat/create-parameters
[INFO] [stderr]   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `<https://platform.openai.com/docs/api-reference/chat/create#chat/create-parameters>`
[INFO] [stderr]   |
[INFO] [stderr]   = note: bare URLs are not automatically turned into clickable links
[INFO] [stderr] 
[INFO] [stderr] warning: this URL is not a hyperlink
[INFO] [stderr]   --> src/function_specification.rs:13:10
[INFO] [stderr]    |
[INFO] [stderr] 13 | ...url https://api.openai.com/v1/chat/completions   -H "Content-Type: application/json"   -H "Authorization: Bearer $OPENAI_API_KEY"   -d '{
[INFO] [stderr]    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `<https://api.openai.com/v1/chat/completions>`
[INFO] [stderr]    |
[INFO] [stderr]    = note: bare URLs are not automatically turned into clickable links
[INFO] [stderr] 
[INFO] [stderr] warning: this URL is not a hyperlink
[INFO] [stderr]   --> src/function_specification.rs:36:10
[INFO] [stderr]    |
[INFO] [stderr] 36 | ...url https://api.openai.com/v1/chat/completions   -H "Content-Type: application/json"   -H "Authorization: Bearer $OPENAI_API_KEY"   -d '{
[INFO] [stderr]    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `<https://api.openai.com/v1/chat/completions>`
[INFO] [stderr]    |
[INFO] [stderr]    = note: bare URLs are not automatically turned into clickable links
[INFO] [stderr] 
[INFO] [stderr] warning: this URL is not a hyperlink
[INFO] [stderr]    --> src/message.rs:116:5
[INFO] [stderr]     |
[INFO] [stderr] 116 | /// https://platform.openai.com/docs/api-reference/chat/create
[INFO] [stderr]     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `<https://platform.openai.com/docs/api-reference/chat/create>`
[INFO] [stderr]     |
[INFO] [stderr]     = note: bare URLs are not automatically turned into clickable links
[INFO] [stderr] 
[INFO] [stderr] warning: `chatgpt-functions` (lib doc) generated 5 warnings (run `cargo fix --lib -p chatgpt-functions` to apply 5 suggestions)
[INFO] [stderr]     Finished dev [unoptimized + debuginfo] target(s) in 1.46s
[INFO] running `Command { std: "docker" "inspect" "e96e11260674caad02ea780cf15aa305a8a86ef371cb3a1bae4bf6b1c3c379f2", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "e96e11260674caad02ea780cf15aa305a8a86ef371cb3a1bae4bf6b1c3c379f2", kill_on_drop: false }`
[INFO] [stdout] e96e11260674caad02ea780cf15aa305a8a86ef371cb3a1bae4bf6b1c3c379f2