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
Your space allows users to set up their own API endpoints.
You have an Ollama server running with one or more models. For instructions on how to set up the server, see:
Set up the Ollama endpoint
MS Excel
MS 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.
tipIf you get an error saying that the URL is invalid, make sure that the Ollama server supports:
-
You have set up the Ollama endpoint in GPT for . 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 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.
tipIf you get an error saying that the URL is invalid, make sure that the Ollama server supports:
-
You have set up the Ollama endpoint in GPT for . You can now select Ollama models.
Select an Ollama model
MS Excel
MS 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.