Ollama

Ollama is a tool for running and managing large language models natively. This tutorial shows you how to install Ollama, download and run a local model, and complete the configuration in SelectTranslate.

Local deployment and configuration process

  1. Visit Ollama official website, download and install the program for your current operating system.
  2. Go to Model List, select the model suitable for the local configuration, and execute the download command in the terminal, such as ollama pull translategemma:4b.
  3. Execute ollama run translategemma:4b to run the model and view the installed model name through ollama list.
  4. Select Ollama in the "Translation Model" setting of SelectTranslate, fill in the model name and API address to complete the configuration.
  5. If you have questions or feedback, contact us.

FAQ

If SelectTranslate cannot connect to Ollama and the error message involves 403 or browser cross-domain access restrictions, you can try to configure the environment variable OLLAMA_ORIGINS to allow the browser extension to access the local Ollama service. Select the corresponding setting method according to the operating system:

  • Windows: Exit Ollama and open Control Panel → System and Security → System → Advanced System Settings → Environment Variables. Create or edit OLLAMA_ORIGINS in "User Variables", set the variable value to chrome-extension://*,moz-extension://*,safari-web-extension://*, save and restart Ollama.
  • macOS: Exit Ollama, open a terminal, execute launchctl setenv OLLAMA_ORIGINS "chrome-extension://*,moz-extension://*,safari-web-extension://*", and then restart Ollama.
  • Linux: stops the currently running Ollama service, execute OLLAMA_ORIGINS="chrome-extension://*,moz-extension://*,safari-web-extension://*" ollama serve in the terminal, and start Ollama through this command.

This configuration allows all extensions in Chrome, Firefox and Safari to access Ollama, not just SelectTranslate.