streaming, markdown, model selecting, and lots more

This commit is contained in:
Zoe
2026-02-02 23:16:06 -06:00
parent 8c28946703
commit d5a5945c03
114 changed files with 6109 additions and 2938 deletions
+38
View File
@@ -0,0 +1,38 @@
import dotenv from 'dotenv';
dotenv.config();
import jwt from 'jsonwebtoken';
const secret = process.env.TRIPLIT_JWT_SECRET ?? process.env.BETTER_AUTH_SECRET;
if (!secret) {
throw new Error('No secret provided');
}
const anonKey = jwt.sign(
{
'x-triplit-token-type': 'anon',
'x-triplit-project-id': 'local-project-id',
},
secret,
{
noTimestamp: true,
algorithm: 'HS256',
},
);
const serviceKey = jwt.sign(
{
'x-triplit-token-type': 'secret',
'x-triplit-project-id': 'local-project-id',
},
secret,
{
noTimestamp: true,
algorithm: 'HS256',
},
);
console.log('ANON_KEY:', anonKey);
console.log('SERVICE_KEY:', serviceKey);