Connect to OpenAI-compatible endpoints from Excel and Word
On Microsoft Excel and Word, GPT for Work can connect to any LLM service that provides an OpenAI-compatible API endpoint. You can connect to two main types of services: cloud-based platforms, which provide access to models over the internet with no software installation or setup required on your part, and local servers, which you run on a local machine, such as your own computer or another computer on a local network. Once connected, all models available through the service become available to use in GPT for Excel and Word.
Here are some popular services that provide an OpenAI-compatible endpoint:
Cloud-based platforms:
Local servers:
Connecting to an OpenAI-compatible endpoint in GPT for Work means configuring the endpoint and selecting one of the models available through the endpoint.
Prerequisites
Endpoint URL and, if needed, API key for accessing the service.
The endpoint must support the following OpenAI-compatible API resource paths:
/v1/models
/v1/completions
Depending on the model you use, the model settings defined in GPT for Work (temperature (creativity), top-p, frequency penalty, and presence penalty) may not work as expected. If you get bad results, try tweaking the settings.
Configure the endpoint
- Excel
- Word
Open a Microsoft Excel workbook.
Click GPT for Excel Word in the Home tab.
infoYou can also go to Home > Add-ins > My add-ins > GPT for Excel Word.
In the sidebar menu, select API keys & endpoints.
Select the endpoints tab.
In the Custom endpoints section, define the endpoint settings:
Endpoint URL: Enter the URL of the service that provides the endpoint.
API key (optional): If required, enter the API key for accessing the service.
Display name (optional): Enter a short name that is prefixed to the model names in the model switcher. By default, the model names are prefixed with "custom".
Click Check to validate the settings, and click Save.
You have set the endpoint URL in GPT for Excel. You can now select models available through the endpoint.
Open a Microsoft Word document.
Click GPT for Excel Word in the Home tab.
infoYou can also go to Home > Add-ins > My add-ins > GPT for Excel Word.
In the sidebar menu, select Manage API keys.
Select the endpoints tab.
In the Custom endpoints section, define the endpoint settings:
Endpoint URL: Enter the URL of the service that provides the endpoint.
API key (optional): If required, enter the API key for accessing the service.
Display name (optional): Enter a short name that is prefixed to the model names in the model switcher. By default, the model names are prefixed with "custom".
Click Check to validate the settings, and click Save.
You have set the endpoint URL in GPT for Word. You can now select models available through the endpoint.
Select a model
- Excel
- Word
Expand the model switcher. You can find the available models under Use your API key or endpoint.
noteThe available models depend on the models provided by the service.
Select a model.
GPT for Excel now uses the selected model to generate all responses.
Expand the model switcher. You can find the available models under Use your API key or endpoint.
noteThe available models depend on the models provided by the service.
Select a model.
GPT for Word now uses the selected model to generate all responses.