v0.6.1 - reinstated UI, relay > cortex pipeline working

This commit is contained in:
2025-12-11 16:28:25 -05:00
parent 67b7f9594c
commit 77429ca6e0
9 changed files with 1143 additions and 456 deletions
+19
View File
@@ -151,6 +151,25 @@ app.post("/chat", async (req, res) => {
}
});
// -----------------------------------------------------
// SESSION ENDPOINTS (for UI)
// -----------------------------------------------------
// In-memory session storage (could be replaced with a database)
const sessions = new Map();
app.get("/sessions/:id", (req, res) => {
const sessionId = req.params.id;
const history = sessions.get(sessionId) || [];
res.json(history);
});
app.post("/sessions/:id", (req, res) => {
const sessionId = req.params.id;
const history = req.body;
sessions.set(sessionId, history);
res.json({ ok: true, saved: history.length });
});
// -----------------------------------------------------
app.listen(PORT, () => {
console.log(`Relay is online on port ${PORT}`);
+1 -1
View File
@@ -51,7 +51,7 @@
</div>
<script>
const RELAY_BASE = "http://10.0.0.40:7078";
const RELAY_BASE = "http://10.0.0.41:7078";
const API_URL = `${RELAY_BASE}/v1/chat/completions`;
function generateSessionId() {