Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/api/nilai-delegation/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
});
Expand Down
13 changes: 7 additions & 6 deletions app/components/LLMCommentaryModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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",
Expand Down
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading