Skip to content

Commit a182584

Browse files
committed
Pass timeout to OpenAI client object
Not doing this makes client use the default 10 minute timeout. It causes client to stop generation after 10 minutes even if timeout option is higher, making models with slow inference unusable.
1 parent bc66c5b commit a182584

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

openevolve/llm/openai.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ def __init__(
3838
self.client = openai.OpenAI(
3939
api_key=self.api_key,
4040
base_url=self.api_base,
41+
timeout=self.timeout,
4142
)
4243

4344
# Only log unique models to reduce duplication

0 commit comments

Comments
 (0)