Potential misleading documentation on OpenAiClientAsync
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 1.5k
- Forks
- 264
- Avg merge
- 9h 46m
- Merged PRs (30d)
- 96
Description
OpenAIClientAsync's documentation states:
This client performs best when you create a single instance and reuse it for all interactions
with the REST API. This is because each client holds its own connection pool and thread pools.
Reusing connections and threads reduces latency and saves memory. The client also handles rate
limiting per client. This means that creating and using multiple instances at the same time will
not respect rate limits. (emphasis mine)
However I find no evidence on rate limits actually being used proactively as the text suggests. I can only find evidence of reactive retry, when encountering 429 errors it automatically retries with an exponential backoff. However, that is request specific, not global to the client.
Is my understanding incorrect here or is this a documentation error? Thanks in advance.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the documentation in openai-java-core/src/main/kotlin/com/openai/client/OpenAIClientAsync.kt around the cited lines. Compare its rate-limit wording with the retry behavior described in the issue and inspect the relevant client behavior. Done means confirming whether the statement is accurate and updating the documentation if it is misleading.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- api, documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100