mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-03-29 21:33:54 +00:00
19 lines
833 B
TypeScript
19 lines
833 B
TypeScript
import { Global } from "./src/global"
|
|
import path from "path"
|
|
import { ModelsDev } from "./src/provider/models"
|
|
|
|
console.log("Global.Path.data:", Global.Path.data)
|
|
const credPath = path.join(Global.Path.data, ".tfcode", "credentials.json")
|
|
console.log("Credentials path:", credPath)
|
|
|
|
try {
|
|
const credData = await Bun.file(credPath).json()
|
|
console.log("Credentials loaded:", { api_key: (credData as any).api_key?.slice(0,10)+"...", region: (credData as any).region })
|
|
} catch (e) {
|
|
console.log("Error loading credentials:", e)
|
|
}
|
|
|
|
const providers = await ModelsDev.get()
|
|
console.log("ToothFairyAI provider found:", !!providers["toothfairyai"])
|
|
console.log("Models count:", Object.keys(providers["toothfairyai"]?.models || {}).length)
|
|
console.log("Sample models:", Object.keys(providers["toothfairyai"]?.models || {}).slice(0, 5)) |