Frontend Refactoring: HTML/CSS/JS getrennt, modulare Struktur
This commit is contained in:
1 parent
9f2f3fee1f
commit
19f926da05
7 files changed
+534
-294
No files matched your search
@@ -0,0 +1,14 @@
|
||||
// ── API Calls ──
|
||||
|
||||
async function apiChat(model, messages, systemPrompt) {
|
||||
return fetch('/api/chat', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ model, messages, systemPrompt })
|
||||
});
|
||||
}
|
||||
|
||||
async function apiHistory(sessionId = 'null', limit = 50) {
|
||||
const resp = await fetch(`/api/history?sessionId=${sessionId}&limit=${limit}`);
|
||||
return resp.json();
|
||||
}
|
||||
Reference in new issue
Block a user