mindroot 9.22.0__py3-none-any.whl → 9.24.0__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.
Potentially problematic release.
This version of mindroot might be problematic. Click here for more details.
- mindroot/coreplugins/jwt_auth/middleware.py +1 -1
- mindroot/docs/.env +1 -0
- mindroot/docs/.gitignore +1 -0
- mindroot/docs/_build/doctrees/chat_with_assistant.doctree +0 -0
- mindroot/docs/_build/doctrees/developer_documentation.doctree +0 -0
- mindroot/docs/_build/doctrees/environment.pickle +0 -0
- mindroot/docs/_build/doctrees/getting_started.doctree +0 -0
- mindroot/docs/_build/doctrees/index.doctree +0 -0
- mindroot/docs/_build/doctrees/install_plugins_with_tools.doctree +0 -0
- mindroot/docs/_build/doctrees/installation.doctree +0 -0
- mindroot/docs/_build/doctrees/llm_api_key.doctree +0 -0
- mindroot/docs/_build/doctrees/llm_plugin_installation.doctree +0 -0
- mindroot/docs/_build/doctrees/programming_task.doctree +0 -0
- mindroot/docs/_build/doctrees/source/ahp.doctree +0 -0
- mindroot/docs/_build/doctrees/source/mindroot.coreplugins.admin.doctree +0 -0
- mindroot/docs/_build/doctrees/source/mindroot.coreplugins.api_keys.doctree +0 -0
- mindroot/docs/_build/doctrees/source/mindroot.coreplugins.chat.doctree +0 -0
- mindroot/docs/_build/doctrees/source/mindroot.coreplugins.chat_avatar.doctree +0 -0
- mindroot/docs/_build/doctrees/source/mindroot.coreplugins.check_list.doctree +0 -0
- mindroot/docs/_build/doctrees/source/mindroot.coreplugins.credits.doctree +0 -0
- mindroot/docs/_build/doctrees/source/mindroot.coreplugins.doctree +0 -0
- mindroot/docs/_build/doctrees/source/mindroot.coreplugins.email.doctree +0 -0
- mindroot/docs/_build/doctrees/source/mindroot.coreplugins.env_manager.doctree +0 -0
- mindroot/docs/_build/doctrees/source/mindroot.coreplugins.events.doctree +0 -0
- mindroot/docs/_build/doctrees/source/mindroot.coreplugins.index.doctree +0 -0
- mindroot/docs/_build/doctrees/source/mindroot.coreplugins.index.handlers.doctree +0 -0
- mindroot/docs/_build/doctrees/source/mindroot.coreplugins.jwt_auth.doctree +0 -0
- mindroot/docs/_build/doctrees/source/mindroot.coreplugins.l8n.doctree +0 -0
- mindroot/docs/_build/doctrees/source/mindroot.coreplugins.mcp_.doctree +0 -0
- mindroot/docs/_build/doctrees/source/mindroot.coreplugins.persona.doctree +0 -0
- mindroot/docs/_build/doctrees/source/mindroot.coreplugins.startup.doctree +0 -0
- mindroot/docs/_build/doctrees/source/mindroot.coreplugins.subscriptions.doctree +0 -0
- mindroot/docs/_build/doctrees/source/mindroot.coreplugins.usage.doctree +0 -0
- mindroot/docs/_build/doctrees/source/mindroot.coreplugins.user_service.doctree +0 -0
- mindroot/docs/_build/doctrees/source/mindroot.doctree +0 -0
- mindroot/docs/_build/doctrees/source/mindroot.lib.auth.doctree +0 -0
- mindroot/docs/_build/doctrees/source/mindroot.lib.doctree +0 -0
- mindroot/docs/_build/doctrees/source/mindroot.lib.json_str_block.doctree +0 -0
- mindroot/docs/_build/doctrees/source/mindroot.lib.plugins.doctree +0 -0
- mindroot/docs/_build/doctrees/source/mindroot.lib.providers.backup.doctree +0 -0
- mindroot/docs/_build/doctrees/source/mindroot.lib.providers.doctree +0 -0
- mindroot/docs/_build/doctrees/source/mindroot.registry.doctree +0 -0
- mindroot/docs/_build/doctrees/source/modules.doctree +0 -0
- mindroot/docs/_build/doctrees/source/mr_agent_expert_instr.doctree +0 -0
- mindroot/docs/_build/doctrees/starting_mindroot.doctree +0 -0
- mindroot/docs/_build/doctrees/user_documentation.doctree +0 -0
- mindroot/docs/_build/html/_modules/mindroot/coreplugins/admin/settings_router.html +287 -89
- mindroot/docs/_build/html/_modules/mindroot/coreplugins/jwt_auth/middleware.html +281 -89
- mindroot/docs/_build/html/_modules/mindroot/lib/providers/model_preferences_v2.html +293 -91
- mindroot/docs/_build/html/_modules/mindroot/lib/templates.html +342 -98
- mindroot/docs/_build/html/_modules/mindroot/server.html +291 -87
- mindroot/docs/_build/html/_sources/developer_documentation.rst.txt +21 -1
- mindroot/docs/_build/html/developer_documentation.html +44 -4
- mindroot/docs/_build/html/getting_started.html +18 -15
- mindroot/docs/_build/html/index.html +1 -0
- mindroot/docs/_build/html/searchindex.js +1 -1
- mindroot/docs/_build/html/source/mindroot.coreplugins.api_keys.html +15 -2
- mindroot/docs/_build/html/source/mindroot.coreplugins.chat_avatar.html +15 -2
- mindroot/docs/_build/html/source/mindroot.coreplugins.check_list.html +15 -2
- mindroot/docs/_build/html/source/mindroot.coreplugins.credits.html +15 -2
- mindroot/docs/_build/html/source/mindroot.coreplugins.env_manager.html +15 -2
- mindroot/docs/_build/html/source/mindroot.coreplugins.events.html +15 -2
- mindroot/docs/_build/html/source/mindroot.coreplugins.index.handlers.html +15 -2
- mindroot/docs/_build/html/source/mindroot.coreplugins.index.html +15 -2
- mindroot/docs/_build/html/source/mindroot.coreplugins.persona.html +15 -2
- mindroot/docs/_build/html/source/mindroot.coreplugins.startup.html +15 -2
- mindroot/docs/_build/html/source/mindroot.coreplugins.subscriptions.html +15 -2
- mindroot/docs/_build/html/source/mindroot.coreplugins.usage.html +15 -2
- mindroot/docs/_build/html/source/mindroot.coreplugins.user_service.html +15 -2
- mindroot/docs/_build/html/source/mindroot.lib.auth.html +15 -2
- mindroot/docs/_build/html/source/mindroot.lib.html +2 -1
- mindroot/docs/_build/html/source/mindroot.lib.json_str_block.html +15 -2
- mindroot/docs/_build/html/source/mindroot.lib.plugins.html +15 -2
- mindroot/docs/_build/html/source/mindroot.registry.html +15 -2
- mindroot/docs/_build/html/source/modules.html +15 -2
- mindroot/docs/developer_documentation.rst +21 -1
- {mindroot-9.22.0.dist-info → mindroot-9.24.0.dist-info}/METADATA +1 -1
- {mindroot-9.22.0.dist-info → mindroot-9.24.0.dist-info}/RECORD +82 -80
- {mindroot-9.22.0.dist-info → mindroot-9.24.0.dist-info}/WHEEL +0 -0
- {mindroot-9.22.0.dist-info → mindroot-9.24.0.dist-info}/entry_points.txt +0 -0
- {mindroot-9.22.0.dist-info → mindroot-9.24.0.dist-info}/licenses/LICENSE +0 -0
- {mindroot-9.22.0.dist-info → mindroot-9.24.0.dist-info}/top_level.txt +0 -0
|
@@ -1,72 +1,258 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html class="no-js" lang="en" data-content_root="../../../../">
|
|
3
|
+
<head><meta charset="utf-8"/>
|
|
4
|
+
<meta name="viewport" content="width=device-width,initial-scale=1"/>
|
|
5
|
+
<meta name="color-scheme" content="light dark"><link rel="index" title="Index" href="../../../../genindex.html" /><link rel="search" title="Search" href="../../../../search.html" />
|
|
1
6
|
|
|
7
|
+
<!-- Generated with Sphinx 8.2.3 and Furo 2025.07.19 -->
|
|
8
|
+
<title>mindroot.lib.providers.model_preferences_v2 - MindRoot 9.10.0 documentation</title>
|
|
9
|
+
<link rel="stylesheet" type="text/css" href="../../../../_static/pygments.css?v=d111a655" />
|
|
10
|
+
<link rel="stylesheet" type="text/css" href="../../../../_static/styles/furo.css?v=25af2a20" />
|
|
11
|
+
<link rel="stylesheet" type="text/css" href="../../../../_static/styles/furo-extensions.css?v=8dab3a3b" />
|
|
12
|
+
<link rel="stylesheet" type="text/css" href="../../../../_static/custom.css?v=f4b9d74b" />
|
|
13
|
+
|
|
14
|
+
|
|
2
15
|
|
|
3
|
-
<!DOCTYPE html>
|
|
4
|
-
<html class="writer-html5" lang="en" data-content_root="../../../../">
|
|
5
|
-
<head>
|
|
6
|
-
<meta charset="utf-8" />
|
|
7
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
8
|
-
<title>mindroot.lib.providers.model_preferences_v2 — MindRoot 9.10.0 documentation</title>
|
|
9
|
-
<link rel="stylesheet" type="text/css" href="../../../../_static/pygments.css?v=b86133f3" />
|
|
10
|
-
<link rel="stylesheet" type="text/css" href="../../../../_static/css/theme.css?v=e59714d7" />
|
|
11
16
|
|
|
17
|
+
<style>
|
|
18
|
+
body {
|
|
19
|
+
--color-code-background: #f2f2f2;
|
|
20
|
+
--color-code-foreground: #1e1e1e;
|
|
21
|
+
--color-brand-primary: #007acc;
|
|
22
|
+
--color-brand-content: #007acc;
|
|
23
|
+
|
|
24
|
+
}
|
|
25
|
+
@media not print {
|
|
26
|
+
body[data-theme="dark"] {
|
|
27
|
+
--color-code-background: #2b2b2b;
|
|
28
|
+
--color-code-foreground: #f8f8f2;
|
|
29
|
+
--color-brand-primary: #ff7b72;
|
|
30
|
+
--color-brand-content: #ff7b72;
|
|
12
31
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
32
|
+
}
|
|
33
|
+
@media (prefers-color-scheme: dark) {
|
|
34
|
+
body:not([data-theme="light"]) {
|
|
35
|
+
--color-code-background: #2b2b2b;
|
|
36
|
+
--color-code-foreground: #f8f8f2;
|
|
37
|
+
--color-brand-primary: #ff7b72;
|
|
38
|
+
--color-brand-content: #ff7b72;
|
|
39
|
+
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
</style></head>
|
|
44
|
+
<body>
|
|
45
|
+
|
|
46
|
+
<script>
|
|
47
|
+
document.body.dataset.theme = localStorage.getItem("theme") || "auto";
|
|
48
|
+
</script>
|
|
49
|
+
|
|
22
50
|
|
|
23
|
-
<
|
|
24
|
-
<
|
|
25
|
-
<
|
|
26
|
-
|
|
27
|
-
|
|
51
|
+
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
|
52
|
+
<symbol id="svg-toc" viewBox="0 0 24 24">
|
|
53
|
+
<title>Contents</title>
|
|
54
|
+
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024">
|
|
55
|
+
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/>
|
|
56
|
+
</svg>
|
|
57
|
+
</symbol>
|
|
58
|
+
<symbol id="svg-menu" viewBox="0 0 24 24">
|
|
59
|
+
<title>Menu</title>
|
|
60
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
|
61
|
+
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
|
|
62
|
+
<line x1="3" y1="12" x2="21" y2="12"></line>
|
|
63
|
+
<line x1="3" y1="6" x2="21" y2="6"></line>
|
|
64
|
+
<line x1="3" y1="18" x2="21" y2="18"></line>
|
|
65
|
+
</svg>
|
|
66
|
+
</symbol>
|
|
67
|
+
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
|
68
|
+
<title>Expand</title>
|
|
69
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
|
70
|
+
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
|
|
71
|
+
<polyline points="9 18 15 12 9 6"></polyline>
|
|
72
|
+
</svg>
|
|
73
|
+
</symbol>
|
|
74
|
+
<symbol id="svg-sun" viewBox="0 0 24 24">
|
|
75
|
+
<title>Light mode</title>
|
|
76
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
|
77
|
+
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
|
|
78
|
+
<circle cx="12" cy="12" r="5"></circle>
|
|
79
|
+
<line x1="12" y1="1" x2="12" y2="3"></line>
|
|
80
|
+
<line x1="12" y1="21" x2="12" y2="23"></line>
|
|
81
|
+
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
|
|
82
|
+
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
|
|
83
|
+
<line x1="1" y1="12" x2="3" y2="12"></line>
|
|
84
|
+
<line x1="21" y1="12" x2="23" y2="12"></line>
|
|
85
|
+
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
|
|
86
|
+
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
|
|
87
|
+
</svg>
|
|
88
|
+
</symbol>
|
|
89
|
+
<symbol id="svg-moon" viewBox="0 0 24 24">
|
|
90
|
+
<title>Dark mode</title>
|
|
91
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
|
92
|
+
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
|
|
93
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
|
94
|
+
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
|
|
95
|
+
</svg>
|
|
96
|
+
</symbol>
|
|
97
|
+
<symbol id="svg-sun-with-moon" viewBox="0 0 24 24">
|
|
98
|
+
<title>Auto light/dark, in light mode</title>
|
|
99
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
|
100
|
+
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
|
|
101
|
+
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
|
|
102
|
+
<path style="opacity: 50%" d="M 5.411 14.504 C 5.471 14.504 5.532 14.504 5.591 14.504 C 3.639 16.319 4.383 19.569 6.931 20.352 C 7.693 20.586 8.512 20.551 9.25 20.252 C 8.023 23.207 4.056 23.725 2.11 21.184 C 0.166 18.642 1.702 14.949 4.874 14.536 C 5.051 14.512 5.231 14.5 5.411 14.5 L 5.411 14.504 Z"/>
|
|
103
|
+
<line x1="14.5" y1="3.25" x2="14.5" y2="1.25"/>
|
|
104
|
+
<line x1="14.5" y1="15.85" x2="14.5" y2="17.85"/>
|
|
105
|
+
<line x1="10.044" y1="5.094" x2="8.63" y2="3.68"/>
|
|
106
|
+
<line x1="19" y1="14.05" x2="20.414" y2="15.464"/>
|
|
107
|
+
<line x1="8.2" y1="9.55" x2="6.2" y2="9.55"/>
|
|
108
|
+
<line x1="20.8" y1="9.55" x2="22.8" y2="9.55"/>
|
|
109
|
+
<line x1="10.044" y1="14.006" x2="8.63" y2="15.42"/>
|
|
110
|
+
<line x1="19" y1="5.05" x2="20.414" y2="3.636"/>
|
|
111
|
+
<circle cx="14.5" cy="9.55" r="3.6"/>
|
|
112
|
+
</svg>
|
|
113
|
+
</symbol>
|
|
114
|
+
<symbol id="svg-moon-with-sun" viewBox="0 0 24 24">
|
|
115
|
+
<title>Auto light/dark, in dark mode</title>
|
|
116
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
|
117
|
+
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
|
|
118
|
+
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
|
|
119
|
+
<path d="M 8.282 7.007 C 8.385 7.007 8.494 7.007 8.595 7.007 C 5.18 10.184 6.481 15.869 10.942 17.24 C 12.275 17.648 13.706 17.589 15 17.066 C 12.851 22.236 5.91 23.143 2.505 18.696 C -0.897 14.249 1.791 7.786 7.342 7.063 C 7.652 7.021 7.965 7 8.282 7 L 8.282 7.007 Z"/>
|
|
120
|
+
<line style="opacity: 50%" x1="18" y1="3.705" x2="18" y2="2.5"/>
|
|
121
|
+
<line style="opacity: 50%" x1="18" y1="11.295" x2="18" y2="12.5"/>
|
|
122
|
+
<line style="opacity: 50%" x1="15.316" y1="4.816" x2="14.464" y2="3.964"/>
|
|
123
|
+
<line style="opacity: 50%" x1="20.711" y1="10.212" x2="21.563" y2="11.063"/>
|
|
124
|
+
<line style="opacity: 50%" x1="14.205" y1="7.5" x2="13.001" y2="7.5"/>
|
|
125
|
+
<line style="opacity: 50%" x1="21.795" y1="7.5" x2="23" y2="7.5"/>
|
|
126
|
+
<line style="opacity: 50%" x1="15.316" y1="10.184" x2="14.464" y2="11.036"/>
|
|
127
|
+
<line style="opacity: 50%" x1="20.711" y1="4.789" x2="21.563" y2="3.937"/>
|
|
128
|
+
<circle style="opacity: 50%" cx="18" cy="7.5" r="2.169"/>
|
|
129
|
+
</svg>
|
|
130
|
+
</symbol>
|
|
131
|
+
<symbol id="svg-pencil" viewBox="0 0 24 24">
|
|
132
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
|
133
|
+
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-pencil-code">
|
|
134
|
+
<path d="M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4" />
|
|
135
|
+
<path d="M13.5 6.5l4 4" />
|
|
136
|
+
<path d="M20 21l2 -2l-2 -2" />
|
|
137
|
+
<path d="M17 17l-2 2l2 2" />
|
|
138
|
+
</svg>
|
|
139
|
+
</symbol>
|
|
140
|
+
<symbol id="svg-eye" viewBox="0 0 24 24">
|
|
141
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
|
142
|
+
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-eye-code">
|
|
143
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
|
144
|
+
<path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" />
|
|
145
|
+
<path
|
|
146
|
+
d="M11.11 17.958c-3.209 -.307 -5.91 -2.293 -8.11 -5.958c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6c-.21 .352 -.427 .688 -.647 1.008" />
|
|
147
|
+
<path d="M20 21l2 -2l-2 -2" />
|
|
148
|
+
<path d="M17 17l-2 2l2 2" />
|
|
149
|
+
</svg>
|
|
150
|
+
</symbol>
|
|
151
|
+
</svg>
|
|
28
152
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
<
|
|
35
|
-
<
|
|
36
|
-
|
|
37
|
-
<input type="hidden" name="check_keywords" value="yes" />
|
|
38
|
-
<input type="hidden" name="area" value="default" />
|
|
39
|
-
</form>
|
|
40
|
-
</div>
|
|
41
|
-
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
|
42
|
-
<!-- Local TOC -->
|
|
43
|
-
<div class="local-toc"></div>
|
|
44
|
-
</div>
|
|
45
|
-
</div>
|
|
46
|
-
</nav>
|
|
153
|
+
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation">
|
|
154
|
+
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc">
|
|
155
|
+
<label class="overlay sidebar-overlay" for="__navigation">
|
|
156
|
+
<div class="visually-hidden">Hide navigation sidebar</div>
|
|
157
|
+
</label>
|
|
158
|
+
<label class="overlay toc-overlay" for="__toc">
|
|
159
|
+
<div class="visually-hidden">Hide table of contents sidebar</div>
|
|
160
|
+
</label>
|
|
47
161
|
|
|
48
|
-
|
|
49
|
-
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
|
50
|
-
<a href="../../../../index.html">MindRoot</a>
|
|
51
|
-
</nav>
|
|
162
|
+
<a class="skip-to-content muted-link" href="#furo-main-content">Skip to content</a>
|
|
52
163
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
<
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
<div class="page">
|
|
167
|
+
<header class="mobile-header">
|
|
168
|
+
<div class="header-left">
|
|
169
|
+
<label class="nav-overlay-icon" for="__navigation">
|
|
170
|
+
<div class="visually-hidden">Toggle site navigation sidebar</div>
|
|
171
|
+
<i class="icon"><svg><use href="#svg-menu"></use></svg></i>
|
|
172
|
+
</label>
|
|
173
|
+
</div>
|
|
174
|
+
<div class="header-center">
|
|
175
|
+
<a href="../../../../index.html"><div class="brand">MindRoot 9.10.0 documentation</div></a>
|
|
176
|
+
</div>
|
|
177
|
+
<div class="header-right">
|
|
178
|
+
<div class="theme-toggle-container theme-toggle-header">
|
|
179
|
+
<button class="theme-toggle">
|
|
180
|
+
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
|
|
181
|
+
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
|
|
182
|
+
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
|
|
183
|
+
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
|
184
|
+
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
|
185
|
+
</button>
|
|
186
|
+
</div>
|
|
187
|
+
<label class="toc-overlay-icon toc-header-icon no-toc" for="__toc">
|
|
188
|
+
<div class="visually-hidden">Toggle table of contents sidebar</div>
|
|
189
|
+
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
|
|
190
|
+
</label>
|
|
191
|
+
</div>
|
|
192
|
+
</header>
|
|
193
|
+
<aside class="sidebar-drawer">
|
|
194
|
+
<div class="sidebar-container">
|
|
195
|
+
|
|
196
|
+
<div class="sidebar-sticky"><a class="sidebar-brand" href="../../../../index.html">
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
</a><form class="sidebar-search-container" method="get" action="../../../../search.html" role="search">
|
|
200
|
+
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
|
|
201
|
+
<input type="hidden" name="check_keywords" value="yes">
|
|
202
|
+
<input type="hidden" name="area" value="default">
|
|
203
|
+
</form>
|
|
204
|
+
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
|
|
205
|
+
<p class="caption" role="heading"><span class="caption-text">User Documentation:</span></p>
|
|
206
|
+
<ul>
|
|
207
|
+
<li class="toctree-l1 has-children"><a class="reference internal" href="../../../../user_documentation.html">User Documentation</a><input class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" role="switch" type="checkbox"/><label for="toctree-checkbox-1"><div class="visually-hidden">Toggle navigation of User Documentation</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
|
|
208
|
+
<li class="toctree-l2"><a class="reference internal" href="../../../../installation.html">Installation</a></li>
|
|
209
|
+
<li class="toctree-l2"><a class="reference internal" href="../../../../starting_mindroot.html">Starting MindRoot</a></li>
|
|
210
|
+
<li class="toctree-l2"><a class="reference internal" href="../../../../llm_plugin_installation.html">LLM Plugin Installation</a></li>
|
|
211
|
+
<li class="toctree-l2"><a class="reference internal" href="../../../../llm_api_key.html">LLM API Key</a></li>
|
|
212
|
+
<li class="toctree-l2"><a class="reference internal" href="../../../../chat_with_assistant.html">Chat with Assistant</a></li>
|
|
213
|
+
<li class="toctree-l2"><a class="reference internal" href="../../../../install_plugins_with_tools.html">Install Plugins with Tools</a></li>
|
|
214
|
+
<li class="toctree-l2"><a class="reference internal" href="../../../../programming_task.html">Give Assistant a Programming Task</a></li>
|
|
215
|
+
</ul>
|
|
216
|
+
</li>
|
|
217
|
+
</ul>
|
|
218
|
+
<p class="caption" role="heading"><span class="caption-text">Developer Documentation:</span></p>
|
|
219
|
+
<ul>
|
|
220
|
+
<li class="toctree-l1"><a class="reference internal" href="../../../../developer_documentation.html">Developer Documentation</a></li>
|
|
221
|
+
</ul>
|
|
222
|
+
|
|
223
|
+
</div>
|
|
65
224
|
</div>
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
225
|
+
|
|
226
|
+
</div>
|
|
227
|
+
|
|
228
|
+
</div>
|
|
229
|
+
</aside>
|
|
230
|
+
<div class="main">
|
|
231
|
+
<div class="content">
|
|
232
|
+
<div class="article-container">
|
|
233
|
+
<a href="#" class="back-to-top muted-link">
|
|
234
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
235
|
+
<path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
|
|
236
|
+
</svg>
|
|
237
|
+
<span>Back to top</span>
|
|
238
|
+
</a>
|
|
239
|
+
<div class="content-icon-container">
|
|
240
|
+
<div class="theme-toggle-container theme-toggle-content">
|
|
241
|
+
<button class="theme-toggle">
|
|
242
|
+
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
|
|
243
|
+
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
|
|
244
|
+
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
|
|
245
|
+
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
|
246
|
+
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
|
247
|
+
</button>
|
|
248
|
+
</div>
|
|
249
|
+
<label class="toc-overlay-icon toc-content-icon no-toc" for="__toc">
|
|
250
|
+
<div class="visually-hidden">Toggle table of contents sidebar</div>
|
|
251
|
+
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
|
|
252
|
+
</label>
|
|
253
|
+
</div>
|
|
254
|
+
<article role="main" id="furo-main-content">
|
|
255
|
+
<h1>Source code for mindroot.lib.providers.model_preferences_v2</h1><div class="highlight"><pre>
|
|
70
256
|
<span></span><span class="kn">import</span><span class="w"> </span><span class="nn">json</span>
|
|
71
257
|
<span class="kn">import</span><span class="w"> </span><span class="nn">os</span>
|
|
72
258
|
<span class="kn">import</span><span class="w"> </span><span class="nn">shutil</span>
|
|
@@ -80,12 +266,13 @@
|
|
|
80
266
|
|
|
81
267
|
<span class="k">def</span><span class="w"> </span><span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
|
82
268
|
<span class="c1"># Use current working directory for data (supports multiple installations)</span>
|
|
269
|
+
<span class="nb">print</span><span class="p">(</span><span class="s2">"Hello from Model preferences V2!"</span><span class="p">)</span>
|
|
83
270
|
<span class="bp">self</span><span class="o">.</span><span class="n">data_dir</span> <span class="o">=</span> <span class="n">Path</span><span class="o">.</span><span class="n">cwd</span><span class="p">()</span> <span class="o">/</span> <span class="s1">'data'</span>
|
|
84
271
|
<span class="bp">self</span><span class="o">.</span><span class="n">preferences_file</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">data_dir</span> <span class="o">/</span> <span class="s1">'preferred_models_v2.json'</span>
|
|
85
272
|
|
|
86
273
|
<span class="c1"># Locate template file relative to this script's location</span>
|
|
87
|
-
<span class="n">script_dir</span> <span class="o">=</span> <span class="n">Path</span><span class="p">(</span><span class="vm">__file__</span><span class="p">)</span
|
|
88
|
-
<span class="bp">self</span><span class="o">.</span><span class="n">template_file</span> <span class="o">=</span> <span class="n">script_dir</span> <span class="o">/</span> <span class="s1">'default_preferred_models.json'</span>
|
|
274
|
+
<span class="n">script_dir</span> <span class="o">=</span> <span class="n">Path</span><span class="p">(</span><span class="vm">__file__</span><span class="p">)</span>
|
|
275
|
+
<span class="bp">self</span><span class="o">.</span><span class="n">template_file</span> <span class="o">=</span> <span class="n">script_dir</span><span class="o">.</span><span class="n">parent</span> <span class="o">/</span> <span class="s1">'default_preferred_models.json'</span>
|
|
89
276
|
|
|
90
277
|
<div class="viewcode-block" id="ModelPreferencesV2.ensure_preferences_exist">
|
|
91
278
|
<a class="viewcode-back" href="../../../../source/mindroot.lib.providers.html#mindroot.lib.providers.model_preferences_v2.ModelPreferencesV2.ensure_preferences_exist">[docs]</a>
|
|
@@ -93,29 +280,36 @@
|
|
|
93
280
|
<span class="w"> </span><span class="sd">"""Copy template preferences file to data directory if it doesn't exist."""</span>
|
|
94
281
|
<span class="c1"># Ensure data directory exists</span>
|
|
95
282
|
<span class="bp">self</span><span class="o">.</span><span class="n">data_dir</span><span class="o">.</span><span class="n">mkdir</span><span class="p">(</span><span class="n">exist_ok</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
|
|
96
|
-
|
|
283
|
+
<span class="nb">print</span><span class="p">(</span><span class="s2">"Ensuring preferences v2 file exists..."</span><span class="p">)</span>
|
|
97
284
|
<span class="c1"># If preferences file doesn't exist, copy from template</span>
|
|
98
285
|
<span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">preferences_file</span><span class="o">.</span><span class="n">exists</span><span class="p">():</span>
|
|
286
|
+
<span class="nb">print</span><span class="p">(</span><span class="s2">"Preferences v2 file not found. Creating from template."</span><span class="p">)</span>
|
|
99
287
|
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">template_file</span><span class="o">.</span><span class="n">exists</span><span class="p">():</span>
|
|
288
|
+
<span class="nb">print</span><span class="p">(</span><span class="s2">"Copying template preferences v2 file to location data/preferred_models_v2.json"</span><span class="p">)</span>
|
|
100
289
|
<span class="n">shutil</span><span class="o">.</span><span class="n">copy2</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">template_file</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">preferences_file</span><span class="p">)</span>
|
|
101
290
|
<span class="k">else</span><span class="p">:</span>
|
|
102
291
|
<span class="c1"># Create minimal default if template doesn't exist</span>
|
|
103
292
|
<span class="n">default_prefs</span> <span class="o">=</span> <span class="p">{</span>
|
|
104
293
|
<span class="s2">"stream_chat"</span><span class="p">:</span> <span class="p">[</span>
|
|
105
|
-
<span class="p">[</span><span class="s2">"
|
|
106
|
-
<span class="p">[</span><span class="s2">"
|
|
294
|
+
<span class="p">[</span><span class="s2">"ah_openrouter"</span><span class="p">,</span> <span class="s2">"deepseek/deepseek-chat-v3.1"</span><span class="p">],</span>
|
|
295
|
+
<span class="p">[</span><span class="s2">"ah_anthropic"</span><span class="p">,</span> <span class="s2">"claude-sonnet-4-0"</span><span class="p">],</span>
|
|
296
|
+
<span class="p">[</span><span class="s2">"mr_gemini"</span><span class="p">,</span> <span class="s2">"models/gemini-2.5-pro"</span><span class="p">],</span>
|
|
297
|
+
<span class="p">[</span><span class="s2">"ah_openai"</span><span class="p">,</span> <span class="s2">"gpt-5"</span><span class="p">]</span>
|
|
107
298
|
<span class="p">],</span>
|
|
108
299
|
<span class="s2">"text_to_image"</span><span class="p">:</span> <span class="p">[</span>
|
|
109
300
|
<span class="p">[</span><span class="s2">"ah_flux"</span><span class="p">,</span> <span class="s2">"flux-dev"</span><span class="p">]</span>
|
|
110
301
|
<span class="p">]</span>
|
|
111
302
|
<span class="p">}</span>
|
|
112
|
-
<span class="
|
|
303
|
+
<span class="nb">print</span><span class="p">(</span><span class="s2">"Template preferences v2 file not found. Creating minimal default preferences."</span><span class="p">)</span>
|
|
304
|
+
<span class="bp">self</span><span class="o">.</span><span class="n">save_preferences</span><span class="p">(</span><span class="n">default_prefs</span><span class="p">)</span>
|
|
305
|
+
<span class="nb">print</span><span class="p">(</span><span class="s2">"File saved to data/preferred_models_v2.json"</span><span class="p">)</span></div>
|
|
113
306
|
|
|
114
307
|
|
|
115
308
|
<div class="viewcode-block" id="ModelPreferencesV2.get_preferences">
|
|
116
309
|
<a class="viewcode-back" href="../../../../source/mindroot.lib.providers.html#mindroot.lib.providers.model_preferences_v2.ModelPreferencesV2.get_preferences">[docs]</a>
|
|
117
310
|
<span class="k">def</span><span class="w"> </span><span class="nf">get_preferences</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">List</span><span class="p">[</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">]]]:</span>
|
|
118
311
|
<span class="w"> </span><span class="sd">"""Get preferences in new format: {service: [[provider, model], ...]}"""</span>
|
|
312
|
+
<span class="nb">print</span><span class="p">(</span><span class="s2">"Getting preferences v2..."</span><span class="p">)</span>
|
|
119
313
|
<span class="bp">self</span><span class="o">.</span><span class="n">ensure_preferences_exist</span><span class="p">()</span>
|
|
120
314
|
|
|
121
315
|
<span class="k">try</span><span class="p">:</span>
|
|
@@ -260,32 +454,40 @@
|
|
|
260
454
|
</div>
|
|
261
455
|
|
|
262
456
|
</pre></div>
|
|
263
|
-
|
|
264
|
-
|
|
457
|
+
</article>
|
|
458
|
+
</div>
|
|
459
|
+
<footer>
|
|
460
|
+
|
|
461
|
+
<div class="related-pages">
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
</div>
|
|
465
|
+
<div class="bottom-of-page">
|
|
466
|
+
<div class="left-details">
|
|
467
|
+
<div class="copyright">
|
|
468
|
+
Copyright © 2025, Jason Livesay
|
|
469
|
+
</div>
|
|
470
|
+
Made with <a href="https://www.sphinx-doc.org/">Sphinx</a> and <a class="muted-link" href="https://pradyunsg.me">@pradyunsg</a>'s
|
|
471
|
+
|
|
472
|
+
<a href="https://github.com/pradyunsg/furo">Furo</a>
|
|
473
|
+
|
|
474
|
+
</div>
|
|
475
|
+
<div class="right-details">
|
|
476
|
+
|
|
265
477
|
</div>
|
|
266
|
-
<footer>
|
|
267
|
-
|
|
268
|
-
<hr/>
|
|
269
|
-
|
|
270
|
-
<div role="contentinfo">
|
|
271
|
-
<p>© Copyright 2025, Jason Livesay.</p>
|
|
272
|
-
</div>
|
|
273
|
-
|
|
274
|
-
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
|
|
275
|
-
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
|
|
276
|
-
provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
</footer>
|
|
280
478
|
</div>
|
|
281
|
-
|
|
282
|
-
|
|
479
|
+
|
|
480
|
+
</footer>
|
|
481
|
+
</div>
|
|
482
|
+
<aside class="toc-drawer no-toc">
|
|
483
|
+
|
|
484
|
+
|
|
485
|
+
|
|
486
|
+
</aside>
|
|
283
487
|
</div>
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
</body>
|
|
488
|
+
</div><script src="../../../../_static/documentation_options.js?v=3c16008f"></script>
|
|
489
|
+
<script src="../../../../_static/doctools.js?v=9bcbadda"></script>
|
|
490
|
+
<script src="../../../../_static/sphinx_highlight.js?v=dc90522c"></script>
|
|
491
|
+
<script src="../../../../_static/scripts/furo.js?v=46bd48cc"></script>
|
|
492
|
+
</body>
|
|
291
493
|
</html>
|