Connect to Ollama from Excel and Word
On Microsoft Excel and Word, GPT for Work can connect to an Ollama server to use locally running open-source models. Ollama is an open-source platform that allows you to easily install, run, and serve models from a local machine, keeping your prompting entirely offline. You can use any model from the Ollama library.
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.
Connecting to Ollama in GPT for Work means setting the URL for the Ollama server and selecting one of the models available on the server.
Prerequisites
Ollama server running with one or more models. For instructions on how to set up the server, see:
Set the Ollama server URL
- Excel
- Word
Open a Microsoft Excel workbook.
In the Home tab, click GPT for Excel Word.
infoYou can also select Home > Add-ins > My Add-ins > GPT for Excel Word.
In the sidebar menu, select API keys & endpoints.
Select the endpoints tab.
In the Ollama endpoint section:
Enter the URL of the Ollama server.
Click Check to validate the URL, and click Save.
tip
You have set the Ollama server URL in GPT for Excel. You can now select Ollama models.
Open a Microsoft Word document.
In the Home tab, click GPT for Excel Word.
infoYou can also select Home > Add-ins > My Add-ins > GPT for Excel Word.
In the sidebar menu, select Manage API keys.
Select the endpoints tab.
In the Ollama endpoint section:
Enter the URL of the Ollama server.
Click Check to validate the URL, and click Save.
tip
You have set the Ollama server URL in GPT for Word. You can now select Ollama models.
Select an Ollama 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 installed on the Ollama server. If an Ollama model you need is not available, install it.
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 installed on the Ollama server. If an Ollama model you need is not available, install it.
Select a model.
GPT for Word now uses the selected model to generate all responses.