Table of Contents

Class AnthropicClient

Namespace
AutoGen.Anthropic
Assembly
AutoGen.Anthropic.dll
public sealed class AnthropicClient : IDisposable
Inheritance
AnthropicClient
Implements
Inherited Members

Constructors

AnthropicClient(HttpClient, string, string)

public AnthropicClient(HttpClient httpClient, string baseUrl, string apiKey)

Parameters

httpClient HttpClient
baseUrl string
apiKey string

Methods

CreateChatCompletionsAsync(ChatCompletionRequest, CancellationToken)

public Task<ChatCompletionResponse> CreateChatCompletionsAsync(ChatCompletionRequest chatCompletionRequest, CancellationToken cancellationToken)

Parameters

chatCompletionRequest ChatCompletionRequest
cancellationToken CancellationToken

Returns

Task<ChatCompletionResponse>

Dispose()

public void Dispose()

StreamingChatCompletionsAsync(ChatCompletionRequest, CancellationToken)

public IAsyncEnumerable<ChatCompletionResponse> StreamingChatCompletionsAsync(ChatCompletionRequest chatCompletionRequest, CancellationToken cancellationToken)

Parameters

chatCompletionRequest ChatCompletionRequest
cancellationToken CancellationToken

Returns

IAsyncEnumerable<ChatCompletionResponse>