<?php
session_name('INBOXZERO');
session_start();
header('Content-Type: application/json');
$newId = uniqid('chat_');
$_SESSION['current_conversation_id'] = $newId;
if (!isset($_SESSION['chat_histories'])) {
$_SESSION['chat_histories'] = [];
}
if (!isset($_SESSION['chat_histories'][$newId])) {
$_SESSION['chat_histories'][$newId] = [];
}
echo json_encode(['success' => true, 'chat_id' => $newId]);
?>
← Back