File size: 2,203 Bytes
b017ce1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
54
55
56
57
58
59
60
61
<!DOCTYPE html>
<html>

<head>
    <title>Local Chat</title>
    <link href="resources/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-4bw+/aepP/YC94hEpVNVgiZdgIC5+VKNBQNGCHeKRQN+PtmoHDEXuppvnDJzQIu9" crossorigin="anonymous">
    <script src="resources/bootstrap.bundle.min.js"
        integrity="sha384-HwwvtgBNo3bZJJLYd8oVXjrBZt8cqVSpeBNS5n7C8IVInixGAoxmnlMuBnhbgrkm"
        crossorigin="anonymous"></script>
    <script src="resources/marked.min.js"
        integrity="sha384-dZulhREgb+hCgQMhZ2VG0l37VQj5pJBq2w0h7Jn3tdMn36aXNepF1+FMLBB4O649"
        crossorigin="anonymous"></script>
    <script src="resources/purify.min.js" integrity="sha256-QigBQMy2be3IqJD2ezKJUJ5gycSmyYlRHj2VGBuITpU="
        crossorigin="anonymous"></script>
    <link rel="stylesheet" href="chat.css">
</head>

<body data-bs-theme="dark">
    
    <div class="container">
        <div class="row pt-3">
            <div class="col-md-8 col-12">
                <h1>Local Chat</h1>
            </div>
            <div id="status">
            </div>
        </div>
        <div id="scroll-wrapper">
            <div id="chat-container" class="card">
                <div class="card-body">
                    <div id="chat-history"></div>
                </div>
            </div>
        </div>
    </div>
    <div class="container p-2 card" id="input-area">
        <div class="input-group">
            <textarea class="form-control" id="user-input" placeholder="Type your question here ..."></textarea>
            <button id="send-button" class="btn btn-primary">Send</button>
        </div>
    </div>
    <div class="modal fade" id="errorModal" tabindex="-1">
        <div class="modal-dialog modal-xl">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title">Unable to access Ollama server</h5>
                    <button type="button" class="btn-close" data-bs-dismiss="modal"></button>
                </div>
                <div class="modal-body">
                    <p id="errorText"></p>
                </div>
            </div>
        </div>
    </div>

    <script type="module" src="chat.js"></script>

</body>

</html>