Huggingface.js 文件

介面:選項

Hugging Face's logo
加入 Hugging Face 社群

並獲得增強的文件體驗

開始使用

介面:選項

屬性

billTo

可選 billTo: 字串

用於請求的賬單賬戶。

預設情況下,請求將計入使用者的賬戶。請求只能計入使用者所屬且已訂閱企業版 Hub 的組織。

定義於

inference/src/types.ts:42


fetch

可選 fetch: (輸入: RequestInfo | URL, 初始化?: RequestInit) => Promise\<Response>

用於替代預設 fetch 函式的自定義 fetch 函式,例如用於代理或編輯請求頭。

型別宣告

▸ (輸入, 初始化?): Promise\<Response>

引數
名稱 型別
輸入 RequestInfo | URL
初始化? RequestInit
返回

Promise\<Response>

定義於

inference/src/types.ts:25


includeCredentials

可選 includeCredentials: 字串 | 布林值

(預設值:“same-origin”)。字串 | 布林值。用於請求的憑據。如果這是字串,它將直接傳遞。如果它是布林值,true 將是“include”,false 將不傳送任何憑據。

定義於

inference/src/types.ts:34


錯誤重試

可選 retry_on_error: 布林值

(預設值:true)布林值。如果請求返回 503 錯誤,將使用相同的引數重試請求。

定義於

inference/src/types.ts:20


訊號

可選 signal: AbortSignal

用於中斷請求的 Abort Controller 訊號。

定義於

inference/src/types.ts:29

< > 在 GitHub 上更新

© . This site is unofficial and not affiliated with Hugging Face, Inc.