test123 / index.html
TDN-M's picture
Update index.html
dade00a verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Chatbot Demo</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>
<h1> Chatbot Demo</h1>
<p>Demo #1 - 13th March 2025</p>
</header>
<main>
<!-- Chatbot container -->
<div id="coze-chatbot"></div>
</main>
<!-- Coze SDK integration -->
<script src="https://sf-cdn.coze.com/obj/unpkg-va/flow-platform/chat-app-sdk/1.2.0-beta.5/libs/oversea/index.js"></script>
<script>
// Initialize chatbot
new CozeWebSDK.WebChatClient({
config: {
bot_id: '7505945028296982529', // Replace with your bot_id
},
componentProps: {
title: 'LAYA Chatbot', // Chatbot title
},
auth: {
type: 'token',
token: 'pat_WIXvy1WtxB9N3ttEPG487glTZpJi2LnNSCRywrJyNmfowEAC5TKHED7GtKq8B60d', // Replace with your token
onRefreshToken: function () {
return 'pat_WIXvy1WtxB9N3ttEPG487glTZpJi2LnNSCRywrJyNmfowEAC5TKHED7GtKq8B60d'; // Replace with a new token if needed
}
}
});
</script>
</body>
</html>