🐘

ellmer パッケージでタイムアウト時間を変更する

に公開

ellmer パッケージで chat するとタイムアウトする場合がある。

! Timeout was reached [api.openai.com]: Operation timed out after 60002 milliseconds with 0 bytes received

デフォルトでは 60秒でタイムアウトする。
これを5分に変更したい場合は、次のコマンドを一度実行しておけばよい。

options(ellmer_timeout_s = 5 * 60)

デフォルトは現在のバージョン 0.1.1 では 60秒だが、次バージョンから 5分に延びるぽい。

ソース

All providers now wait for up to 60s to get the complete response. You can increase this with, e.g., option(ellmer_timeout_s = 120)

Bump timeout to 5 minutes

Discussion