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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
|
// Code generated by templ - DO NOT EDIT.
// templ: version: v0.2.731
package main
//lint:file-ignore SA4006 This context is only used if a nested component is present.
import "github.com/a-h/templ"
import templruntime "github.com/a-h/templ/runtime"
func base(meta pageMeta, body templ.Component) templ.Component {
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
if !templ_7745c5c3_IsBuffer {
defer func() {
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
if templ_7745c5c3_Err == nil {
templ_7745c5c3_Err = templ_7745c5c3_BufErr
}
}()
}
ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
if templ_7745c5c3_Var1 == nil {
templ_7745c5c3_Var1 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<html lang=\"en\"><head><meta charset=\"UTF-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"><title>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var2 string
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(meta.Title)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `tourian.templ`, Line: 8, Col: 22}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</title><link rel=\"stylesheet\" href=\"https://cdn.xeiaso.net/static/pkg/iosevka/family.css\"><link rel=\"stylesheet\" href=\"https://cdn.xeiaso.net/file/christine-static/static/font/inter/inter.css\"><link rel=\"stylesheet\" href=\"/static/font/podkova.css\"><link href=\"/static/styles.css\" rel=\"stylesheet\"><script src=\"/static/js/htmx.min.js\"></script><script src=\"/static/js/ws.js\"></script><link rel=\"icon\" type=\"image/png\" href=\"https://cdn.xeiaso.net/sticker/mimi/happy/256\"><!-- Open Graph meta tags for social media previews --><meta property=\"og:title\" content=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(meta.SocialTitle)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `tourian.templ`, Line: 27, Col: 55}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\"><meta property=\"og:description\" content=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(meta.Description)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `tourian.templ`, Line: 30, Col: 30}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\"><meta property=\"og:image\" content=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(meta.Image)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `tourian.templ`, Line: 34, Col: 24}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\"></head>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = body.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</html>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return templ_7745c5c3_Err
})
}
func indexPage() templ.Component {
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
if !templ_7745c5c3_IsBuffer {
defer func() {
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
if templ_7745c5c3_Err == nil {
templ_7745c5c3_Err = templ_7745c5c3_BufErr
}
}()
}
ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Var6 := templ.GetChildren(ctx)
if templ_7745c5c3_Var6 == nil {
templ_7745c5c3_Var6 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<body class=\"bg-gray-100 h-screen flex justify-center items-center\"><div hx-ext=\"ws\" ws-connect=\"/ws\" id=\"parent\" class=\"max-w-3xl w-full bg-white shadow-md rounded-lg overflow-hidden\"><div class=\"bg-gray-200 px-4 py-2 border-b\"><h2 class=\"text-lg font-semibold font-serif text-gray-800 mb-0 pb-0\">Mimi</h2><p class=\"ml-auto mr-4 text-xs text-gray-600\" id=\"conversation_id\">Connecting...</p></div><div class=\"px-4 py-6 h-[40em] overflow-y-auto\" hx-trigger=\"load\" id=\"messages\"><!-- Messages will be dynamically added here --><div id=\"welcome-message\" class=\"max-w-md mx-auto m-4 p-4 rounded-lg bg-gray-300\"><h1 class=\"text-3xl font-bold font-serif mb-4\">Welcome to ChatMimi</h1><p class=\"text-lg mb-4\">Start chatting with our intelligent AI bot to get assistance, ask questions, or simply have a conversation. It's all up to you!</p><p class=\"mb-2\">If it takes a moment for Mimi to reply, she may be having a cat-nap. Stay patient and she'll be back soon!</p></div></div><form id=\"form\" class=\"bg-gray-200 px-4 py-2 border-t flex items-center\" ws-send><input name=\"role\" type=\"hidden\" value=\"user\"> <input name=\"content\" type=\"text\" autofocus autocomplete=\"off\" placeholder=\"Type your message...\" class=\"flex-1 px-2 py-1 rounded-md focus:outline-none focus:ring focus:ring-blue-300\"> <button type=\"submit\" class=\"bg-blue-500 text-white px-4 py-1 rounded-md ml-2\">Send</button></form></div></body><script>\n document\n .getElementById(\"messages\")\n .addEventListener(\"htmx:load\", function (event) {\n event.target.scrollIntoView(false);\n });\n </script>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return templ_7745c5c3_Err
})
}
func messagePage() templ.Component {
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
if !templ_7745c5c3_IsBuffer {
defer func() {
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
if templ_7745c5c3_Err == nil {
templ_7745c5c3_Err = templ_7745c5c3_BufErr
}
}()
}
ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Var7 := templ.GetChildren(ctx)
if templ_7745c5c3_Var7 == nil {
templ_7745c5c3_Var7 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<body class=\"bg-gray-50 flex justify-center items-center\"><div class=\"max-w-3xl bg-gray-100 p-4\"><div class=\"p-4 mb-4 bg-gray-200 rounded-lg\"><nav class=\"flex flex-row items-center\"><a class=\"text-blue-700 hover:text-blue-500 px-4 text-lg font-serif\" href=\"/\">ChatMimi</a> <span class=\"mx-auto\"></span> <a class=\"text-blue-700 hover:text-blue-500 px-4 text-lg font-serif\" href=\"https://xeiaso.net\">Xe Iaso</a></nav></div><article class=\"prose max-x-none\"><h1 class=\"font-heavy font-serif\">Can we really trust AI chatbots?</h1><p class=\"font-bold text-2xl font-serif\">AI chatbots are cool and all, but can we really trust them in action?</p><p>AI chatbots have become ubiquitous. It's hard to go anywhere without seeing them or the influence they leave behind. They're in our phones, our computers, our search queries, our slack channels, and even our homes. They're everywhere, and they're the next big hype cycle in tech.</p><p class=\"font-bold text-2xl font-serif\">But can we really trust them?</p><p>I made ChatMimi as an absurd example of how easy it is to manipulate AI chatbots to push you towards a given view or belief. Sure, any particular attack is going to be a lot more elaborate than this, but I was able to create this somewhat absurd example in an afternoon of hacking.</p><p class=\"font-bold text-2xl font-serif\">If ChatMimi can nudge you towards vegetable consumption, what else could the chatbots you use be nudging you towards?</p><p>Sure ChatMimi is not subtle, but GPT-5 could very well be extremely subtle.</p><p>If you’re relying on chatbots that you can’t host yourself with your own models, you are relying on a time bomb. Sure the bots will be available today, but someone could decide that the bot isn’t worth the effort to run and turn it off and then you’re left to pick up the pieces without it. And that’s not even considering the privacy implications of sending all your chat data to a third party.</p><p>The good news is that if you have a decently modern gaming PC or an Apple Silicon Mac, you can run large language models locally. Here’s a few to choose between:</p><table><tr><th>Amount of ram/vram you have</th><th>Ollama model you should run</th></tr><tr><td>8 GB</td><td><a href=\"https://ollama.com/library/phi:2.7b-chat-v2-q5_K_M\" target=\"_blank\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var8 string
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs("Phi 2 3B @ Q5_K_M")
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `tourian.templ`, Line: 169, Col: 29}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</a></td></tr><tr><td>16 GB</td><td><a href=\"https://ollama.com/library/llama-pro:8b-instruct-q5_K_M\" target=\"_blank\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var9 string
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs("Llama Pro 7B @ Q5_K_M")
if templ_7745c5c3_Err != nil {
return templ.Error{Er
|