Skip to content

AnthropicBatchApi

Namespace: Vercel.AI.Anthropic

public sealed class AnthropicBatchApi : BatchResultsApiBase, IBatchApi

Anthropic Message Batches API. Downloads the JSONL results of a finished batch.

Inheritance: object → BatchResultsApiBase

Implements: IBatchApi

View source

public override string Provider { get; }

Provider id.

Value: string

View source

DoGetResultsAsync(BatchOperationCall, CancellationToken)

Section titled “DoGetResultsAsync(BatchOperationCall, CancellationToken)”
public override Task<IAsyncEnumerable<BatchItem>> DoGetResultsAsync(BatchOperationCall call, CancellationToken cancellationToken)

Opens the result stream. Errors found while opening, such as a batch that is not complete, throw from the task. Errors found while reading, such as a malformed row, throw from the stream.

Parameters

Name Type Description
call BatchOperationCall
cancellationToken CancellationToken

Returns: Task<IAsyncEnumerable<BatchItem>>

View source

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product