File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -82,7 +82,10 @@ const fs = require('fs');
8282 console.error(`Table ${tableIndex}, Row ${rowIndex}: "${text}"`);
8383
8484 if (text && text.length > 0) {
85- modelNames.push(text);
85+ // Normalize model name: lowercase and replace spaces with dashes
86+ const normalizedName = text.toLowerCase().replace(/\s+/g, '-');
87+ console.error(` Normalized: "${normalizedName}"`);
88+ modelNames.push(normalizedName);
8689 }
8790 } else {
8891 // Fallback to first td if no row header exists
@@ -92,7 +95,10 @@ const fs = require('fs');
9295 console.error(`Table ${tableIndex}, Row ${rowIndex} (fallback): "${text}"`);
9396
9497 if (text && text.length > 0) {
95- modelNames.push(text);
98+ // Normalize model name: lowercase and replace spaces with dashes
99+ const normalizedName = text.toLowerCase().replace(/\s+/g, '-');
100+ console.error(` Normalized: "${normalizedName}"`);
101+ modelNames.push(normalizedName);
96102 }
97103 }
98104 }
Original file line number Diff line number Diff line change 3939 page-content.html
4040 scraper.log
4141
42- - name : List available models from GitHub Models API
43- id : list_models
44- env :
45- GITHUB_TOKEN : ${{ secrets.GH_PAT }}
46- run : |
47- # Get list of available models from GitHub Models API
48- MODELS_CATALOG=$(curl -L -s \
49- -H "Accept: application/vnd.github+json" \
50- -H "Authorization: Bearer $GITHUB_TOKEN" \
51- -H "X-GitHub-Api-Version: 2022-11-28" \
52- https://models.github.ai/catalog/models)
53-
54- # Save the API response for debugging
55- echo "$MODELS_CATALOG" > api-models.json
56- echo "Saved API response to api-models.json"
57-
58- # Display the response in logs
59- echo "=== GitHub Models API Response ==="
60- echo "$MODELS_CATALOG" | jq .
61-
62- echo ""
63- echo "=== Available model IDs from API ==="
64- echo "$MODELS_CATALOG" | jq -r '.[].id'
65-
66- - name : Upload API response as artifact
67- uses : actions/upload-artifact@v4
68- with :
69- name : api-response
70- path : api-models.json
71-
7242 - name : Extract models from scraped data
7343 id : fetch_models
7444 run : |
You can’t perform that action at this time.
0 commit comments