Send a request to the Cohere Chat API and return the response
Source:R/service-cohere.R
query_api_cohere.Rd
This function sends a JSON post request to the Cohere Chat API, retries on failure up to three times, and returns the response. The function handles errors by providing a descriptive message and failing gracefully.
Usage
query_api_cohere(request_body, api_key = Sys.getenv("COHERE_API_KEY"))