Spaces:
Sleeping
Sleeping
File size: 1,956 Bytes
b95ac18 d7f3925 b95ac18 d7f3925 b95ac18 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="description" content="Chat with deepseek-coder-1.3b">
<meta name="viewport" content="width=device-width, height=device-height">
<title>OpenAI Chat with Alpine.js</title>
<link rel="stylesheet" href="assets/css/style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github.min.css">
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.13.10/dist/cdn.min.js"></script>
</head>
<body>
<div x-data="chatApp()" x-init="init()" id="app">
<header>
<span>Chat with deepseek-coder-1.3b</span>
<button @click="clearMessages" class="clear"><img
src="assets/img/cleaning_services.svg"
width="24"
height="24"
title="Clear chat"
alt="Clear"></button>
</header>
<main>
<div class="chat-container" id="chatContainer">
<template x-for="(message, index) in messages" :key="index">
<template x-if="message.role != 'system'">
<div x-data="chatMessage()"
:class="[message.role, 'message'].join(' ')"
x-effect="watchEffect(message.content)"></div>
</template>
</template>
</div>
</main>
<footer>
<input id="input-box" type="text"
x-model="newMessage"
@keyup.enter="sendMessage"
placeholder="Type your message here..."
aria-label="Chat with AI">
</footer>
</div>
<script src="https://cdn.jsdelivr.net/npm/markdown-it@13.0.1/dist/markdown-it.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.11/clipboard.min.js"></script>
<script src="assets/js/app.js"></script>
</body>
</html>
|