llms-py 3.0.0b1__py3-none-any.whl → 3.0.0b2__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 (39) 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 +25 -56
  12. llms/llms.json +2 -2
  13. llms/main.py +452 -93
  14. llms/providers.json +1 -1
  15. llms/ui/App.mjs +25 -4
  16. llms/ui/Avatar.mjs +3 -2
  17. llms/ui/ChatPrompt.mjs +43 -52
  18. llms/ui/Main.mjs +87 -98
  19. llms/ui/OAuthSignIn.mjs +2 -33
  20. llms/ui/ProviderStatus.mjs +7 -8
  21. llms/ui/Recents.mjs +10 -9
  22. llms/ui/Sidebar.mjs +2 -1
  23. llms/ui/SignIn.mjs +7 -6
  24. llms/ui/ai.mjs +9 -41
  25. llms/ui/app.css +137 -138
  26. llms/ui/index.mjs +213 -0
  27. llms/ui/{ModelSelector.mjs → model-selector.mjs} +193 -200
  28. llms/ui/tailwind.input.css +441 -79
  29. llms/ui/threadStore.mjs +17 -6
  30. llms/ui/utils.mjs +1 -0
  31. {llms_py-3.0.0b1.dist-info → llms_py-3.0.0b2.dist-info}/METADATA +1 -1
  32. llms_py-3.0.0b2.dist-info/RECORD +58 -0
  33. llms/ui/SystemPromptEditor.mjs +0 -31
  34. llms/ui/SystemPromptSelector.mjs +0 -56
  35. llms_py-3.0.0b1.dist-info/RECORD +0 -49
  36. {llms_py-3.0.0b1.dist-info → llms_py-3.0.0b2.dist-info}/WHEEL +0 -0
  37. {llms_py-3.0.0b1.dist-info → llms_py-3.0.0b2.dist-info}/entry_points.txt +0 -0
  38. {llms_py-3.0.0b1.dist-info → llms_py-3.0.0b2.dist-info}/licenses/LICENSE +0 -0
  39. {llms_py-3.0.0b1.dist-info → llms_py-3.0.0b2.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;
@@ -35,66 +39,31 @@
35
39
  }
36
40
  }
37
41
  </script>
42
+
38
43
  <body>
39
- <div id="app"></div>
44
+ <div id="app"></div>
40
45
  </body>
41
46
  <script>
42
- let colorScheme = location.search === "?dark"
47
+ let colorScheme = location.search === "?dark"
43
48
  ? "dark"
44
49
  : location.search === "?light"
45
50
  ? "light"
46
51
  : 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
- }
52
+ let darkMode = colorScheme != null
53
+ ? colorScheme === 'dark'
54
+ : window.matchMedia('(prefers-color-scheme: dark)').matches
55
+ let html = document.documentElement
56
+ html.classList.toggle('dark', darkMode)
57
+ html.style.setProperty('color-scheme', darkMode ? 'dark' : null)
58
+ if (localStorage.getItem('color-scheme') === null) {
59
+ localStorage.setItem('color-scheme', darkMode ? 'dark' : 'light')
60
+ }
56
61
  </script>
57
62
  <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'))
63
+ import { createContext } from '/ui/index.mjs'
69
64
 
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')
65
+ const context = await createContext()
66
+ context.app.mount('#app')
99
67
  </script>
68
+
100
69
  </html>
llms/llms.json CHANGED
@@ -206,13 +206,13 @@
206
206
  "include_models": ":free$"
207
207
  },
208
208
  "ollama": {
209
- "enabled": true,
209
+ "enabled": false,
210
210
  "id": "ollama",
211
211
  "npm": "ollama",
212
212
  "api": "http://localhost:11434"
213
213
  },
214
214
  "lmstudio": {
215
- "enabled": true,
215
+ "enabled": false,
216
216
  "npm": "lmstudio",
217
217
  "api": "http://127.0.0.1:1234/v1",
218
218
  "models": {}