本页还没有译文
本页 9 段还没译成한국어,下面显示的是英文原文。experimental_getBatchStatus
还没翻译译自英文(ai-sdk.dev)本页 9 段都还没译
Warning
Batch support is experimental and the API may change in patch releases.
Retrieves the latest status of an asynchronous batch. For a complete guide to the batch lifecycle, see Batch.
import { anthropic } from '@ai-sdk/anthropic';
import { experimental_getBatchStatus as getBatchStatus } from 'ai';
const status = await getBatchStatus({
provider: anthropic,
batch,
});
console.log(status.status, status.requestCounts);Import
import { experimental_getBatchStatus } from "ai"API Signature
Parameters
provider?(Experimental_BatchProvider): The provider used to access the batch. Defaults to the global provider, or the AI Gateway when no global provider is configured.batch(Experimental_BatchReference): The serializable reference returned by experimental_startBatch.providerOptions?(ProviderOptions): Additional provider-specific options for status retrieval.maxRetries?(number): Maximum number of retries for status retrieval. Set to 0 to disable retries. Default: 2.abortSignal?(AbortSignal): An optional abort signal to cancel the request.timeout?(number | { totalMs?: number }): Maximum time allowed for the status request.headers?(Record<string, string | undefined>): Additional HTTP headers for the request.
Returns
status('pending' | 'completed' | 'failed'): The latest normalized batch status.rawStatus?(string): The provider-specific batch status, when available.requestCounts?({ total: number; pending: number; completed: number; failed: number }): Provider-reported request counts.error?(Experimental_BatchError): Error details when the batch fails.createdAt?(string): Creation timestamp, when provided by the provider.expiresAt?(string): Expiration timestamp, when provided by the provider.providerMetadata?(ProviderMetadata): Provider-specific metadata for the batch.
AI 翻译查看英文原文