mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-09 14:57:59 -05:00
Tweak connect exceptions (#1120)
* Clean up manual sleep * Add default retries and document them. * Add doctrings to llm * Add exponential backoff for rate limiting errors * Get embeddings for the action and its own content, not the user message * Add a few bad exceptions to stop loop * Stop loop when the step has no action * Add action with content, no message, to history * make retry settings customizable * fix condense to stop the loop for the same reasons as completion * Add 500-504 exception to retries * document the retry variables * Add retries and limits for embeddings. Replaces llama-index hard-coded decorator. * Rename to retry_min_wait and retry_max_wait
This commit is contained in:
@@ -177,6 +177,11 @@ can only be as powerful as the models driving it--fortunately folks on our team
|
||||
are actively working on building better open source models!
|
||||
|
||||
|
||||
**Note on API retries and rate limits:**
|
||||
Some LLMs have rate limits and may require retries. OpenDevin will automatically retry requests if it receives a 429 error or API connection error.
|
||||
You can set LLM_NUM_RETRIES, LLM_RETRY_MIN_WAIT, LLM_RETRY_MAX_WAIT environment variables to control the number of retries and the time between retries.
|
||||
By default, LLM_NUM_RETRIES is 5 and LLM_RETRY_MIN_WAIT, LLM_RETRY_MAX_WAIT are 3 seconds and respectively 60 seconds.
|
||||
|
||||
## ⭐️ Research Strategy
|
||||
|
||||
Achieving full replication of production-grade applications with LLMs is a complex endeavor. Our strategy involves:
|
||||
|
||||
Reference in New Issue
Block a user