mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-04-22 19:52:15 +00:00
update storage settings
This commit is contained in:
@@ -130,9 +130,10 @@ def get_ollama_models():
|
||||
|
||||
with urllib.request.urlopen(req, timeout=10) as resp:
|
||||
result = json.loads(resp.read().decode('utf-8'))
|
||||
models = [m.get('name', '').split(':')[0] for m in result.get('models', [])]
|
||||
# Remove duplicates and sort
|
||||
models = sorted(list(set(models)))
|
||||
# Keep full model names (including tags like :latest, :3b-instruct-q4_0)
|
||||
models = [m.get('name', '') for m in result.get('models', []) if m.get('name')]
|
||||
# Sort alphabetically
|
||||
models = sorted(models)
|
||||
return jsonify({
|
||||
'success': True,
|
||||
'models': models,
|
||||
|
||||
Reference in New Issue
Block a user