Skip to content

[DOCS] Rust SDK: document with_temperature and with_timeout #813

Closed

Description

Summary

The Rust SDK client gained two configuration options in
inference-gateway/rust-sdk#167 (closes inference-gateway/rust-sdk#166):

  • InferenceGatewayClient::with_temperature(Option<f64>) - sets the sampling
    temperature on chat completions, streaming and non-streaming. None keeps the
    API default of 1.0.
  • InferenceGatewayClient::with_timeout(Duration) - total request timeout on the
    underlying HTTP client. It also bounds reading the response body, so a short
    timeout cuts off a streaming call.

Affected pages

  • The Rust SDK page / SDK client-configuration section, wherever with_token,
    with_tools and with_max_tokens are documented.

Acceptance Criteria

  • Document with_temperature alongside the other builder options
  • Document with_timeout, including the caveat about streaming responses

Activity

  1. added
    documentation
    on Sep 26, 2026
  2. added theissue type on Sep 26, 2026
  3. moved this to Todo in 2026on Sep 26, 2026
  4. edenreich commented on Sep 26, 2026

    @edenreich
    Contributor

    @claude Can you work on this?

  5. inference-gateway-maintainer commented on Sep 26, 2026

    @inference-gateway-maintainer
    ContributorAuthor

    Claude finished @edenreich's task in 2m 31s —— View job • docs/issue-813-20260926-0128 • [Create PR ➔](https://github.com/inference-gateway/docs/compare/main...docs/issue-813-20260926-0128?quick_pull=1&title=Issue%20%23813%3A%20Changes%20from%20Claude&body=This%20PR%20addresses%20issue%20%23813%0A%0AGenerated%20with%20%5BClaude%20Code%5D(https%3A%2F%2Fclaude.ai%2Fcode)


    Task: document Rust SDK with_temperature / with_timeout

    • Gather context (found the Rust Client setup section in sdks.md, not inside GENERATED:* markers)
    • Verify exact signatures against rust-sdk/src/lib.rs
    • Document with_temperature
    • Document with_timeout + streaming caveat
    • Validate (lint:md, format:check, build - all pass)
    • Commit + open PR

    What changed

    sdks.md, Rust > Client setup:

    • Chained example now shows .with_temperature(Some(0.2)) and .with_timeout(Duration::from_secs(30)) alongside with_token / with_max_tokens.
    • Replaced the one-sentence prose note with a builder table covering with_token, with_max_tokens, with_temperature, with_timeout and with_tools, with argument types taken from the SDK source rather than the issue text.
    • with_temperature: noted it applies to streaming and non-streaming, and that None keeps the API default of 1.0 (the value is only sent when configured, since temperature is non-optional in the schema).
    • with_timeout: added a ::: warning callout that it bounds reading the response body too, so a short timeout cuts off a streaming call - size it for the full stream or keep a separate client for generate_content_stream.

    Per the repo convention, the doc text describes the behavior without linking the upstream SDK issue/PR numbers.

    PR: #815
    | Branch

  6. inference-gateway-releaser commented on Sep 26, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.9.17 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationreleased

    Type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions