v0.6.1 - reinstated UI, relay > cortex pipeline working
This commit is contained in:
@@ -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}`);
|
||||
|
||||
Reference in New Issue
Block a user