Skip to content

Commit 74afa50

Browse files
committed
fix bugs and change from hackclub ai to openrouter
1 parent 9e261df commit 74afa50

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

api/rap.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ export default async function handler(req, res) {
99
}
1010

1111
try {
12-
const apiKey = process.env.HACKCLUB_API_KEY;
12+
const apiKey = process.env.OPENROUTER_API_KEY;
1313
if (!apiKey) {
1414
return res.status(500).json({ error: 'Missing API key configuration' });
1515
}
1616

17-
const response = await fetch('https://ai.hackclub.com/proxy/v1/chat/completions', {
17+
const response = await fetch('https://openrouter.ai/api/v1/chat/completions', {
1818
method: 'POST',
1919
headers: {
2020
'Authorization': `Bearer ${apiKey}`,

app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const API_URL = '/api/rap';
2-
const MODEL = 'qwen/qwen3-32b';
2+
const MODEL = 'mistralai/mistral-7b-instruct';
33

44
let items = [];
55
let selectedStyle = 'old school';

beats.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const bass = new Tone.MembraneSynth({
2525
}).toDestination();
2626

2727

28-
const PATTERS = {
28+
const PATTERNS = {
2929
'old school': {
3030
bpm: 95,
3131
kick: [1,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0],

vercel.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"functions": {
33
"api/rap.js": {
44
"memory": 256,
5-
"maxDuration": 30
5+
"maxDuration": 60
66
}
77
}
88
}

0 commit comments

Comments
 (0)