llms-py 3.0.0b1__py3-none-any.whl → 3.0.0b3__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.
Files changed (63) hide show
  1. llms/__pycache__/__init__.cpython-312.pyc +0 -0
  2. llms/__pycache__/__init__.cpython-313.pyc +0 -0
  3. llms/__pycache__/__init__.cpython-314.pyc +0 -0
  4. llms/__pycache__/__main__.cpython-312.pyc +0 -0
  5. llms/__pycache__/__main__.cpython-314.pyc +0 -0
  6. llms/__pycache__/llms.cpython-312.pyc +0 -0
  7. llms/__pycache__/main.cpython-312.pyc +0 -0
  8. llms/__pycache__/main.cpython-313.pyc +0 -0
  9. llms/__pycache__/main.cpython-314.pyc +0 -0
  10. llms/__pycache__/plugins.cpython-314.pyc +0 -0
  11. llms/index.html +27 -57
  12. llms/llms.json +48 -15
  13. llms/main.py +923 -624
  14. llms/providers/__pycache__/anthropic.cpython-314.pyc +0 -0
  15. llms/providers/__pycache__/chutes.cpython-314.pyc +0 -0
  16. llms/providers/__pycache__/google.cpython-314.pyc +0 -0
  17. llms/providers/__pycache__/nvidia.cpython-314.pyc +0 -0
  18. llms/providers/__pycache__/openai.cpython-314.pyc +0 -0
  19. llms/providers/__pycache__/openrouter.cpython-314.pyc +0 -0
  20. llms/providers/anthropic.py +189 -0
  21. llms/providers/chutes.py +152 -0
  22. llms/providers/google.py +306 -0
  23. llms/providers/nvidia.py +107 -0
  24. llms/providers/openai.py +159 -0
  25. llms/providers/openrouter.py +70 -0
  26. llms/providers-extra.json +356 -0
  27. llms/providers.json +1 -1
  28. llms/ui/App.mjs +150 -57
  29. llms/ui/ai.mjs +84 -50
  30. llms/ui/app.css +1 -4963
  31. llms/ui/ctx.mjs +196 -0
  32. llms/ui/index.mjs +117 -0
  33. llms/ui/lib/charts.mjs +9 -13
  34. llms/ui/markdown.mjs +6 -0
  35. llms/ui/{Analytics.mjs → modules/analytics.mjs} +76 -64
  36. llms/ui/{Main.mjs → modules/chat/ChatBody.mjs} +91 -179
  37. llms/ui/{SettingsDialog.mjs → modules/chat/SettingsDialog.mjs} +8 -8
  38. llms/ui/{ChatPrompt.mjs → modules/chat/index.mjs} +281 -96
  39. llms/ui/modules/layout.mjs +267 -0
  40. llms/ui/modules/model-selector.mjs +851 -0
  41. llms/ui/{Recents.mjs → modules/threads/Recents.mjs} +10 -11
  42. llms/ui/{Sidebar.mjs → modules/threads/index.mjs} +48 -45
  43. llms/ui/{threadStore.mjs → modules/threads/threadStore.mjs} +21 -7
  44. llms/ui/tailwind.input.css +441 -79
  45. llms/ui/utils.mjs +83 -123
  46. {llms_py-3.0.0b1.dist-info → llms_py-3.0.0b3.dist-info}/METADATA +1 -1
  47. llms_py-3.0.0b3.dist-info/RECORD +65 -0
  48. llms/ui/Avatar.mjs +0 -85
  49. llms/ui/Brand.mjs +0 -52
  50. llms/ui/ModelSelector.mjs +0 -693
  51. llms/ui/OAuthSignIn.mjs +0 -92
  52. llms/ui/ProviderIcon.mjs +0 -36
  53. llms/ui/ProviderStatus.mjs +0 -105
  54. llms/ui/SignIn.mjs +0 -64
  55. llms/ui/SystemPromptEditor.mjs +0 -31
  56. llms/ui/SystemPromptSelector.mjs +0 -56
  57. llms/ui/Welcome.mjs +0 -8
  58. llms/ui.json +0 -1069
  59. llms_py-3.0.0b1.dist-info/RECORD +0 -49
  60. {llms_py-3.0.0b1.dist-info → llms_py-3.0.0b3.dist-info}/WHEEL +0 -0
  61. {llms_py-3.0.0b1.dist-info → llms_py-3.0.0b3.dist-info}/entry_points.txt +0 -0
  62. {llms_py-3.0.0b1.dist-info → llms_py-3.0.0b3.dist-info}/licenses/LICENSE +0 -0
  63. {llms_py-3.0.0b1.dist-info → llms_py-3.0.0b3.dist-info}/top_level.txt +0 -0
Binary file
Binary file
Binary file
Binary file
Binary file
llms/index.html CHANGED
@@ -1,18 +1,22 @@
1
1
  <html>
2
+
2
3
  <head>
3
4
  <title>llms.py</title>
4
5
  <link rel="stylesheet" href="/ui/app.css">
5
6
  <link rel="stylesheet" href="/ui/typography.css">
6
7
  <link rel="icon" type="image/svg" href="/ui/fav.svg">
7
8
  <style>
8
- [type='button'],button[type='submit']{cursor:pointer}
9
- [type='checkbox'].switch:checked:hover,
9
+ [type='button'],
10
+ button[type='submit'] {
11
+ cursor: pointer
12
+ }
13
+
14
+ [type='checkbox'].switch:checked:hover,
10
15
  [type='checkbox'].switch:checked:focus,
11
16
  [type='checkbox'].switch:checked,
12
17
  [type='checkbox'].switch:focus,
13
- [type='checkbox'].switch
14
- {
15
- border: none;
18
+ [type='checkbox'].switch {
19
+ border: none;
16
20
  background: none;
17
21
  outline: none;
18
22
  box-shadow: none;
@@ -31,70 +35,36 @@
31
35
  "marked": "/ui/lib/marked.min.mjs",
32
36
  "highlight.js": "/ui/lib/highlight.min.mjs",
33
37
  "chart.js": "/ui/lib/chart.js",
34
- "color.js": "/ui/lib/color.js"
38
+ "color.js": "/ui/lib/color.js",
39
+ "ctx.mjs": "/ui/ctx.mjs"
35
40
  }
36
41
  }
37
42
  </script>
43
+
38
44
  <body>
39
- <div id="app"></div>
45
+ <div id="app"></div>
40
46
  </body>
41
47
  <script>
42
- let colorScheme = location.search === "?dark"
48
+ let colorScheme = location.search === "?dark"
43
49
  ? "dark"
44
50
  : location.search === "?light"
45
51
  ? "light"
46
52
  : localStorage.getItem('color-scheme')
47
- let darkMode = colorScheme != null
48
- ? colorScheme === 'dark'
49
- : window.matchMedia('(prefers-color-scheme: dark)').matches
50
- let html = document.documentElement
51
- html.classList.toggle('dark', darkMode)
52
- html.style.setProperty('color-scheme', darkMode ? 'dark' : null)
53
- if (localStorage.getItem('color-scheme') === null) {
54
- localStorage.setItem('color-scheme', darkMode ? 'dark' : 'light')
55
- }
53
+ let darkMode = colorScheme != null
54
+ ? colorScheme === 'dark'
55
+ : window.matchMedia('(prefers-color-scheme: dark)').matches
56
+ let html = document.documentElement
57
+ html.classList.toggle('dark', darkMode)
58
+ html.style.setProperty('color-scheme', darkMode ? 'dark' : null)
59
+ if (localStorage.getItem('color-scheme') === null) {
60
+ localStorage.setItem('color-scheme', darkMode ? 'dark' : 'light')
61
+ }
56
62
  </script>
57
63
  <script type="module">
58
- import { createApp, defineAsyncComponent } from 'vue'
59
- import { createWebHistory, createRouter } from "vue-router"
60
- import ServiceStackVue from "@servicestack/vue"
61
- import App from '/ui/App.mjs'
62
- import ai from '/ui/ai.mjs'
63
- import SettingsDialog from '/ui/SettingsDialog.mjs'
64
-
65
- const { config, models } = await ai.init()
66
- const MainComponent = defineAsyncComponent(() => import(ai.base + '/ui/Main.mjs'))
67
- const RecentsComponent = defineAsyncComponent(() => import(ai.base + '/ui/Recents.mjs'))
68
- const AnalyticsComponent = defineAsyncComponent(() => import(ai.base + '/ui/Analytics.mjs'))
64
+ import { createContext } from '/ui/index.mjs'
69
65
 
