OptionalanthropicOptionalanthropicAnthropic API URL
OptionalapiAnthropic API key
OptionalclientOverridable Anthropic ClientOptions
OptionalcontextConfiguration for context management. See https://docs.claude.com/en/docs/build-with-claude/context-editing
OptionalcreateOptional method that returns an initialized underlying Anthropic client. Useful for accessing Anthropic models hosted on other cloud services such as Google Vertex.
OptionaldisableWhether to disable streaming.
If streaming is bypassed, then stream() will defer to
invoke().
OptionalinvocationHolds any additional parameters that are valid to pass to anthropic.messages that are not explicitly specified on this class.
Optionalllm?: undefined | BaseChatModel<BaseChatModelCallOptions, AIMessageChunk>OptionalmaxA maximum number of tokens to generate before stopping.
OptionalmaxA maximum number of tokens to generate before stopping.
Optionalmodel?: undefined | AnthropicMessagesModelIdModel name to use
OptionalmodelOptionalstopA list of strings upon which to stop generating.
You probably want ["\n\nHuman:"], as that's the cue for
the next turn in the dialog agent.
OptionalstreamWhether or not to include token usage data in streamed chunks.
Optionalstreaming?: undefined | booleanWhether to stream the results or not
OptionalsystemOptionaltemperature?: undefined | null | numberAmount of randomness injected into the response. Ranges
from 0 to 1. Use temp closer to 0 for analytical /
multiple choice, and temp closer to 1 for creative
and generative tasks.
To not set this field, pass null. If undefined is passed,
the default (1) will be used.
Optionalthinking?: undefined | ThinkingConfigParamOptions for extended thinking.
OptionaltopK?: undefined | numberOnly sample from the top K options for each subsequent token. Used to remove "long tail" low probability responses. Defaults to -1, which disables it.
OptionaltopP?: undefined | null | numberDoes nucleus sampling, in which we compute the cumulative distribution over all the options for each subsequent token in decreasing probability order and cut it off once it reaches a particular probability specified by top_p. Defaults to -1, which disables it. Note that you should either alter temperature or top_p, but not both.
To not set this field, pass null. If undefined is passed,
the default (-1) will be used.
For Opus 4.1 and Sonnet 4.5, this defaults to null.
Anthropic API key