Fresh history cut from cynarAI/evoo antigravity-handoff/project-timeline (Voice First + project timeline). Brand docs/titles as evOo; keep @rakazo/* packages as tech debt. Excludes node_modules, caches, secrets, voice blobs.
47 lines
1.3 KiB
TypeScript
47 lines
1.3 KiB
TypeScript
import { createDb } from "../packages/db/src/index.js";
|
|
|
|
async function main() {
|
|
const dbUrl = process.env.DATABASE_URL || "postgres://ingowagner@127.0.0.1:5432/evoo";
|
|
const { prisma } = createDb(dbUrl);
|
|
const session = await prisma.session.findFirst({ orderBy: { createdAt: "desc" } });
|
|
if (!session) {
|
|
throw new Error("No active session found");
|
|
}
|
|
|
|
console.log("Connecting model gemma-4-26b-a4b...");
|
|
|
|
const res = await fetch("http://127.0.0.1:3100/rpc/models/connect", {
|
|
method: "POST",
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
Authorization: `Bearer ${session.token}`,
|
|
},
|
|
body: JSON.stringify({
|
|
json: {
|
|
provider: "openai-compatible",
|
|
baseUrl: "http://100.114.51.16:1240/v1",
|
|
modelId: "gemma-4-26b-a4b",
|
|
label: "Gemma 4 26B A4B (evo)",
|
|
supportsImages: true,
|
|
},
|
|
}),
|
|
});
|
|
|
|
const body = await res.text();
|
|
console.log("Connect response status:", res.status);
|
|
console.log("Connect response body:", body);
|
|
|
|
// Update all bots to use gemma-4-26b-a4b
|
|
const updatedBots = await prisma.bot.updateMany({
|
|
data: {
|
|
modelProvider: "openai-compatible",
|
|
modelId: "gemma-4-26b-a4b",
|
|
},
|
|
});
|
|
console.log("Updated bots to modelId 'gemma-4-26b-a4b':", updatedBots.count);
|
|
}
|
|
|
|
main()
|
|
.catch(console.error)
|
|
.finally(() => process.exit(0));
|