(message.content, message.source);
                });
            } catch (error) {
                console.error('Error loading history:', error);
            }
        }

        // Load chat history when the page loads
        window.onload = loadHistory;
    </script>
</body>

</html>