70
- const Components = {
71
- SettingsDialog,
72
- }
73
-
74
- const routes = [
75
- { path: '/', component: MainComponent },
76
- { path: '/c/:id', component: MainComponent },
77
- { path: '/recents', component: RecentsComponent },
78
- { path: '/analytics', component: AnalyticsComponent },
79
- { path: '/:fallback(.*)*', component: MainComponent }
80
- ]
81
- routes.forEach(r => r.path = ai.base + r.path)
82
- const router = createRouter({
83
- history: createWebHistory(),
84
- routes,
85
- })
86
- const app = createApp(App, { config, models })
87
- app.use(router)
88
- app.use(ServiceStackVue)
89
- app.provide('ai', ai)
90
- app.provide('config', config)
91
- app.provide('models', models)
92
- Object.keys(Components).forEach(name => {
93
- app.component(name, Components[name])
94
- })
95
-
96
- window.ai = app.config.globalProperties.$ai = ai
97
-
98
- app.mount('#app')
66
+ const context = await createContext()
67
+ context.app.mount('#app')
99
68
  </script>
69
+
100
70
  </html>
llms/llms.json CHANGED
@@ -90,6 +90,23 @@
90
90
  }
91
91
  ]
92
92
  },
93
+ "out:image": {
94
+ "model": "black-forest-labs/flux.1-dev",
95
+ "messages": [
96
+ {
97
+ "role": "user",
98
+ "content": "Create a picture of a nano banana dish in a fancy restaurant with a Gemini theme"
99
+ }
100
+ ],
101
+ "modalities": [
102
+ "image",
103
+ "text"
104
+ ],
105
+ "image_config": {
106
+ "aspect_ratio": "9:16"
107
+ },
108
+ "stream": false
109
+ },
93
110
  "check": {
94
111
  "messages": [
95
112
  {
@@ -200,11 +217,6 @@
200
217
  "enabled": true,
201
218
  "temperature": 1.0
202
219
  },
203
- "openrouter_free": {
204
- "enabled": true,
205
- "id": "openrouter",
206
- "include_models": ":free$"
207
- },
208
220
  "ollama": {
209
221
  "enabled": true,
210
222
  "id": "ollama",
@@ -219,13 +231,6 @@
219
231
  },
220
232
  "google": {
221
233
  "enabled": true,
222
- "map_models": {
223
- "gemini-flash-latest": "gemini-flash-latest",
224
- "gemini-flash-lite-latest": "gemini-flash-lite-latest",
225
- "gemini-2.5-pro": "gemini-2.5-pro",
226
- "gemini-2.5-flash": "gemini-2.5-flash",
227
- "gemini-2.5-flash-lite": "gemini-2.5-flash-lite"
228
- },
229
234
  "safety_settings": [
230
235
  {
231
236
  "category": "HARM_CATEGORY_DANGEROUS_CONTENT",
@@ -310,7 +315,18 @@
310
315
  }
311
316
  },
312
317
  "chutes": {
313
- "enabled": true
318
+ "enabled": true,
319
+ "modalities": {
320
+ "image": {
321
+ "name": "Chutes Image",
322
+ "npm": "chutes/image",
323
+ "negative_prompt": "blur, distortion, low quality",
324
+ "cfg_scale": 7.5,
325
+ "width": 1024,
326
+ "height": 1024,
327
+ "steps": 50
328
+ }
329
+ }
314
330
  },
315
331
  "deepseek": {
316
332
  "enabled": true
@@ -319,7 +335,19 @@
319
335
  "enabled": false
320
336
  },
321
337
  "nvidia": {
322
- "enabled": true
338
+ "enabled": true,
339
+ "modalities": {
340
+ "image": {
341
+ "name": "NVIDIA Gen AI",
342
+ "npm": "nvidia/image",
343
+ "height": 1024,
344
+ "width": 1024,
345
+ "cfg_scale": 3.5,
346
+ "mode": "base",
347
+ "samples": 1,
348
+ "steps": 50
349
+ }
350
+ }
323
351
  },
324
352
  "huggingface": {
325
353
  "enabled": true
@@ -330,7 +358,12 @@
330
358
  "openrouter": {
331
359
  "enabled": true,
332
360
  "id": "openrouter",
333
- "exclude_models": ":free$"
361
+ "modalities": {
362
+ "image": {
363
+ "name": "OpenRouter Image",
364
+ "npm": "openrouter/image"
365
+ }
366
+ }
334
367
  }
335
368
  }
336
369
  }