mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-22 08:34:59 +00:00
feat: agents and skills
This commit is contained in:
19
packages/tfcode/test-creds.ts
Normal file
19
packages/tfcode/test-creds.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
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))
|
||||
Reference in New Issue
Block a user