llms-py 2.0.18__py3-none-any.whl → 2.0.33__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- llms/index.html +17 -1
- llms/llms.json +1132 -1075
- llms/main.py +561 -103
- llms/ui/Analytics.mjs +115 -104
- llms/ui/App.mjs +81 -4
- llms/ui/Avatar.mjs +61 -4
- llms/ui/Brand.mjs +29 -11
- llms/ui/ChatPrompt.mjs +163 -16
- llms/ui/Main.mjs +177 -94
- llms/ui/ModelSelector.mjs +28 -10
- llms/ui/OAuthSignIn.mjs +92 -0
- llms/ui/ProviderStatus.mjs +12 -12
- llms/ui/Recents.mjs +13 -13
- llms/ui/SettingsDialog.mjs +65 -65
- llms/ui/Sidebar.mjs +24 -19
- llms/ui/SystemPromptEditor.mjs +5 -5
- llms/ui/SystemPromptSelector.mjs +26 -6
- llms/ui/Welcome.mjs +2 -2
- llms/ui/ai.mjs +69 -5
- llms/ui/app.css +548 -34
- llms/ui/lib/servicestack-vue.mjs +9 -9
- llms/ui/markdown.mjs +8 -8
- llms/ui/tailwind.input.css +2 -0
- llms/ui/threadStore.mjs +39 -0
- llms/ui/typography.css +54 -36
- {llms_py-2.0.18.dist-info → llms_py-2.0.33.dist-info}/METADATA +403 -47
- llms_py-2.0.33.dist-info/RECORD +48 -0
- {llms_py-2.0.18.dist-info → llms_py-2.0.33.dist-info}/licenses/LICENSE +1 -2
- llms/__pycache__/__init__.cpython-312.pyc +0 -0
- llms/__pycache__/__init__.cpython-313.pyc +0 -0
- llms/__pycache__/__init__.cpython-314.pyc +0 -0
- llms/__pycache__/__main__.cpython-312.pyc +0 -0
- llms/__pycache__/__main__.cpython-314.pyc +0 -0
- llms/__pycache__/llms.cpython-312.pyc +0 -0
- llms/__pycache__/main.cpython-312.pyc +0 -0
- llms/__pycache__/main.cpython-313.pyc +0 -0
- llms/__pycache__/main.cpython-314.pyc +0 -0
- llms_py-2.0.18.dist-info/RECORD +0 -56
- {llms_py-2.0.18.dist-info → llms_py-2.0.33.dist-info}/WHEEL +0 -0
- {llms_py-2.0.18.dist-info → llms_py-2.0.33.dist-info}/entry_points.txt +0 -0
- {llms_py-2.0.18.dist-info → llms_py-2.0.33.dist-info}/top_level.txt +0 -0
llms/ui/markdown.mjs
CHANGED
|
@@ -26,7 +26,7 @@ export const marked = (() => {
|
|
|
26
26
|
export function renderMarkdown(content) {
|
|
27
27
|
if (content) {
|
|
28
28
|
content = content
|
|
29
|
-
.replaceAll(`\\[ \\boxed{`,'\n<span class="inline-block text-xl text-blue-500 bg-blue-50 px-3 py-1 rounded">')
|
|
29
|
+
.replaceAll(`\\[ \\boxed{`,'\n<span class="inline-block text-xl text-blue-500 bg-blue-50 dark:text-blue-400 dark:bg-blue-950 px-3 py-1 rounded">')
|
|
30
30
|
.replaceAll('} \\]','</span>\n')
|
|
31
31
|
}
|
|
32
32
|
return marked.parse(content)
|
|
@@ -160,19 +160,19 @@ function thinkTag() {
|
|
|
160
160
|
|
|
161
161
|
// Create the expandable, scrollable component with Tailwind CSS
|
|
162
162
|
return `
|
|
163
|
-
<div class="my-4 border border-gray-200 rounded-lg shadow-sm">
|
|
164
|
-
<button
|
|
163
|
+
<div class="my-4 border border-gray-200 dark:border-gray-700 rounded-lg shadow-sm">
|
|
164
|
+
<button type="button"
|
|
165
165
|
id="${uniqueId}-toggle"
|
|
166
|
-
class="flex justify-between items-center w-full py-2 px-4 text-left text-gray-700 font-medium hover:bg-gray-50 focus:outline-none"
|
|
166
|
+
class="flex justify-between items-center w-full py-2 px-4 text-left text-gray-700 dark:text-gray-300 font-medium hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none"
|
|
167
167
|
onclick="toggleThink('${uniqueId}')">
|
|
168
168
|
<span>Thinking</span>
|
|
169
|
-
<svg id="${uniqueId}-icon" class="h-5 w-5 text-gray-500 transform transition-transform" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
169
|
+
<svg id="${uniqueId}-icon" class="h-5 w-5 text-gray-500 dark:text-gray-400 transform transition-transform" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
170
170
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
|
|
171
171
|
</svg>
|
|
172
172
|
</button>
|
|
173
|
-
<div
|
|
174
|
-
id="${uniqueId}-content"
|
|
175
|
-
class="hidden overflow-auto max-h-64 px-4 border-t border-gray-200 bg-gray-50"
|
|
173
|
+
<div
|
|
174
|
+
id="${uniqueId}-content"
|
|
175
|
+
class="hidden overflow-auto max-h-64 px-4 border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900"
|
|
176
176
|
style="max-height:16rem;">
|
|
177
177
|
${parsedContent}
|
|
178
178
|
</div>
|
llms/ui/tailwind.input.css
CHANGED
|
@@ -43,6 +43,8 @@
|
|
|
43
43
|
b, strong { font-weight:600; }
|
|
44
44
|
::-webkit-scrollbar{width:8px;height:8px}
|
|
45
45
|
::-webkit-scrollbar-thumb{background-color:#ccc}
|
|
46
|
+
.dark ::-webkit-scrollbar{background:#1f2937}
|
|
47
|
+
.dark ::-webkit-scrollbar-thumb{background-color:#4b5563}
|
|
46
48
|
[role=dialog].z-10 {
|
|
47
49
|
z-index: 60;
|
|
48
50
|
}
|
llms/ui/threadStore.mjs
CHANGED
|
@@ -396,6 +396,41 @@ function getGroupedThreads(total) {
|
|
|
396
396
|
// Group threads by time periods
|
|
397
397
|
const groupedThreads = computed(() => getGroupedThreads(threads.value.length))
|
|
398
398
|
|
|
399
|
+
async function getAllRequests() {
|
|
400
|
+
await initDB()
|
|
401
|
+
|
|
402
|
+
const tx = db.transaction(['requests'], 'readonly')
|
|
403
|
+
const store = tx.objectStore('requests')
|
|
404
|
+
const allRequests = await store.getAll()
|
|
405
|
+
return allRequests
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
async function getRequest(requestId) {
|
|
409
|
+
await initDB()
|
|
410
|
+
|
|
411
|
+
const tx = db.transaction(['requests'], 'readonly')
|
|
412
|
+
const store = tx.objectStore('requests')
|
|
413
|
+
const request = await store.get(requestId)
|
|
414
|
+
return request
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
async function getAllRequestIds() {
|
|
418
|
+
await initDB()
|
|
419
|
+
|
|
420
|
+
const tx = db.transaction(['requests'], 'readonly')
|
|
421
|
+
const store = tx.objectStore('requests')
|
|
422
|
+
const ids = await store.getAllKeys()
|
|
423
|
+
return ids
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
async function getAllThreadIds() {
|
|
427
|
+
await initDB()
|
|
428
|
+
const tx = db.transaction(['threads'], 'readonly')
|
|
429
|
+
const store = tx.objectStore('threads')
|
|
430
|
+
const ids = await store.getAllKeys()
|
|
431
|
+
return ids
|
|
432
|
+
}
|
|
433
|
+
|
|
399
434
|
// Query requests with pagination and filtering
|
|
400
435
|
async function getRequests(filters = {}, limit = 20, offset = 0) {
|
|
401
436
|
try {
|
|
@@ -517,8 +552,12 @@ export function useThreadStore() {
|
|
|
517
552
|
setCurrentThreadFromRoute,
|
|
518
553
|
clearCurrentThread,
|
|
519
554
|
getGroupedThreads,
|
|
555
|
+
getRequest,
|
|
520
556
|
getRequests,
|
|
557
|
+
getAllRequests,
|
|
521
558
|
getFilterOptions,
|
|
522
559
|
deleteRequest,
|
|
560
|
+
getAllRequestIds,
|
|
561
|
+
getAllThreadIds,
|
|
523
562
|
}
|
|
524
563
|
}
|
llms/ui/typography.css
CHANGED
|
@@ -94,16 +94,18 @@
|
|
|
94
94
|
border-left-style: solid;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
.dark .prose :
|
|
97
|
+
.dark .prose :where(td):not(:where([class~="not-prose"] *)) {
|
|
98
98
|
color: rgb(209 213 219); /*text-gray-300*/
|
|
99
99
|
}
|
|
100
100
|
.dark .prose :where(h1,h2,h3,h4,h5,h6,th):not(:where([class~="not-prose"] *)) {
|
|
101
101
|
color: rgb(243 244 246); /*text-gray-100*/
|
|
102
102
|
}
|
|
103
|
-
.dark .prose :where(code):not(:where([class~="not-prose"] *))
|
|
103
|
+
.dark .prose :where(code):not(:where([class~="not-prose"] *)),
|
|
104
|
+
.dark .message em {
|
|
104
105
|
background-color: rgb(30 58 138); /*text-blue-900*/
|
|
105
106
|
color: rgb(243 244 246); /*text-gray-100*/
|
|
106
107
|
}
|
|
108
|
+
|
|
107
109
|
.dark .prose :where(pre code):not(:where([class~="not-prose"] *)) {
|
|
108
110
|
background-color: unset;
|
|
109
111
|
}
|
|
@@ -130,10 +132,6 @@
|
|
|
130
132
|
.not-prose { max-width: unset; }
|
|
131
133
|
.prose-table { max-width: 56rem; width: 56rem; padding-left: 1px; overflow-x: auto; }
|
|
132
134
|
.hide-h2+h2 { display:none }
|
|
133
|
-
.hljs, .prose :where(pre):not(:where([class~="not-prose"] *)) .hljs {
|
|
134
|
-
color: var(--tw-prose-pre-code) !important;
|
|
135
|
-
background-color: var(--tw-prose-pre-bg) !important;
|
|
136
|
-
}
|
|
137
135
|
@media (min-width: 1024px) {
|
|
138
136
|
.lg\:prose-xl {
|
|
139
137
|
font-size: 1.25rem;
|
|
@@ -285,6 +283,12 @@
|
|
|
285
283
|
.prose pre::-webkit-scrollbar-thumb, .prose code::-webkit-scrollbar-thumb {
|
|
286
284
|
background-color: rgb(100 116 139);
|
|
287
285
|
}
|
|
286
|
+
.dark .prose pre::-webkit-scrollbar, .dark .prose code::-webkit-scrollbar {
|
|
287
|
+
background: #111827;
|
|
288
|
+
}
|
|
289
|
+
.dark .prose pre::-webkit-scrollbar-thumb, .dark .prose code::-webkit-scrollbar-thumb {
|
|
290
|
+
background-color: rgb(71 85 105);
|
|
291
|
+
}
|
|
288
292
|
|
|
289
293
|
.html-format {
|
|
290
294
|
max-width: unset;
|
|
@@ -390,6 +394,33 @@ h1:hover .header-anchor, h1 .header-anchor:focus, h2:hover .header-anchor, h2 .h
|
|
|
390
394
|
font-weight: 600;
|
|
391
395
|
}
|
|
392
396
|
|
|
397
|
+
pre {
|
|
398
|
+
overflow-x: auto;
|
|
399
|
+
font-weight: 400;
|
|
400
|
+
font-size: .875em;
|
|
401
|
+
line-height: 1.7142857;
|
|
402
|
+
margin-top: 1.7142857em;
|
|
403
|
+
margin-bottom: 1.7142857em;
|
|
404
|
+
border-radius: .375rem;
|
|
405
|
+
padding: .8571429em 1.1428571em;
|
|
406
|
+
max-width: calc(100vw - 1rem);
|
|
407
|
+
min-width: fit-content;
|
|
408
|
+
background-color: #282c34;
|
|
409
|
+
}
|
|
410
|
+
pre code.hljs {
|
|
411
|
+
display: block;
|
|
412
|
+
overflow-x: auto;
|
|
413
|
+
padding: 1em;
|
|
414
|
+
}
|
|
415
|
+
.message pre {
|
|
416
|
+
max-width: 100%;
|
|
417
|
+
min-width: auto;
|
|
418
|
+
}
|
|
419
|
+
.message pre code.hljs {
|
|
420
|
+
overflow-x: unset;
|
|
421
|
+
width: 100%;
|
|
422
|
+
}
|
|
423
|
+
|
|
393
424
|
/* highlight.js - vs.css */
|
|
394
425
|
.hljs {background:white;color:black}
|
|
395
426
|
.hljs-comment,.hljs-quote,.hljs-variable{color:#008000}
|
|
@@ -413,38 +444,25 @@ pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5p
|
|
|
413
444
|
.hljs-built_in,.hljs-class .hljs-title,.hljs-title.class_{color:#e6c07b}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}
|
|
414
445
|
.hljs-link{text-decoration:underline}
|
|
415
446
|
|
|
416
|
-
/*
|
|
417
|
-
.
|
|
418
|
-
color: #
|
|
419
|
-
|
|
447
|
+
/* Dark mode overrides for Chat-specific styles */
|
|
448
|
+
.dark .prose blockquote {
|
|
449
|
+
border-left-color: #374151;
|
|
450
|
+
color: #9ca3af;
|
|
420
451
|
}
|
|
421
|
-
.
|
|
422
|
-
|
|
452
|
+
.dark .prose th,
|
|
453
|
+
.dark .prose td {
|
|
454
|
+
border-color: #374151;
|
|
423
455
|
}
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
overflow-x: auto;
|
|
427
|
-
font-weight: 400;
|
|
428
|
-
font-size: .875em;
|
|
429
|
-
line-height: 1.7142857;
|
|
430
|
-
margin-top: 1.7142857em;
|
|
431
|
-
margin-bottom: 1.7142857em;
|
|
432
|
-
border-radius: .375rem;
|
|
433
|
-
padding: .8571429em 1.1428571em;
|
|
434
|
-
max-width: calc(100vw - 1rem);
|
|
435
|
-
min-width: fit-content;
|
|
436
|
-
background-color: #282c34 !important;
|
|
456
|
+
.dark .prose th {
|
|
457
|
+
background-color: #1f2937;
|
|
437
458
|
}
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
overflow-x: auto;
|
|
441
|
-
padding: 1em;
|
|
459
|
+
.dark .prose td {
|
|
460
|
+
background-color: #111827;
|
|
442
461
|
}
|
|
443
|
-
.
|
|
444
|
-
|
|
445
|
-
|
|
462
|
+
.hljs-comment, .hljs-quote {
|
|
463
|
+
color: rgb(148 163 184); /*text-slate-400*/
|
|
464
|
+
}
|
|
465
|
+
.dark .prose > pre, .dark .prose pre code.hljs {
|
|
466
|
+
background-color: #111827 !important;
|
|
467
|
+
color: #f3f4f6;
|
|
446
468
|
}
|
|
447
|
-
.message pre code.hljs {
|
|
448
|
-
overflow-x: unset;
|
|
449
|
-
width: 100%;
|
|
450
|
-
}
|