• This function is used to get an instance of the OpenAI API client. It first checks if the API key is stored in the user's configuration. If the API key is not found, it checks if the API key is stored in a file. If the API key is still not found, it logs an error message and terminates the process. If the API key is found, it creates a new instance of the OpenAI API client with the API key and cache configuration. It also sets up event listeners for 'retry' and 'error' events on the API client and the cache.

    Returns OpenaiApiClient

    An instance of the OpenAI API client.

Generated using TypeDoc