Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 11s
Build & Deploy / 🧪 QA (push) Successful in 1m18s
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
Build & Deploy / 🏗️ Build (push) Has been cancelled
CI - Lint, Typecheck & Test / quality-assurance (pull_request) Failing after 3m55s
21 lines
494 B
JavaScript
21 lines
494 B
JavaScript
import fetch from 'node-fetch';
|
|
|
|
async function test() {
|
|
const messages = [
|
|
{ role: 'user', content: 'Ich will einen Windpark bauen' }
|
|
];
|
|
|
|
console.log('Sending message:', messages[0].content);
|
|
|
|
const res = await fetch('http://localhost:3000/api/ai-search', {
|
|
method: 'POST',
|
|
headers: { 'Content-Type': 'application/json' },
|
|
body: JSON.stringify({ messages })
|
|
});
|
|
|
|
const data = await res.json();
|
|
console.log('\nAI Response:', data);
|
|
}
|
|
|
|
test().catch(console.error);
|