feat: add ollama endpoint on 192.168.1.159:8081
Co-authored-by: aider (openai//models/qwen2.5-coder-32b-instruct-q4_k_m.gguf) <aider@aider.chat>
This commit is contained in:
10
index.html
10
index.html
@@ -397,7 +397,8 @@
|
|||||||
<span>Backend:</span>
|
<span>Backend:</span>
|
||||||
<select id="backendSelector" style="padding: 4px 8px; border-radius: 4px; border: 1px solid #444; background: #2a2a2a; color: #e0e0e0;">
|
<select id="backendSelector" style="padding: 4px 8px; border-radius: 4px; border: 1px solid #444; background: #2a2a2a; color: #e0e0e0;">
|
||||||
<option value="plato">Plato (192.168.1.74)</option>
|
<option value="plato">Plato (192.168.1.74)</option>
|
||||||
<option value="stoic">Stoic (192.168.1.158)</option>
|
<option value="stoic">Stoic (192.168.1.159)</option>
|
||||||
|
<option value="ollama">Ollama (192.168.1.159:8081)</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div style="display: flex; align-items: center; gap: 8px;">
|
<div style="display: flex; align-items: center; gap: 8px;">
|
||||||
@@ -448,6 +449,11 @@ const BACKENDS = {
|
|||||||
prod: '/api/stoic',
|
prod: '/api/stoic',
|
||||||
dev: 'http://192.168.1.159:1234/v1',
|
dev: 'http://192.168.1.159:1234/v1',
|
||||||
name: 'Stoic (192.168.1.159)'
|
name: 'Stoic (192.168.1.159)'
|
||||||
|
},
|
||||||
|
ollama: {
|
||||||
|
prod: '/api/ollama',
|
||||||
|
dev: 'http://192.168.1.159:8081/v1',
|
||||||
|
name: 'Ollama (192.168.1.159:8081)'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1026,4 +1032,4 @@ I now support **real-time streaming responses** and **dark, readable text format
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -45,6 +45,15 @@ server {
|
|||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Proxy API requests to ollama (192.168.1.159:8081)
|
||||||
|
location /api/ollama/ {
|
||||||
|
proxy_pass http://192.168.1.159:8081/v1/;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
}
|
||||||
|
|
||||||
# Default /api/ points to plato for backwards compatibility
|
# Default /api/ points to plato for backwards compatibility
|
||||||
location /api/ {
|
location /api/ {
|
||||||
proxy_pass http://192.168.1.74:1234/v1/;
|
proxy_pass http://192.168.1.74:1234/v1/;
|
||||||
|
|||||||
Reference in New Issue
Block a user