Call the Anthropic API to interact with Claude models
claude(
.llm,
.model = "claude-3-5-sonnet-20240620",
.max_tokens = 1024,
.temperature = NULL,
.top_k = NULL,
.top_p = NULL,
.metadata = NULL,
.stop_sequences = NULL,
.tools = NULL,
.api_url = "https://api.anthropic.com/",
.verbose = FALSE,
.wait = TRUE,
.min_tokens_reset = 0L,
.timeout = 60,
.stream = FALSE
)
Returns an updated LLMMessage object.
An existing LLMMessage object or an initial text prompt.
The model identifier (default: "claude-3-5-sonnet-20240620").
The maximum number of tokens to generate (default: 1024).
Control for randomness in response generation (optional).
Top k sampling parameter (optional).
Nucleus sampling parameter (optional).
Additional metadata for the request (optional).
Sequences that stop generation (optional).
Additional tools used by the model (optional).
Base URL for the API (default: "https://api.anthropic.com/v1/messages").
Should additional information be shown after the API call
Should we wait for rate limits if necessary?
How many tokens should be remaining to wait until we wait for token reset?
Request timeout in seconds (default: 60).
Stream back the response piece by piece (default: FALSE).