Perform an API request to interact with language models
perform_api_request(
.request,
.api,
.stream = FALSE,
.timeout = 60,
.max_tries = 3,
.parse_response_fn = NULL,
.dry_run = FALSE
)
A list containing the assistant's reply and response headers.
The httr2 request object.
The API identifier (e.g., "claude", "openai").
Stream the response if TRUE.
Request timeout in seconds.
Maximum retry attempts for requests (default: 3).
A function to parse the assistant's reply.
If TRUE, perform a dry run and return the request object.