Improve behaviour for read timeouts

未關閉
#809 0 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
5/5
預估耗時
一週以上
新手友好度
25/100
Issue 類型
缺陷
描述清晰度
需要釐清
活躍度
停滯
技術堆疊
python
領域
api, backend

研究方向

首先檢視 issue #769 中描述的重試變更,以及 Python 函式庫對 httpx.ReadTimeout 的處理方式。將該行為與 10 分鐘的預設逾時進行比較,並確定一項具體且可測試的改進。完成的標準是:發生讀取逾時的請求不再累積過多的重試時間,同時保留預期的重試行為。

由索引模型根據 Issue 內容生成。

描述

enhancement sdk
Confirm this is an issue with the Python library and not an underlying OpenAI API
  • This is an issue with the Python library
Describe the bug

The fix for https://github.com/openai/openai-python/issues/769 involved adding retries for httpx.ReadTimeout exceptions which works but as the default timeout is 10 minutes, this can quickly rack up time spent in API requests.

We should figure out a better solution here.

To Reproduce

N/A

Code snippets

No response

OS

N/A

Python version

N/A

Library version

v1.2.4

主要語言
Python
星號
32.2k
分支
5.8k
平均合併
12 小時 29 分鐘
30 天內合併 PR
112

環境準備

在 Codespaces 中開啟

在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

openai/openai-python 的其他 Issue

查看 openai/openai-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。