llms-py 2.0.20__py3-none-any.whl → 3.0.18__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/__init__.py +3 -1
- llms/db.py +359 -0
- llms/{ui/Analytics.mjs → extensions/analytics/ui/index.mjs} +254 -327
- llms/extensions/app/README.md +20 -0
- llms/extensions/app/__init__.py +588 -0
- llms/extensions/app/db.py +540 -0
- llms/{ui → extensions/app/ui}/Recents.mjs +99 -73
- llms/{ui/Sidebar.mjs → extensions/app/ui/index.mjs} +139 -68
- llms/extensions/app/ui/threadStore.mjs +440 -0
- llms/extensions/computer/README.md +96 -0
- llms/extensions/computer/__init__.py +59 -0
- llms/extensions/computer/base.py +80 -0
- llms/extensions/computer/bash.py +185 -0
- llms/extensions/computer/computer.py +523 -0
- llms/extensions/computer/edit.py +299 -0
- llms/extensions/computer/filesystem.py +542 -0
- llms/extensions/computer/platform.py +461 -0
- llms/extensions/computer/run.py +37 -0
- llms/extensions/core_tools/CALCULATOR.md +32 -0
- llms/extensions/core_tools/__init__.py +599 -0
- llms/extensions/core_tools/ui/codemirror/addon/edit/closebrackets.js +201 -0
- llms/extensions/core_tools/ui/codemirror/addon/edit/closetag.js +185 -0
- llms/extensions/core_tools/ui/codemirror/addon/edit/continuelist.js +101 -0
- llms/extensions/core_tools/ui/codemirror/addon/edit/matchbrackets.js +160 -0
- llms/extensions/core_tools/ui/codemirror/addon/edit/matchtags.js +66 -0
- llms/extensions/core_tools/ui/codemirror/addon/edit/trailingspace.js +27 -0
- llms/extensions/core_tools/ui/codemirror/addon/selection/active-line.js +72 -0
- llms/extensions/core_tools/ui/codemirror/addon/selection/mark-selection.js +119 -0
- llms/extensions/core_tools/ui/codemirror/addon/selection/selection-pointer.js +98 -0
- llms/extensions/core_tools/ui/codemirror/codemirror.css +344 -0
- llms/extensions/core_tools/ui/codemirror/codemirror.js +9884 -0
- llms/extensions/core_tools/ui/codemirror/doc/docs.css +225 -0
- llms/extensions/core_tools/ui/codemirror/doc/source_sans.woff +0 -0
- llms/extensions/core_tools/ui/codemirror/mode/clike/clike.js +942 -0
- llms/extensions/core_tools/ui/codemirror/mode/javascript/index.html +118 -0
- llms/extensions/core_tools/ui/codemirror/mode/javascript/javascript.js +962 -0
- llms/extensions/core_tools/ui/codemirror/mode/javascript/typescript.html +62 -0
- llms/extensions/core_tools/ui/codemirror/mode/python/python.js +402 -0
- llms/extensions/core_tools/ui/codemirror/theme/dracula.css +40 -0
- llms/extensions/core_tools/ui/codemirror/theme/mocha.css +135 -0
- llms/extensions/core_tools/ui/index.mjs +650 -0
- llms/extensions/gallery/README.md +61 -0
- llms/extensions/gallery/__init__.py +63 -0
- llms/extensions/gallery/db.py +243 -0
- llms/extensions/gallery/ui/index.mjs +482 -0
- llms/extensions/katex/README.md +39 -0
- llms/extensions/katex/__init__.py +6 -0
- llms/extensions/katex/ui/README.md +125 -0
- llms/extensions/katex/ui/contrib/auto-render.js +338 -0
- llms/extensions/katex/ui/contrib/auto-render.min.js +1 -0
- llms/extensions/katex/ui/contrib/auto-render.mjs +244 -0
- llms/extensions/katex/ui/contrib/copy-tex.js +127 -0
- llms/extensions/katex/ui/contrib/copy-tex.min.js +1 -0
- llms/extensions/katex/ui/contrib/copy-tex.mjs +105 -0
- llms/extensions/katex/ui/contrib/mathtex-script-type.js +109 -0
- llms/extensions/katex/ui/contrib/mathtex-script-type.min.js +1 -0
- llms/extensions/katex/ui/contrib/mathtex-script-type.mjs +24 -0
- llms/extensions/katex/ui/contrib/mhchem.js +3213 -0
- llms/extensions/katex/ui/contrib/mhchem.min.js +1 -0
- llms/extensions/katex/ui/contrib/mhchem.mjs +3109 -0
- llms/extensions/katex/ui/contrib/render-a11y-string.js +887 -0
- llms/extensions/katex/ui/contrib/render-a11y-string.min.js +1 -0
- llms/extensions/katex/ui/contrib/render-a11y-string.mjs +800 -0
- llms/extensions/katex/ui/fonts/KaTeX_AMS-Regular.ttf +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_AMS-Regular.woff +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Fraktur-Bold.woff +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Fraktur-Regular.woff +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Main-Bold.ttf +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Main-Bold.woff +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Main-Bold.woff2 +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Main-BoldItalic.woff +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Main-Italic.ttf +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Main-Italic.woff +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Main-Italic.woff2 +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Main-Regular.ttf +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Main-Regular.woff +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Main-Regular.woff2 +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Math-BoldItalic.woff +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Math-Italic.ttf +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Math-Italic.woff +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Math-Italic.woff2 +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_SansSerif-Bold.woff +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_SansSerif-Italic.woff +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_SansSerif-Regular.woff +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Script-Regular.ttf +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Script-Regular.woff +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Script-Regular.woff2 +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Size1-Regular.ttf +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Size1-Regular.woff +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Size2-Regular.ttf +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Size2-Regular.woff +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Size3-Regular.ttf +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Size3-Regular.woff +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Size4-Regular.ttf +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Size4-Regular.woff +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Typewriter-Regular.woff +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- llms/extensions/katex/ui/index.mjs +92 -0
- llms/extensions/katex/ui/katex-swap.css +1230 -0
- llms/extensions/katex/ui/katex-swap.min.css +1 -0
- llms/extensions/katex/ui/katex.css +1230 -0
- llms/extensions/katex/ui/katex.js +19080 -0
- llms/extensions/katex/ui/katex.min.css +1 -0
- llms/extensions/katex/ui/katex.min.js +1 -0
- llms/extensions/katex/ui/katex.min.mjs +1 -0
- llms/extensions/katex/ui/katex.mjs +18547 -0
- llms/extensions/providers/__init__.py +22 -0
- llms/extensions/providers/anthropic.py +260 -0
- llms/extensions/providers/cerebras.py +36 -0
- llms/extensions/providers/chutes.py +153 -0
- llms/extensions/providers/google.py +559 -0
- llms/extensions/providers/nvidia.py +103 -0
- llms/extensions/providers/openai.py +154 -0
- llms/extensions/providers/openrouter.py +74 -0
- llms/extensions/providers/zai.py +182 -0
- llms/extensions/skills/LICENSE +202 -0
- llms/extensions/skills/__init__.py +130 -0
- llms/extensions/skills/errors.py +25 -0
- llms/extensions/skills/models.py +39 -0
- llms/extensions/skills/parser.py +178 -0
- llms/extensions/skills/ui/index.mjs +376 -0
- llms/extensions/skills/ui/skills/create-plan/SKILL.md +74 -0
- llms/extensions/skills/validator.py +177 -0
- llms/extensions/system_prompts/README.md +22 -0
- llms/extensions/system_prompts/__init__.py +45 -0
- llms/extensions/system_prompts/ui/index.mjs +276 -0
- llms/extensions/system_prompts/ui/prompts.json +1067 -0
- llms/extensions/tools/__init__.py +67 -0
- llms/extensions/tools/ui/index.mjs +837 -0
- llms/index.html +36 -62
- llms/llms.json +180 -879
- llms/main.py +4009 -912
- llms/providers-extra.json +394 -0
- llms/providers.json +1 -0
- llms/ui/App.mjs +176 -8
- llms/ui/ai.mjs +156 -20
- llms/ui/app.css +3768 -321
- llms/ui/ctx.mjs +459 -0
- llms/ui/index.mjs +131 -0
- llms/ui/lib/chart.js +14 -0
- llms/ui/lib/charts.mjs +16 -0
- llms/ui/lib/color.js +14 -0
- llms/ui/lib/highlight.min.mjs +1243 -0
- llms/ui/lib/idb.min.mjs +8 -0
- llms/ui/lib/marked.min.mjs +8 -0
- llms/ui/lib/servicestack-client.mjs +1 -0
- llms/ui/lib/servicestack-vue.mjs +37 -0
- llms/ui/lib/vue-router.min.mjs +6 -0
- llms/ui/lib/vue.min.mjs +13 -0
- llms/ui/lib/vue.mjs +18530 -0
- llms/ui/markdown.mjs +25 -14
- llms/ui/modules/chat/ChatBody.mjs +1156 -0
- llms/ui/{SettingsDialog.mjs → modules/chat/SettingsDialog.mjs} +74 -74
- llms/ui/modules/chat/index.mjs +995 -0
- llms/ui/modules/icons.mjs +46 -0
- llms/ui/modules/layout.mjs +271 -0
- llms/ui/modules/model-selector.mjs +811 -0
- llms/ui/tailwind.input.css +560 -78
- llms/ui/typography.css +54 -36
- llms/ui/utils.mjs +221 -92
- llms_py-3.0.18.dist-info/METADATA +49 -0
- llms_py-3.0.18.dist-info/RECORD +194 -0
- {llms_py-2.0.20.dist-info → llms_py-3.0.18.dist-info}/WHEEL +1 -1
- {llms_py-2.0.20.dist-info → llms_py-3.0.18.dist-info}/licenses/LICENSE +1 -2
- llms/ui/Avatar.mjs +0 -28
- llms/ui/Brand.mjs +0 -34
- llms/ui/ChatPrompt.mjs +0 -443
- llms/ui/Main.mjs +0 -740
- llms/ui/ModelSelector.mjs +0 -60
- llms/ui/ProviderIcon.mjs +0 -29
- llms/ui/ProviderStatus.mjs +0 -105
- llms/ui/SignIn.mjs +0 -64
- llms/ui/SystemPromptEditor.mjs +0 -31
- llms/ui/SystemPromptSelector.mjs +0 -36
- llms/ui/Welcome.mjs +0 -8
- llms/ui/threadStore.mjs +0 -524
- llms/ui.json +0 -1069
- llms_py-2.0.20.dist-info/METADATA +0 -931
- llms_py-2.0.20.dist-info/RECORD +0 -36
- {llms_py-2.0.20.dist-info → llms_py-3.0.18.dist-info}/entry_points.txt +0 -0
- {llms_py-2.0.20.dist-info → llms_py-3.0.18.dist-info}/top_level.txt +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref, computed, watch, inject } from 'vue'
|
|
2
|
-
import { storageObject } from '
|
|
2
|
+
import { storageObject } from '../../utils.mjs'
|
|
3
3
|
|
|
4
4
|
const settingsKey = 'llms.settings'
|
|
5
5
|
|
|
@@ -40,7 +40,7 @@ export function useSettings() {
|
|
|
40
40
|
]
|
|
41
41
|
|
|
42
42
|
let settings = ref(storageObject(settingsKey))
|
|
43
|
-
|
|
43
|
+
|
|
44
44
|
function validSettings(localSettings) {
|
|
45
45
|
const to = {}
|
|
46
46
|
intFields.forEach(f => {
|
|
@@ -65,9 +65,9 @@ export function useSettings() {
|
|
|
65
65
|
})
|
|
66
66
|
listFields.forEach(f => {
|
|
67
67
|
if (localSettings[f] != null && localSettings[f] !== '') {
|
|
68
|
-
to[f] = Array.isArray(localSettings[f])
|
|
68
|
+
to[f] = Array.isArray(localSettings[f])
|
|
69
69
|
? localSettings[f]
|
|
70
|
-
: typeof localSettings[f] == 'string'
|
|
70
|
+
: typeof localSettings[f] == 'string'
|
|
71
71
|
? localSettings[f].split(',').map(x => x.trim())
|
|
72
72
|
: []
|
|
73
73
|
}
|
|
@@ -88,7 +88,7 @@ export function useSettings() {
|
|
|
88
88
|
function resetSettings() {
|
|
89
89
|
return saveSettings({})
|
|
90
90
|
}
|
|
91
|
-
|
|
91
|
+
|
|
92
92
|
function saveSettings(localSettings) {
|
|
93
93
|
// console.log('saveSettings', JSON.stringify(localSettings, undefined, 2))
|
|
94
94
|
settings.value = validSettings(localSettings)
|
|
@@ -107,17 +107,17 @@ export function useSettings() {
|
|
|
107
107
|
|
|
108
108
|
export default {
|
|
109
109
|
template: `
|
|
110
|
-
<div v-if="isOpen" class="fixed inset-0 z-
|
|
110
|
+
<div v-if="isOpen" class="fixed inset-0 z-100 overflow-y-auto" @click.self="close">
|
|
111
111
|
<div class="flex min-h-screen items-center justify-center p-4">
|
|
112
112
|
<!-- Backdrop -->
|
|
113
113
|
<div class="fixed inset-0 bg-black/40 transition-opacity" @click="close"></div>
|
|
114
114
|
|
|
115
115
|
<!-- Dialog -->
|
|
116
|
-
<div class="relative bg-white rounded-lg shadow-xl max-w-2xl w-full max-h-[90vh] overflow-hidden">
|
|
116
|
+
<div class="relative bg-white dark:bg-gray-800 rounded-lg shadow-xl max-w-2xl w-full max-h-[90vh] overflow-hidden">
|
|
117
117
|
<!-- Header -->
|
|
118
|
-
<div class="flex items-center justify-between px-6 py-4 border-b border-gray-200">
|
|
119
|
-
<h2 class="text-xl font-semibold text-gray-900">Chat Request Settings</h2>
|
|
120
|
-
<button type="button" @click="close" class="text-gray-400 hover:text-gray-600">
|
|
118
|
+
<div class="flex items-center justify-between px-6 py-4 border-b border-gray-200 dark:border-gray-700">
|
|
119
|
+
<h2 class="text-xl font-semibold text-gray-900 dark:text-gray-100">Chat Request Settings</h2>
|
|
120
|
+
<button type="button" @click="close" class="text-gray-400 dark:text-gray-500 hover:text-gray-600 dark:hover:text-gray-300">
|
|
121
121
|
<svg class="size-6" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
122
122
|
<path fill="currentColor" d="M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z"/>
|
|
123
123
|
</svg>
|
|
@@ -126,201 +126,201 @@ export default {
|
|
|
126
126
|
|
|
127
127
|
<!-- Content -->
|
|
128
128
|
<form class="px-6 py-4 overflow-y-auto max-h-[calc(90vh-140px)]" @submit.prevent="save">
|
|
129
|
-
<p class="text-sm text-gray-600 mb-4">
|
|
129
|
+
<p class="text-sm text-gray-600 dark:text-gray-400 mb-4">
|
|
130
130
|
Configure default values for chat request options. Leave empty to use model defaults.
|
|
131
131
|
</p>
|
|
132
132
|
|
|
133
133
|
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
134
134
|
<!-- Temperature -->
|
|
135
135
|
<div>
|
|
136
|
-
<label class="block text-sm font-medium text-gray-700 mb-1">
|
|
136
|
+
<label class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">
|
|
137
137
|
Temperature
|
|
138
|
-
<span class="text-gray-500 font-normal">(0-2)</span>
|
|
138
|
+
<span class="text-gray-500 dark:text-gray-400 font-normal">(0-2)</span>
|
|
139
139
|
</label>
|
|
140
|
-
<input type="number" v-model="localSettings.temperature"
|
|
140
|
+
<input type="number" v-model="localSettings.temperature"
|
|
141
141
|
step="0.1" min="0" max="2"
|
|
142
142
|
placeholder="e.g., 0.7"
|
|
143
|
-
class="block w-full rounded-md border border-gray-300 px-3 py-2 text-sm focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500" />
|
|
144
|
-
<p class="mt-1 text-xs text-gray-500">Higher values more random, lower for more focus</p>
|
|
143
|
+
class="block w-full rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 px-3 py-2 text-sm focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500" />
|
|
144
|
+
<p class="mt-1 text-xs text-gray-500 dark:text-gray-400">Higher values more random, lower for more focus</p>
|
|
145
145
|
</div>
|
|
146
146
|
|
|
147
147
|
<!-- Max Completion Tokens -->
|
|
148
148
|
<div>
|
|
149
|
-
<label class="block text-sm font-medium text-gray-700 mb-1">
|
|
149
|
+
<label class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">
|
|
150
150
|
Max Completion Tokens
|
|
151
151
|
</label>
|
|
152
|
-
<input type="number" v-model="localSettings.max_completion_tokens"
|
|
152
|
+
<input type="number" v-model="localSettings.max_completion_tokens"
|
|
153
153
|
step="1" min="1"
|
|
154
154
|
placeholder="e.g., 2048"
|
|
155
|
-
class="block w-full rounded-md border border-gray-300 px-3 py-2 text-sm focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500" />
|
|
156
|
-
<p class="mt-1 text-xs text-gray-500">Max tokens for completion (inc. reasoning tokens)</p>
|
|
155
|
+
class="block w-full rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 px-3 py-2 text-sm focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500" />
|
|
156
|
+
<p class="mt-1 text-xs text-gray-500 dark:text-gray-400">Max tokens for completion (inc. reasoning tokens)</p>
|
|
157
157
|
</div>
|
|
158
158
|
|
|
159
159
|
<!-- Seed -->
|
|
160
160
|
<div>
|
|
161
|
-
<label class="block text-sm font-medium text-gray-700 mb-1">
|
|
161
|
+
<label class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">
|
|
162
162
|
Seed
|
|
163
163
|
</label>
|
|
164
|
-
<input type="number" v-model="localSettings.seed"
|
|
164
|
+
<input type="number" v-model="localSettings.seed"
|
|
165
165
|
step="1"
|
|
166
166
|
placeholder="e.g., 42"
|
|
167
|
-
class="block w-full rounded-md border border-gray-300 px-3 py-2 text-sm focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500" />
|
|
168
|
-
<p class="mt-1 text-xs text-gray-500">For deterministic sampling (Beta feature)</p>
|
|
167
|
+
class="block w-full rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 px-3 py-2 text-sm focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500" />
|
|
168
|
+
<p class="mt-1 text-xs text-gray-500 dark:text-gray-400">For deterministic sampling (Beta feature)</p>
|
|
169
169
|
</div>
|
|
170
170
|
|
|
171
171
|
<!-- Top P -->
|
|
172
172
|
<div>
|
|
173
|
-
<label class="block text-sm font-medium text-gray-700 mb-1">
|
|
173
|
+
<label class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">
|
|
174
174
|
Top P
|
|
175
|
-
<span class="text-gray-500 font-normal">(0-1)</span>
|
|
175
|
+
<span class="text-gray-500 dark:text-gray-400 font-normal">(0-1)</span>
|
|
176
176
|
</label>
|
|
177
|
-
<input type="number" v-model="localSettings.top_p"
|
|
177
|
+
<input type="number" v-model="localSettings.top_p"
|
|
178
178
|
step="0.1" min="0" max="1"
|
|
179
179
|
placeholder="e.g., 0.9"
|
|
180
|
-
class="block w-full rounded-md border border-gray-300 px-3 py-2 text-sm focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500" />
|
|
181
|
-
<p class="mt-1 text-xs text-gray-500">Nucleus sampling - alternative to temperature</p>
|
|
180
|
+
class="block w-full rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 px-3 py-2 text-sm focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500" />
|
|
181
|
+
<p class="mt-1 text-xs text-gray-500 dark:text-gray-400">Nucleus sampling - alternative to temperature</p>
|
|
182
182
|
</div>
|
|
183
183
|
|
|
184
184
|
<!-- Frequency Penalty -->
|
|
185
185
|
<div>
|
|
186
|
-
<label class="block text-sm font-medium text-gray-700 mb-1">
|
|
186
|
+
<label class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">
|
|
187
187
|
Frequency Penalty
|
|
188
|
-
<span class="text-gray-500 font-normal">(-2.0 to 2.0)</span>
|
|
188
|
+
<span class="text-gray-500 dark:text-gray-400 font-normal">(-2.0 to 2.0)</span>
|
|
189
189
|
</label>
|
|
190
|
-
<input type="number" v-model="localSettings.frequency_penalty"
|
|
190
|
+
<input type="number" v-model="localSettings.frequency_penalty"
|
|
191
191
|
step="0.1" min="-2" max="2"
|
|
192
192
|
placeholder="e.g., 0.5"
|
|
193
|
-
class="block w-full rounded-md border border-gray-300 px-3 py-2 text-sm focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500" />
|
|
194
|
-
<p class="mt-1 text-xs text-gray-500">Penalize tokens based on frequency in text</p>
|
|
193
|
+
class="block w-full rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 px-3 py-2 text-sm focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500" />
|
|
194
|
+
<p class="mt-1 text-xs text-gray-500 dark:text-gray-400">Penalize tokens based on frequency in text</p>
|
|
195
195
|
</div>
|
|
196
196
|
|
|
197
197
|
<!-- Presence Penalty -->
|
|
198
198
|
<div>
|
|
199
|
-
<label class="block text-sm font-medium text-gray-700 mb-1">
|
|
199
|
+
<label class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">
|
|
200
200
|
Presence Penalty
|
|
201
|
-
<span class="text-gray-500 font-normal">(-2.0 to 2.0)</span>
|
|
201
|
+
<span class="text-gray-500 dark:text-gray-400 font-normal">(-2.0 to 2.0)</span>
|
|
202
202
|
</label>
|
|
203
|
-
<input type="number" v-model="localSettings.presence_penalty"
|
|
203
|
+
<input type="number" v-model="localSettings.presence_penalty"
|
|
204
204
|
step="0.1" min="-2" max="2"
|
|
205
205
|
placeholder="e.g., 0.5"
|
|
206
|
-
class="block w-full rounded-md border border-gray-300 px-3 py-2 text-sm focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500" />
|
|
207
|
-
<p class="mt-1 text-xs text-gray-500">Penalize tokens based on presence in text</p>
|
|
206
|
+
class="block w-full rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 px-3 py-2 text-sm focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500" />
|
|
207
|
+
<p class="mt-1 text-xs text-gray-500 dark:text-gray-400">Penalize tokens based on presence in text</p>
|
|
208
208
|
</div>
|
|
209
209
|
|
|
210
210
|
<!-- Stop Sequences -->
|
|
211
211
|
<div>
|
|
212
|
-
<label for="stop" class="block text-sm font-medium text-gray-700 mb-1">
|
|
212
|
+
<label for="stop" class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">
|
|
213
213
|
Stop Sequences
|
|
214
214
|
</label>
|
|
215
215
|
<TagInput id="stop" inputClass="h-[37px] !shadow-none"
|
|
216
216
|
v-model="localSettings.stop"
|
|
217
|
-
placeholder=""
|
|
217
|
+
placeholder=""
|
|
218
218
|
label=""
|
|
219
219
|
/>
|
|
220
|
-
<p class="mt-1 text-xs text-gray-500">Up to 4 sequences where API stops generating</p>
|
|
220
|
+
<p class="mt-1 text-xs text-gray-500 dark:text-gray-400">Up to 4 sequences where API stops generating</p>
|
|
221
221
|
</div>
|
|
222
222
|
|
|
223
223
|
<!-- Reasoning Effort -->
|
|
224
224
|
<div>
|
|
225
|
-
<label class="block text-sm font-medium text-gray-700 mb-1">
|
|
225
|
+
<label class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">
|
|
226
226
|
Reasoning Effort
|
|
227
227
|
</label>
|
|
228
228
|
<select v-model="localSettings.reasoning_effort"
|
|
229
|
-
class="block w-full rounded-md border border-gray-300 px-3 py-2 text-sm focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500">
|
|
229
|
+
class="block w-full rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 px-3 py-2 text-sm focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500">
|
|
230
230
|
<option value="">Default</option>
|
|
231
231
|
<option value="minimal">Minimal</option>
|
|
232
232
|
<option value="low">Low</option>
|
|
233
233
|
<option value="medium">Medium</option>
|
|
234
234
|
<option value="high">High</option>
|
|
235
235
|
</select>
|
|
236
|
-
<p class="mt-1 text-xs text-gray-500">Constrains effort on reasoning for reasoning models</p>
|
|
236
|
+
<p class="mt-1 text-xs text-gray-500 dark:text-gray-400">Constrains effort on reasoning for reasoning models</p>
|
|
237
237
|
</div>
|
|
238
238
|
|
|
239
239
|
<!-- Verbosity -->
|
|
240
240
|
<div>
|
|
241
|
-
<label class="block text-sm font-medium text-gray-700 mb-1">
|
|
241
|
+
<label class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">
|
|
242
242
|
Verbosity
|
|
243
243
|
</label>
|
|
244
244
|
<select v-model="localSettings.verbosity"
|
|
245
|
-
class="block w-full rounded-md border border-gray-300 px-3 py-2 text-sm focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500">
|
|
245
|
+
class="block w-full rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 px-3 py-2 text-sm focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500">
|
|
246
246
|
<option value="">Default</option>
|
|
247
247
|
<option value="low">Low</option>
|
|
248
248
|
<option value="medium">Medium</option>
|
|
249
249
|
<option value="high">High</option>
|
|
250
250
|
</select>
|
|
251
|
-
<p class="mt-1 text-xs text-gray-500">Constrains verbosity of model's response</p>
|
|
251
|
+
<p class="mt-1 text-xs text-gray-500 dark:text-gray-400">Constrains verbosity of model's response</p>
|
|
252
252
|
</div>
|
|
253
253
|
|
|
254
254
|
<!-- Service Tier -->
|
|
255
255
|
<div>
|
|
256
|
-
<label class="block text-sm font-medium text-gray-700 mb-1">
|
|
256
|
+
<label class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">
|
|
257
257
|
Service Tier
|
|
258
258
|
</label>
|
|
259
|
-
<input type="text" v-model="localSettings.service_tier"
|
|
259
|
+
<input type="text" v-model="localSettings.service_tier"
|
|
260
260
|
placeholder="e.g., auto, default"
|
|
261
|
-
class="block w-full rounded-md border border-gray-300 px-3 py-2 text-sm focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500" />
|
|
262
|
-
<p class="mt-1 text-xs text-gray-500">Processing type for serving the request</p>
|
|
261
|
+
class="block w-full rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 px-3 py-2 text-sm focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500" />
|
|
262
|
+
<p class="mt-1 text-xs text-gray-500 dark:text-gray-400">Processing type for serving the request</p>
|
|
263
263
|
</div>
|
|
264
264
|
|
|
265
265
|
<!-- Top Logprobs -->
|
|
266
266
|
<div>
|
|
267
|
-
<label class="block text-sm font-medium text-gray-700 mb-1">
|
|
267
|
+
<label class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">
|
|
268
268
|
Top Logprobs
|
|
269
|
-
<span class="text-gray-500 font-normal">(0-20)</span>
|
|
269
|
+
<span class="text-gray-500 dark:text-gray-400 font-normal">(0-20)</span>
|
|
270
270
|
</label>
|
|
271
|
-
<input type="number" v-model="localSettings.top_logprobs"
|
|
271
|
+
<input type="number" v-model="localSettings.top_logprobs"
|
|
272
272
|
step="1" min="0" max="20"
|
|
273
273
|
placeholder="e.g., 5"
|
|
274
|
-
class="block w-full rounded-md border border-gray-300 px-3 py-2 text-sm focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500" />
|
|
275
|
-
<p class="mt-1 text-xs text-gray-500">Number of most likely tokens to return with log probs</p>
|
|
274
|
+
class="block w-full rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 px-3 py-2 text-sm focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500" />
|
|
275
|
+
<p class="mt-1 text-xs text-gray-500 dark:text-gray-400">Number of most likely tokens to return with log probs</p>
|
|
276
276
|
</div>
|
|
277
277
|
|
|
278
278
|
<!-- Safety Identifier -->
|
|
279
279
|
<div>
|
|
280
|
-
<label class="block text-sm font-medium text-gray-700 mb-1">
|
|
280
|
+
<label class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">
|
|
281
281
|
Safety Identifier
|
|
282
282
|
</label>
|
|
283
|
-
<input type="text" v-model="localSettings.safety_identifier"
|
|
283
|
+
<input type="text" v-model="localSettings.safety_identifier"
|
|
284
284
|
placeholder="Unique user identifier"
|
|
285
|
-
class="block w-full rounded-md border border-gray-300 px-3 py-2 text-sm focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500" />
|
|
286
|
-
<p class="mt-1 text-xs text-gray-500">Identifier to help detect policy violations</p>
|
|
285
|
+
class="block w-full rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 px-3 py-2 text-sm focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500" />
|
|
286
|
+
<p class="mt-1 text-xs text-gray-500 dark:text-gray-400">Identifier to help detect policy violations</p>
|
|
287
287
|
</div>
|
|
288
288
|
|
|
289
289
|
<!-- Store -->
|
|
290
290
|
<div>
|
|
291
291
|
<label class="flex items-center">
|
|
292
292
|
<input type="checkbox" v-model="localSettings.store"
|
|
293
|
-
class="rounded border-gray-300 text-blue-600 focus:ring-blue-500" />
|
|
294
|
-
<span class="ml-2 text-sm font-medium text-gray-700">Store Output</span>
|
|
293
|
+
class="rounded border-gray-300 dark:border-gray-600 text-blue-600 focus:ring-blue-500" />
|
|
294
|
+
<span class="ml-2 text-sm font-medium text-gray-700 dark:text-gray-300">Store Output</span>
|
|
295
295
|
</label>
|
|
296
|
-
<p class="mt-1 text-xs text-gray-500">Store output for model distillation or evals</p>
|
|
296
|
+
<p class="mt-1 text-xs text-gray-500 dark:text-gray-400">Store output for model distillation or evals</p>
|
|
297
297
|
</div>
|
|
298
298
|
|
|
299
299
|
<!-- Enable Thinking -->
|
|
300
300
|
<div>
|
|
301
301
|
<label class="flex items-center">
|
|
302
302
|
<input type="checkbox" v-model="localSettings.enable_thinking"
|
|
303
|
-
class="rounded border-gray-300 text-blue-600 focus:ring-blue-500" />
|
|
304
|
-
<span class="ml-2 text-sm font-medium text-gray-700">Enable Thinking</span>
|
|
303
|
+
class="rounded border-gray-300 dark:border-gray-600 text-blue-600 focus:ring-blue-500" />
|
|
304
|
+
<span class="ml-2 text-sm font-medium text-gray-700 dark:text-gray-300">Enable Thinking</span>
|
|
305
305
|
</label>
|
|
306
|
-
<p class="mt-1 text-xs text-gray-500">Enable thinking mode for supported models (Qwen)</p>
|
|
306
|
+
<p class="mt-1 text-xs text-gray-500 dark:text-gray-400">Enable thinking mode for supported models (Qwen)</p>
|
|
307
307
|
</div>
|
|
308
308
|
</div>
|
|
309
309
|
</form>
|
|
310
310
|
|
|
311
311
|
<!-- Footer -->
|
|
312
|
-
<div class="flex items-center justify-between px-6 py-4 border-t border-gray-200 bg-gray-50">
|
|
312
|
+
<div class="flex items-center justify-between px-6 py-4 border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800">
|
|
313
313
|
<button type="button" @click="reset"
|
|
314
|
-
class="px-4 py-2 text-sm font-medium text-gray-700 hover:text-gray-900">
|
|
314
|
+
class="px-4 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-gray-100">
|
|
315
315
|
Reset to Defaults
|
|
316
316
|
</button>
|
|
317
317
|
<div class="flex space-x-3">
|
|
318
318
|
<button type="button" @click="close"
|
|
319
|
-
class="px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50">
|
|
319
|
+
class="px-4 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-md hover:bg-gray-50 dark:hover:bg-gray-700">
|
|
320
320
|
Cancel
|
|
321
321
|
</button>
|
|
322
322
|
<button type="submit" @click="save"
|
|
323
|
-
class="px-4 py-2 text-sm font-medium text-white bg-blue-600 rounded-md hover:bg-blue-700">
|
|
323
|
+
class="px-4 py-2 text-sm font-medium text-white bg-blue-600 dark:bg-blue-500 rounded-md hover:bg-blue-700 dark:hover:bg-blue-600">
|
|
324
324
|
Save Settings
|
|
325
325
|
</button>
|
|
326
326
|
</div>
|
|
@@ -337,9 +337,9 @@ export default {
|
|
|
337
337
|
},
|
|
338
338
|
emits: ['close'],
|
|
339
339
|
setup(props, { emit }) {
|
|
340
|
-
const
|
|
341
|
-
const { settings, saveSettings, resetSettings } =
|
|
342
|
-
|
|
340
|
+
const ctx = inject('ctx')
|
|
341
|
+
const { settings, saveSettings, resetSettings } = ctx.chat.settings
|
|
342
|
+
|
|
343
343
|
// Local copy for editing
|
|
344
344
|
const localSettings = ref(Object.assign({}, settings.value))
|
|
345
345
|
|