diff --git a/app/api/nilai-delegation/route.ts b/app/api/nilai-delegation/route.ts index bbe54ef..1b70004 100644 --- a/app/api/nilai-delegation/route.ts +++ b/app/api/nilai-delegation/route.ts @@ -97,7 +97,7 @@ export async function POST(request: NextRequest) { // Create delegation token server const server = new DelegationTokenServer(apiKey, { - nilauthInstance: NilAuthInstance.SANDBOX, + nilauthInstance: NilAuthInstance.PRODUCTION, expirationTime: 600, // 10 minutes validity tokenMaxUses: 1 // Single use for privacy }); diff --git a/app/components/LLMCommentaryModal.tsx b/app/components/LLMCommentaryModal.tsx index 8ad16a9..587c99b 100644 --- a/app/components/LLMCommentaryModal.tsx +++ b/app/components/LLMCommentaryModal.tsx @@ -2,7 +2,7 @@ import { useEffect, useState } from "react"; import { SavedResult } from "@/lib/results-manager"; -import { NilaiOpenAIClient, AuthType } from "@nillion/nilai-ts"; +import {NilaiOpenAIClient, AuthType, NilAuthInstance} from "@nillion/nilai-ts"; import NilAIConsentModal from "./NilAIConsentModal"; import StudyQualityIndicators from "./StudyQualityIndicators"; @@ -78,10 +78,11 @@ export default function LLMCommentaryModal({ } // Initialize NilAI client with delegation token authentication - const client = new NilaiOpenAIClient({ - baseURL: "https://nilai-a779.nillion.network/v1/", - authType: AuthType.DELEGATION_TOKEN, - }); + const client = new NilaiOpenAIClient({ + baseURL: 'https://nilai-f910.nillion.network/nuc/v1/', + authType: AuthType.DELEGATION_TOKEN, + nilauthInstance: NilAuthInstance.PRODUCTION, + }); // Get delegation request from client const delegationRequest = client.getDelegationRequest(); @@ -180,7 +181,7 @@ Keep your response concise (400-600 words), educational, and reassuring where ap // Make request directly to NilAI (data never touches our server!) const response = await client.chat.completions.create({ - model: "google/gemma-3-27b-it", + model: "openai/gpt-oss-20b", messages: [ { role: "system", diff --git a/package-lock.json b/package-lock.json index 8844100..089ab01 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,9 +7,9 @@ "": { "name": "gwasifier", "version": "1.0.0", - "license": "MIT", + "license": "SEE LICENSE IN LICENSE", "dependencies": { - "@nillion/nilai-ts": "^0.0.0-alpha.4", + "@nillion/nilai-ts": "^0.0.0-alpha.5", "@types/crypto-js": "^4.2.2", "@types/pg": "^8.15.5", "better-sqlite3": "^12.4.1", @@ -473,9 +473,9 @@ } }, "node_modules/@nillion/nilai-ts": { - "version": "0.0.0-alpha.4", - "resolved": "https://registry.npmjs.org/@nillion/nilai-ts/-/nilai-ts-0.0.0-alpha.4.tgz", - "integrity": "sha512-RjjdDaPlnfT5PyQAeLL5pJ2bHEQ8SRivNVNxkGbUky5HIHUgnPevvCctA/5EGVJdkU7tlY0I3Vfm2nw2rqDx+w==", + "version": "0.0.0-alpha.5", + "resolved": "https://registry.npmjs.org/@nillion/nilai-ts/-/nilai-ts-0.0.0-alpha.5.tgz", + "integrity": "sha512-OO2XO8ZeetnC/I5Ib58df4bOyrehqrisH8dzd+hH6gYivZVCcOa7A9a3DsBopG+JODh88wYVTZ6rn9e6IkIIbQ==", "dependencies": { "@nillion/nuc": "0.1.0-rc.8", "@noble/curves": "^1.9.2", diff --git a/package.json b/package.json index f8da29b..b3b1af0 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "author": "Monadic DNA / Recherché Inc", "license": "SEE LICENSE IN LICENSE", "dependencies": { - "@nillion/nilai-ts": "^0.0.0-alpha.4", + "@nillion/nilai-ts": "^0.0.0-alpha.5", "@types/crypto-js": "^4.2.2", "@types/pg": "^8.15.5", "better-sqlite3": "^12.4.1",