request_base_cohere {gptstudio} | R Documentation |
Base for a request to the Cohere Chat API
Description
This function sets up a POST request to the Cohere Chat API's chat endpoint and includes necessary headers such as 'accept', 'content-type', and 'Authorization' with a bearer token.
Usage
request_base_cohere(api_key = Sys.getenv("COHERE_API_KEY"))
Arguments
api_key |
String containing a Cohere API key. Defaults to the COHERE_API_KEY environment variable if not specified. |
Value
An httr2
request object pre-configured with the API endpoint and required headers.
[Package gptstudio version 0.4.0 Index]