simonw / simonw/llm

Retries w/ exponential backoff

Open
#112 3 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
12.5k
Forks
998
Avg merge
3d 13h
Merged PRs (30d)
10

Description

Would be great to add this in - I fairly often see "model overloaded" types of errors with gpt3.5-turbo and this would make things a bit more resilient.

Here's how langchain is doing it, not that it's particularly unique problem to solve 🤷:

https://github.com/hwchase17/langchain/blob/c4ece52dac8fb93c38fe818d5f1b006d29539409/langchain/chat_models/openai.py#L64-L83

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the linked LangChain implementation at langchain/chat_models/openai.py lines 64-83, then locate the corresponding model request entry point in this project. Done means transient “model overloaded” errors retry with exponential backoff; add or update tests if the request path has existing coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.