Anthropic Claude text generation over the /v1/messages endpoint.
- Implemented types
Constructors
-
ClaudeTextClient({required ProviderCredentials credentials, Client? httpClient, RetryPolicy retryPolicy = const RetryPolicy(), Uri? endpoint, Future<
void> sleep(Duration) = Future.delayed}) - Creates a ClaudeTextClient.
Properties
- credentials → ProviderCredentials
-
The provider credentials carrying the API key.
final
- endpoint → Uri?
-
An optional endpoint override; defaults to the public Anthropic host.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- retryPolicy → RetryPolicy
-
The retry policy applied to each request.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
sleep
→ Future<
void> Function(Duration) -
The sleep seam used between retries (injected for tests).
final
Methods
-
generateText(
TextRequest request, {void onProgress(GenerationProgress)?}) → Future< GenerationResult> -
Generates text for
request.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited