5.8 KiB
5.8 KiB
import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx';
OpenAI
The OpenAI class can be used to access OpenAI models like gpt-4 and gpt-3.5-turbo.
If you are locally serving a model that uses an OpenAI-compatible server, you can simply change the api_base like this:
{
"models": [{
"title": "OpenAI-compatible server",
"provider": "openai",
"model": "MODEL_NAME",
"api_key": "EMPTY",
"api_base": "http://localhost:8000"
}]
}
Options for serving models locally with an OpenAI-compatible server include: