summaryrefslogtreecommitdiff
path: root/src/ollama_web/templates/index.html
blob: 14bdf87c673291f21c2353f8fd01c492e25f4187 (plain)
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
<!DOCTYPE html>
<html lang="ja">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>ollama-web</title>
  <link rel="stylesheet" href="{{ url_for('static', path='style.css') }}" />
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css" />
  <script src="https://cdnjs.cloudflare.com/ajax/libs/marked/12.0.0/marked.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
</head>
<body>
  <header>
    <h1>ollama-web</h1>
    <div class="controls">
      <label for="model-select">モデル:</label>
      <select id="model-select">
        {% if models %}
          {% for m in models %}
            <option value="{{ m }}" {% if m == default_model %}selected{% endif %}>{{ m }}</option>
          {% endfor %}
        {% else %}
          <option value="{{ default_model }}" selected>{{ default_model }}</option>
        {% endif %}
      </select>
      <label class="think-toggle">
        <input type="checkbox" id="think-toggle" /> thinking
      </label>
      <button id="clear-btn" type="button">会話クリア</button>
    </div>
  </header>

  <main id="chat"></main>

  <form id="input-form">
    <textarea id="input" placeholder="メッセージを入力… (Enter で送信 / Shift+Enter で改行)"
              rows="2" autofocus></textarea>
    <button type="submit" id="send-btn">送信</button>
    <button type="button" id="cancel-btn" disabled>停止</button>
  </form>

  <script>
    const TOOLS = [
      { name: "web_search", label: "Web検索" },
      { name: "scrape_url", label: "スクレイピング" },
    ];
  </script>
  <script src="{{ url_for('static', path='app.js') }}"></script>
</body>
</html>