mirror of
https://github.com/enricoros/big-AGI.git
synced 2026-05-10 21:50:14 -07:00
CC: slashcommands: update llms:ollama
This commit is contained in:
@@ -8,14 +8,11 @@ Reference `src/modules/llms/server/llm.server.types.ts` and `src/modules/llms/se
|
|||||||
|
|
||||||
**Automated Workflow:**
|
**Automated Workflow:**
|
||||||
```bash
|
```bash
|
||||||
# 1. Fetch the HTML (sorted by newest for stable ordering)
|
# 1. Fetch the HTML to a cross-platform temp path (sorted by newest for stable ordering)
|
||||||
curl -s "https://ollama.com/library?sort=newest" -o /tmp/ollama-newest.html
|
curl -s "https://ollama.com/library?sort=newest" -o "$(node -p "require('os').tmpdir()")/ollama-newest.html"
|
||||||
|
|
||||||
# 2. Parse it with the script
|
# 2. Parse it with the script (auto-finds the file in os.tmpdir())
|
||||||
node .claude/scripts/parse-ollama-models.js > /tmp/ollama-parsed.txt 2>&1
|
node .claude/scripts/parse-ollama-models.js 2>&1
|
||||||
|
|
||||||
# 3. Review the parsed output
|
|
||||||
cat /tmp/ollama-parsed.txt
|
|
||||||
```
|
```
|
||||||
|
|
||||||
The parser outputs: `modelName|pulls|capabilities|sizes`
|
The parser outputs: `modelName|pulls|capabilities|sizes`
|
||||||
|
|||||||
@@ -22,8 +22,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
const os = require('os');
|
||||||
|
const path = require('path');
|
||||||
|
|
||||||
const htmlPath = process.argv[2] || '/tmp/ollama-newest.html';
|
const htmlPath = process.argv[2] || path.join(os.tmpdir(), 'ollama-newest.html');
|
||||||
const TOP_N_ALWAYS_INCLUDE = 30;
|
const TOP_N_ALWAYS_INCLUDE = 30;
|
||||||
const MIN_PULLS_THRESHOLD = 50000;
|
const MIN_PULLS_THRESHOLD = 50000;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user