Documentation Index
Fetch the complete documentation index at: https://docs.tokenlab.sh/llms.txt
Use this file to discover all available pages before exploring further.
總覽
TokenLab 會自動管理快取以優化效能並降低成本。雖然目前沒有公開的端點可用於清除快取項目,但您可以透過請求層級的控制項來完全掌控快取行為。 本頁是 request-side cache 指南。 如需嚴格的 API 參考頁面,請參閱:繞過快取
若要獲取不使用快取的最新回應,請在請求中使用cache_control 參數:
快取控制選項
| 類型 | 效果 |
|---|---|
no_cache | 跳過快取查詢和寫入,始終取得最新回應 |
no_store | 不要將此回應儲存在快取中 |
response_only | 僅使用完全比對快取(跳過語義比對) |
semantic_only | 僅使用語義快取(跳過完全比對) |
快取回饋
如果您收到錯誤的快取回應,可以進行回報: 請使用目前組織下快取命中的 request/cache entry 識別碼;任意 ID 會被拒絕。使用情境
測試最新回應
測試最新回應
在開發過程中,使用
cache_control: {"type": "no_cache"} 以確保您獲取的是最新的 API 回應。具時效性的查詢
具時效性的查詢
對於股票價格或天氣等即時數據,請務必使用
no_cache 以獲取最新資訊。除錯
除錯
在對非預期回應進行除錯時,請使用
no_cache 以排除快取結果的影響。有關快取的更多詳細資訊,請參閱 快取指南。