blob: eae3b6d6caaa99c0f4a127ad886f0ee99d25e0ab (
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
<!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>
<aside id="sidebar">
<div class="sidebar-header">
<h2>セッション</h2>
<button id="new-session-btn" type="button" title="新規セッション">+</button>
</div>
<ul id="session-list"></ul>
</aside>
<div id="main">
<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>
<div id="attachments"></div>
<form id="input-form">
<div class="input-row">
<label class="attach-btn" title="ファイルを添付">
<input type="file" id="file-input" multiple accept="*/*" />
📎
</label>
<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>
</div>
</form>
</div>
<script>
const TOOLS = [
{ name: "web_search", label: "Web検索" },
{ name: "scrape_url", label: "スクレイピング" },
{ name: "search_and_fetch", label: "ファイル検索・取得" },
{ name: "pdf_to_text", label: "PDFテキスト変換" },
];
</script>
<script src="{{ url_for('static', path='app.js') }}"></script>
</body>
</html>
|