Updated Ollama text generation (markdown)

Azgaar 2025-06-14 16:12:24 +02:00
parent c7f8228240
commit 82009f5569

@ -35,7 +35,48 @@ After installing Ollama, you need to download an AI model (think of it as the "b
5. Visit [ollama.com/search](https://ollama.com/search) to see what other models you can download.
## Step 3: Start the server
## Step 3: Allow Ollama to be accessed from the web
If you are running FMG locally, you don't need this step. But if you want Ollama to be available form the web-version of the FMG, you need to set OLLAMA_ORIGINS.
### For Windows Users:
1. **Press `Windows key + R`**
2. **Type `sysdm.cpl` and press Enter**
3. **Click "Environment Variables..." button**
7. **Click "New..." and enter:**
- Variable name: `OLLAMA_ORIGINS`
- Variable value: `https://azgaar.github.io,https://*afmg.netlify.app,http://127.0.0.1:5501`
8. **Click "OK" on everything**
9. **Restart ollama sever if it's running. You may need to restart you computer as well**
### For Mac Users:
1. **Open Terminal**
2. **Type this command:** `nano ~/.zshrc`
3. **Add these two lines at the end:**
```
export OLLAMA_ORIGINS="https://azgaar.github.io,https://*afmg.netlify.app,http://127.0.0.1:5501"
```
4. **Save and exit:**
- Press `Ctrl + X`
- Press `Y` to confirm
- Press `Enter` to save
5. **Apply the changes:**
```
source ~/.zshrc
```
6. **Restart your computer**
### For Linux Users:
1. **Open Terminal**
2. **Type these commands one by one:**
```
echo 'export OLLAMA_HOST="0.0.0.0"' >> ~/.bashrc
echo 'export OLLAMA_ORIGINS="https://azgaar.github.io,https://*afmg.netlify.app,http://127.0.0.1:5501"' >> ~/.bashrc
source ~/.bashrc
```
3. **Restart your computer**
## Step 4: Start the server
1. Open Command Prompt/Terminal. Type: `ollama serve`. Leave this window open** - Ollama is now running!
2. Open Fantasy Map Generator. Open AI notes generator and select "ollama" from the AI model list