mirror of
https://git.sync.wtf/troed/oc-ls-stats.git
synced 2026-08-31 09:43:38 +03:00
filter providers by 'llama' name, exclude ollama
This commit is contained in:
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/package.json",
|
||||
"name": "@troed/oc-ls-stats",
|
||||
"version": "1.0.10",
|
||||
"version": "1.0.11",
|
||||
"type": "module",
|
||||
"exports": {
|
||||
"./tui": {
|
||||
|
||||
@@ -129,12 +129,12 @@ function extractProviderUrls(config: unknown): string[] {
|
||||
if (!provider || typeof provider !== "object") return []
|
||||
|
||||
const urls: string[] = []
|
||||
for (const [_key, val] of Object.entries(provider as Record<string, unknown>)) {
|
||||
for (const [key, val] of Object.entries(provider as Record<string, unknown>)) {
|
||||
if (val && typeof val === "object") {
|
||||
const opts = (val as Record<string, unknown>).options
|
||||
if (opts && typeof opts === "object") {
|
||||
const baseURL = (opts as Record<string, unknown>).baseURL || (opts as Record<string, unknown>).base_url
|
||||
if (typeof baseURL === "string" && baseURL.includes("localhost")) {
|
||||
if (typeof baseURL === "string" && key.toLowerCase().includes("llama") && !key.toLowerCase().includes("ollama")) {
|
||||
urls.push(stripBaseUrlPath(baseURL))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user