91 points · by andersonbcdefg · 2y ago · 6 comments
There are plenty of providers and self-hosted solutions that expose an OpenAI-compatible API so instead of just asking for on OpenAI key you could ask for an API end-point URL (optional with OpenAI as the default if you want to keep the current UX) and a authentication key (optional as well since self-hosted stuff don't need it).
--api_base_url: You can use this flag (or the OPENAI_BASE_URL environment variable) to pass a different API URL from the default "https://api.openai.com/v1". This allows you to use other OpenAI-compatible LLM providers like TogetherAI, self-hosted vLLM or Ollama, etc.