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

This commit is contained in:
serversdwn
2025-12-11 16:28:25 -05:00
parent 30f6c1a3da
commit 6a20d3981f
9 changed files with 1143 additions and 456 deletions

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}`);

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() {