pygpt-net 2.4.37__py3-none-any.whl → 2.4.42__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.
- CHANGELOG.md +37 -0
- README.md +176 -182
- pygpt_net/CHANGELOG.txt +37 -0
- pygpt_net/__init__.py +3 -3
- pygpt_net/app.py +3 -1
- pygpt_net/controller/__init__.py +7 -3
- pygpt_net/controller/access/control.py +1 -1
- pygpt_net/controller/access/voice.py +11 -5
- pygpt_net/controller/agent/experts.py +11 -6
- pygpt_net/controller/agent/legacy.py +8 -6
- pygpt_net/controller/agent/llama.py +4 -2
- pygpt_net/controller/assistant/__init__.py +9 -4
- pygpt_net/controller/assistant/batch.py +38 -21
- pygpt_net/controller/assistant/editor.py +7 -6
- pygpt_net/controller/assistant/files.py +23 -7
- pygpt_net/controller/assistant/store.py +20 -7
- pygpt_net/controller/assistant/threads.py +34 -8
- pygpt_net/controller/attachment.py +29 -10
- pygpt_net/controller/audio/__init__.py +26 -5
- pygpt_net/controller/calendar/__init__.py +23 -4
- pygpt_net/controller/calendar/note.py +57 -11
- pygpt_net/controller/camera.py +4 -12
- pygpt_net/controller/chat/__init__.py +5 -3
- pygpt_net/controller/chat/attachment.py +34 -7
- pygpt_net/controller/chat/audio.py +2 -2
- pygpt_net/controller/chat/command.py +4 -2
- pygpt_net/controller/chat/common.py +11 -4
- pygpt_net/controller/chat/files.py +10 -3
- pygpt_net/controller/chat/image.py +17 -5
- pygpt_net/controller/chat/input.py +10 -7
- pygpt_net/controller/chat/output.py +21 -6
- pygpt_net/controller/chat/render.py +100 -21
- pygpt_net/controller/chat/response.py +34 -7
- pygpt_net/controller/chat/stream.py +4 -2
- pygpt_net/controller/chat/text.py +6 -4
- pygpt_net/controller/command.py +11 -3
- pygpt_net/controller/config/__init__.py +34 -6
- pygpt_net/controller/config/field/checkbox.py +7 -4
- pygpt_net/controller/config/field/cmd.py +7 -5
- pygpt_net/controller/config/field/combo.py +14 -6
- pygpt_net/controller/config/field/dictionary.py +14 -11
- pygpt_net/controller/config/field/input.py +9 -6
- pygpt_net/controller/config/field/slider.py +11 -8
- pygpt_net/controller/config/field/textarea.py +8 -5
- pygpt_net/controller/config/placeholder.py +66 -21
- pygpt_net/controller/ctx/__init__.py +138 -49
- pygpt_net/controller/ctx/common.py +15 -4
- pygpt_net/controller/ctx/extra.py +11 -3
- pygpt_net/controller/ctx/summarizer.py +24 -5
- pygpt_net/controller/debug/__init__.py +27 -6
- pygpt_net/controller/dialogs/confirm.py +34 -7
- pygpt_net/controller/dialogs/debug.py +4 -2
- pygpt_net/controller/dialogs/info.py +7 -2
- pygpt_net/controller/files.py +48 -10
- pygpt_net/controller/finder.py +11 -5
- pygpt_net/controller/idx/__init__.py +10 -3
- pygpt_net/controller/idx/common.py +4 -2
- pygpt_net/controller/idx/indexer.py +25 -17
- pygpt_net/controller/idx/settings.py +9 -3
- pygpt_net/controller/kernel/__init__.py +34 -8
- pygpt_net/controller/kernel/reply.py +12 -3
- pygpt_net/controller/kernel/stack.py +5 -3
- pygpt_net/controller/lang/custom.py +2 -7
- pygpt_net/controller/lang/mapping.py +5 -3
- pygpt_net/controller/layout.py +2 -2
- pygpt_net/controller/mode.py +16 -4
- pygpt_net/controller/model/__init__.py +14 -3
- pygpt_net/controller/model/editor.py +8 -3
- pygpt_net/controller/notepad.py +26 -12
- pygpt_net/controller/painter/capture.py +23 -4
- pygpt_net/controller/painter/common.py +9 -7
- pygpt_net/controller/plugins/__init__.py +19 -5
- pygpt_net/controller/plugins/presets.py +15 -6
- pygpt_net/controller/plugins/settings.py +9 -3
- pygpt_net/controller/presets/__init__.py +55 -16
- pygpt_net/controller/presets/editor.py +26 -10
- pygpt_net/controller/settings/__init__.py +3 -2
- pygpt_net/controller/settings/editor.py +29 -7
- pygpt_net/controller/settings/profile.py +22 -5
- pygpt_net/controller/theme/__init__.py +54 -12
- pygpt_net/controller/theme/common.py +24 -2
- pygpt_net/controller/theme/markdown.py +32 -16
- pygpt_net/controller/theme/menu.py +26 -5
- pygpt_net/controller/theme/nodes.py +2 -5
- pygpt_net/controller/tools/__init__.py +40 -2
- pygpt_net/controller/ui/__init__.py +4 -6
- pygpt_net/controller/ui/mode.py +16 -21
- pygpt_net/controller/ui/tabs.py +363 -65
- pygpt_net/core/access/actions.py +6 -4
- pygpt_net/core/access/shortcuts.py +4 -3
- pygpt_net/core/access/voice.py +6 -5
- pygpt_net/core/agents/legacy.py +4 -2
- pygpt_net/core/agents/memory.py +7 -2
- pygpt_net/core/agents/observer/evaluation.py +15 -7
- pygpt_net/core/agents/provider.py +9 -4
- pygpt_net/core/agents/runner.py +61 -15
- pygpt_net/core/agents/tools.py +23 -5
- pygpt_net/core/assistants/__init__.py +6 -4
- pygpt_net/core/assistants/files.py +35 -12
- pygpt_net/core/assistants/store.py +20 -10
- pygpt_net/core/attachments/__init__.py +54 -15
- pygpt_net/core/attachments/context.py +92 -29
- pygpt_net/core/audio/__init__.py +74 -3
- pygpt_net/core/audio/context.py +7 -2
- pygpt_net/core/audio/whisper.py +37 -0
- pygpt_net/core/bridge/__init__.py +22 -6
- pygpt_net/core/bridge/context.py +5 -3
- pygpt_net/core/bridge/worker.py +2 -2
- pygpt_net/core/calendar/__init__.py +57 -11
- pygpt_net/core/chain/__init__.py +8 -2
- pygpt_net/core/chain/chat.py +10 -8
- pygpt_net/core/chain/completion.py +10 -7
- pygpt_net/core/command.py +62 -17
- pygpt_net/core/ctx/__init__.py +260 -58
- pygpt_net/core/ctx/bag.py +25 -4
- pygpt_net/core/ctx/container.py +28 -17
- pygpt_net/core/ctx/idx.py +45 -8
- pygpt_net/core/ctx/output.py +95 -74
- pygpt_net/core/ctx/reply.py +5 -2
- pygpt_net/core/db/__init__.py +8 -7
- pygpt_net/core/db/viewer.py +17 -11
- pygpt_net/core/debug/__init__.py +10 -9
- pygpt_net/core/debug/events.py +22 -10
- pygpt_net/core/debug/tabs.py +9 -3
- pygpt_net/core/docker/__init__.py +11 -5
- pygpt_net/core/docker/builder.py +11 -3
- pygpt_net/core/events/app.py +5 -3
- pygpt_net/core/events/base.py +11 -5
- pygpt_net/core/events/control.py +5 -3
- pygpt_net/core/events/event.py +17 -7
- pygpt_net/core/events/kernel.py +5 -3
- pygpt_net/core/events/render.py +5 -3
- pygpt_net/core/experts/__init__.py +5 -4
- pygpt_net/core/filesystem/__init__.py +52 -34
- pygpt_net/core/filesystem/actions.py +8 -5
- pygpt_net/core/filesystem/editor.py +13 -3
- pygpt_net/core/filesystem/types.py +12 -7
- pygpt_net/core/filesystem/url.py +7 -3
- pygpt_net/core/history.py +3 -2
- pygpt_net/core/idx/__init__.py +48 -27
- pygpt_net/core/idx/chat.py +51 -17
- pygpt_net/core/idx/context.py +6 -2
- pygpt_net/core/idx/indexing.py +107 -42
- pygpt_net/core/idx/llm.py +11 -3
- pygpt_net/core/idx/metadata.py +13 -3
- pygpt_net/core/idx/types/ctx.py +32 -6
- pygpt_net/core/idx/types/external.py +41 -7
- pygpt_net/core/idx/types/files.py +31 -6
- pygpt_net/core/image.py +15 -4
- pygpt_net/core/installer.py +2 -4
- pygpt_net/core/llm/__init__.py +13 -3
- pygpt_net/core/locale.py +34 -8
- pygpt_net/core/models.py +63 -17
- pygpt_net/core/modes.py +11 -13
- pygpt_net/core/notepad.py +10 -5
- pygpt_net/core/plugins.py +31 -19
- pygpt_net/core/presets.py +37 -17
- pygpt_net/core/profile.py +21 -7
- pygpt_net/core/prompt/__init__.py +10 -3
- pygpt_net/core/prompt/custom.py +7 -6
- pygpt_net/core/prompt/template.py +9 -3
- pygpt_net/core/render/base.py +117 -22
- pygpt_net/core/render/markdown/body.py +27 -7
- pygpt_net/core/render/markdown/renderer.py +119 -22
- pygpt_net/core/render/plain/body.py +22 -5
- pygpt_net/core/render/plain/renderer.py +97 -21
- pygpt_net/core/render/web/body.py +75 -25
- pygpt_net/core/render/web/parser.py +3 -1
- pygpt_net/core/render/web/renderer.py +313 -63
- pygpt_net/core/settings.py +10 -5
- pygpt_net/core/tabs/__init__.py +290 -103
- pygpt_net/core/tabs/tab.py +26 -5
- pygpt_net/core/tokens.py +47 -12
- pygpt_net/core/updater/__init__.py +20 -7
- pygpt_net/core/vision/analyzer.py +29 -6
- pygpt_net/core/{web.py → web/__init__.py} +29 -7
- pygpt_net/core/web/helpers.py +237 -0
- pygpt_net/data/config/config.json +15 -4
- pygpt_net/data/config/models.json +3 -3
- pygpt_net/data/config/modes.json +3 -3
- pygpt_net/data/config/settings.json +55 -10
- pygpt_net/data/config/settings_section.json +3 -0
- pygpt_net/data/css/style.light.css +1 -0
- pygpt_net/data/css/{web.css → web-blocks.css} +162 -133
- pygpt_net/data/css/{web.light.css → web-blocks.light.css} +7 -0
- pygpt_net/data/css/web-chatgpt.css +350 -0
- pygpt_net/data/css/web-chatgpt.dark.css +64 -0
- pygpt_net/data/css/web-chatgpt.light.css +75 -0
- pygpt_net/data/css/web-chatgpt_wide.css +350 -0
- pygpt_net/data/css/web-chatgpt_wide.dark.css +64 -0
- pygpt_net/data/css/web-chatgpt_wide.light.css +75 -0
- pygpt_net/data/icons/split_screen.svg +1 -0
- pygpt_net/data/locale/locale.de.ini +12 -0
- pygpt_net/data/locale/locale.en.ini +18 -2
- pygpt_net/data/locale/locale.es.ini +12 -0
- pygpt_net/data/locale/locale.fr.ini +12 -0
- pygpt_net/data/locale/locale.it.ini +12 -0
- pygpt_net/data/locale/locale.pl.ini +12 -0
- pygpt_net/data/locale/locale.uk.ini +12 -0
- pygpt_net/data/locale/locale.zh.ini +12 -0
- pygpt_net/data/locale/plugin.cmd_web.de.ini +2 -0
- pygpt_net/data/locale/plugin.cmd_web.en.ini +22 -10
- pygpt_net/data/locale/plugin.cmd_web.es.ini +2 -0
- pygpt_net/data/locale/plugin.cmd_web.fr.ini +2 -0
- pygpt_net/data/locale/plugin.cmd_web.it.ini +2 -0
- pygpt_net/data/locale/plugin.cmd_web.pl.ini +2 -0
- pygpt_net/data/locale/plugin.cmd_web.uk.ini +2 -0
- pygpt_net/data/locale/plugin.cmd_web.zh.ini +2 -0
- pygpt_net/data/locale/plugin.mailer.en.ini +21 -0
- pygpt_net/icons.qrc +1 -0
- pygpt_net/icons_rc.py +165 -136
- pygpt_net/item/ctx.py +58 -25
- pygpt_net/plugin/agent/__init__.py +7 -2
- pygpt_net/plugin/audio_input/simple.py +21 -5
- pygpt_net/plugin/audio_output/__init__.py +9 -1
- pygpt_net/plugin/base/config.py +4 -2
- pygpt_net/plugin/base/plugin.py +75 -23
- pygpt_net/plugin/base/worker.py +42 -11
- pygpt_net/plugin/cmd_code_interpreter/__init__.py +39 -37
- pygpt_net/plugin/cmd_code_interpreter/runner.py +25 -12
- pygpt_net/plugin/cmd_history/config.py +2 -2
- pygpt_net/plugin/cmd_web/__init__.py +48 -9
- pygpt_net/plugin/cmd_web/config.py +135 -41
- pygpt_net/plugin/cmd_web/websearch.py +74 -33
- pygpt_net/plugin/cmd_web/worker.py +142 -13
- pygpt_net/plugin/idx_llama_index/config.py +3 -3
- pygpt_net/plugin/mailer/__init__.py +123 -0
- pygpt_net/plugin/mailer/config.py +149 -0
- pygpt_net/plugin/mailer/runner.py +285 -0
- pygpt_net/plugin/mailer/worker.py +123 -0
- pygpt_net/provider/agents/base.py +5 -2
- pygpt_net/provider/agents/openai.py +4 -2
- pygpt_net/provider/agents/openai_assistant.py +4 -2
- pygpt_net/provider/agents/planner.py +4 -2
- pygpt_net/provider/agents/react.py +4 -2
- pygpt_net/provider/audio_output/openai_tts.py +5 -11
- pygpt_net/provider/core/assistant/base.py +5 -3
- pygpt_net/provider/core/assistant/json_file.py +8 -5
- pygpt_net/provider/core/assistant_file/base.py +4 -3
- pygpt_net/provider/core/assistant_file/db_sqlite/__init__.py +4 -3
- pygpt_net/provider/core/assistant_file/db_sqlite/storage.py +3 -2
- pygpt_net/provider/core/assistant_store/base.py +6 -4
- pygpt_net/provider/core/assistant_store/db_sqlite/__init__.py +5 -4
- pygpt_net/provider/core/assistant_store/db_sqlite/storage.py +5 -3
- pygpt_net/provider/core/attachment/base.py +5 -3
- pygpt_net/provider/core/attachment/json_file.py +4 -3
- pygpt_net/provider/core/calendar/base.py +5 -3
- pygpt_net/provider/core/calendar/db_sqlite/__init__.py +6 -5
- pygpt_net/provider/core/calendar/db_sqlite/storage.py +5 -4
- pygpt_net/provider/core/config/base.py +8 -6
- pygpt_net/provider/core/config/json_file.py +9 -7
- pygpt_net/provider/core/config/patch.py +43 -1
- pygpt_net/provider/core/ctx/base.py +30 -25
- pygpt_net/provider/core/ctx/db_sqlite/__init__.py +59 -34
- pygpt_net/provider/core/ctx/db_sqlite/storage.py +62 -30
- pygpt_net/provider/core/ctx/db_sqlite/utils.py +11 -9
- pygpt_net/provider/core/index/base.py +129 -23
- pygpt_net/provider/core/index/db_sqlite/__init__.py +130 -23
- pygpt_net/provider/core/index/db_sqlite/storage.py +130 -23
- pygpt_net/provider/core/index/db_sqlite/utils.py +4 -2
- pygpt_net/provider/core/mode/base.py +5 -3
- pygpt_net/provider/core/mode/json_file.py +7 -6
- pygpt_net/provider/core/model/base.py +6 -4
- pygpt_net/provider/core/model/json_file.py +9 -7
- pygpt_net/provider/core/notepad/base.py +5 -3
- pygpt_net/provider/core/notepad/db_sqlite/__init__.py +5 -4
- pygpt_net/provider/core/notepad/db_sqlite/storage.py +4 -3
- pygpt_net/provider/core/plugin_preset/base.py +4 -2
- pygpt_net/provider/core/plugin_preset/json_file.py +5 -3
- pygpt_net/provider/core/preset/base.py +6 -4
- pygpt_net/provider/core/preset/json_file.py +9 -9
- pygpt_net/provider/core/prompt/base.py +6 -3
- pygpt_net/provider/core/prompt/json_file.py +11 -6
- pygpt_net/provider/gpt/assistants.py +21 -11
- pygpt_net/provider/gpt/audio.py +6 -5
- pygpt_net/provider/gpt/chat.py +10 -7
- pygpt_net/provider/gpt/completion.py +11 -5
- pygpt_net/provider/gpt/image.py +9 -2
- pygpt_net/provider/gpt/store.py +53 -18
- pygpt_net/provider/gpt/vision.py +17 -11
- pygpt_net/provider/llms/anthropic.py +7 -2
- pygpt_net/provider/llms/azure_openai.py +26 -5
- pygpt_net/provider/llms/base.py +47 -9
- pygpt_net/provider/llms/google.py +7 -2
- pygpt_net/provider/llms/hugging_face.py +13 -3
- pygpt_net/provider/llms/hugging_face_api.py +18 -4
- pygpt_net/provider/llms/local.py +7 -2
- pygpt_net/provider/llms/ollama.py +30 -6
- pygpt_net/provider/llms/openai.py +32 -6
- pygpt_net/provider/vector_stores/__init__.py +45 -14
- pygpt_net/provider/vector_stores/base.py +35 -8
- pygpt_net/provider/vector_stores/chroma.py +13 -3
- pygpt_net/provider/vector_stores/ctx_attachment.py +31 -12
- pygpt_net/provider/vector_stores/elasticsearch.py +12 -3
- pygpt_net/provider/vector_stores/pinecode.py +12 -3
- pygpt_net/provider/vector_stores/redis.py +12 -3
- pygpt_net/provider/vector_stores/simple.py +12 -3
- pygpt_net/provider/vector_stores/temp.py +16 -4
- pygpt_net/provider/web/base.py +10 -3
- pygpt_net/provider/web/google_custom_search.py +9 -3
- pygpt_net/provider/web/microsoft_bing.py +9 -3
- pygpt_net/tools/__init__.py +20 -4
- pygpt_net/tools/audio_transcriber/__init__.py +4 -3
- pygpt_net/tools/base.py +28 -7
- pygpt_net/tools/code_interpreter/__init__.py +177 -77
- pygpt_net/tools/code_interpreter/ui/dialogs.py +21 -103
- pygpt_net/tools/code_interpreter/ui/widgets.py +284 -9
- pygpt_net/tools/html_canvas/__init__.py +81 -25
- pygpt_net/tools/html_canvas/ui/dialogs.py +46 -62
- pygpt_net/tools/html_canvas/ui/widgets.py +96 -3
- pygpt_net/tools/image_viewer/__init__.py +10 -4
- pygpt_net/tools/indexer/__init__.py +8 -7
- pygpt_net/tools/media_player/__init__.py +4 -3
- pygpt_net/tools/text_editor/__init__.py +36 -10
- pygpt_net/ui/base/context_menu.py +2 -2
- pygpt_net/ui/layout/chat/input.py +10 -18
- pygpt_net/ui/layout/chat/output.py +27 -45
- pygpt_net/ui/layout/ctx/ctx_list.py +13 -4
- pygpt_net/ui/layout/toolbox/footer.py +18 -2
- pygpt_net/ui/main.py +2 -2
- pygpt_net/ui/menu/audio.py +12 -1
- pygpt_net/ui/menu/config.py +7 -11
- pygpt_net/ui/menu/debug.py +11 -1
- pygpt_net/ui/menu/theme.py +9 -2
- pygpt_net/ui/widget/filesystem/explorer.py +2 -2
- pygpt_net/ui/widget/lists/context.py +27 -5
- pygpt_net/ui/widget/tabs/Input.py +2 -2
- pygpt_net/ui/widget/tabs/body.py +2 -1
- pygpt_net/ui/widget/tabs/layout.py +195 -0
- pygpt_net/ui/widget/tabs/output.py +218 -55
- pygpt_net/ui/widget/textarea/html.py +11 -1
- pygpt_net/ui/widget/textarea/output.py +10 -1
- pygpt_net/ui/widget/textarea/search_input.py +4 -1
- pygpt_net/ui/widget/textarea/web.py +49 -9
- {pygpt_net-2.4.37.dist-info → pygpt_net-2.4.42.dist-info}/METADATA +177 -183
- {pygpt_net-2.4.37.dist-info → pygpt_net-2.4.42.dist-info}/RECORD +340 -325
- /pygpt_net/data/css/{web.dark.css → web-blocks.dark.css} +0 -0
- {pygpt_net-2.4.37.dist-info → pygpt_net-2.4.42.dist-info}/LICENSE +0 -0
- {pygpt_net-2.4.37.dist-info → pygpt_net-2.4.42.dist-info}/WHEEL +0 -0
- {pygpt_net-2.4.37.dist-info → pygpt_net-2.4.42.dist-info}/entry_points.txt +0 -0
pygpt_net/CHANGELOG.txt
CHANGED
@@ -1,3 +1,40 @@
|
|
1
|
+
2.4.42 (2024-12-15)
|
2
|
+
|
3
|
+
- Added Mailer plugin, which allows sending and retrieving emails from the server, and reading them. It currently supports only SMTP.
|
4
|
+
- Added 'web_request' command to the Web Search plugin, enabling GET/POST/PUT and other connections to any address and API endpoint. It also supports sending POST data, files, headers, cookies, and more.
|
5
|
+
- Improved audio output.
|
6
|
+
- Enhanced visibility of the Video menu.
|
7
|
+
- Other fixes.
|
8
|
+
|
9
|
+
2.4.41 (2024-12-14)
|
10
|
+
|
11
|
+
- Improved switching between columns on a split screen.
|
12
|
+
- Added visual identification of the active column.
|
13
|
+
|
14
|
+
2.4.40 (2024-12-13)
|
15
|
+
|
16
|
+
- Enhanced Split Screen mode, now promoted from beta to stable.
|
17
|
+
- Python Code Interpreter tool added to the Tabs.
|
18
|
+
- HTML/JS Canvas tool added to the Tabs.
|
19
|
+
- Added attachment icon to the context list if context has attachments.
|
20
|
+
- Improved audio playback.
|
21
|
+
- Improved web search.
|
22
|
+
- Added a thumbnail image to web search results.
|
23
|
+
- Added a new commands to web search: "extract_images" and "extract_links".
|
24
|
+
- Added the option "Use raw content (without summarization)" to the web search plugin, which provides a more detailed result to the main model.
|
25
|
+
- Extended the default maximum result characters to 50,000 in the web search plugin.
|
26
|
+
|
27
|
+
2.4.39 (2024-12-09)
|
28
|
+
|
29
|
+
- Added "Split Screen" mode (accessible via the switch in the bottom-right corner of the screen), which allows you to work in two windows simultaneously. It is currently experimental (beta). Future updates will include Code Interpreter and Canvas running in tabs.
|
30
|
+
|
31
|
+
- Fixed: Language switch.
|
32
|
+
|
33
|
+
2.4.38 (2024-12-08)
|
34
|
+
|
35
|
+
- Added the ability to select a style for chat display between: Blocks, ChatGPT-like, and ChatGPT-like Wide. New option in the menu: Config -> Theme -> Style...
|
36
|
+
- Added configuration options for audio input in Settings -> Audio -> Audio Input Device, Channels, and Sampling rate.
|
37
|
+
|
1
38
|
2.4.37 (2024-11-30)
|
2
39
|
|
3
40
|
- The `Query only` mode in `Uploaded` tab has been renamed to `RAG`.
|
pygpt_net/__init__.py
CHANGED
@@ -6,15 +6,15 @@
|
|
6
6
|
# GitHub: https://github.com/szczyglis-dev/py-gpt #
|
7
7
|
# MIT License #
|
8
8
|
# Created By : Marcin Szczygliński #
|
9
|
-
# Updated Date: 2024.
|
9
|
+
# Updated Date: 2024.12.15 04:00:00 #
|
10
10
|
# ================================================== #
|
11
11
|
|
12
12
|
__author__ = "Marcin Szczygliński"
|
13
13
|
__copyright__ = "Copyright 2024, Marcin Szczygliński"
|
14
14
|
__credits__ = ["Marcin Szczygliński"]
|
15
15
|
__license__ = "MIT"
|
16
|
-
__version__ = "2.4.
|
17
|
-
__build__ = "2024.
|
16
|
+
__version__ = "2.4.42"
|
17
|
+
__build__ = "2024.12.15"
|
18
18
|
__maintainer__ = "Marcin Szczygliński"
|
19
19
|
__github__ = "https://github.com/szczyglis-dev/py-gpt"
|
20
20
|
__website__ = "https://pygpt.net"
|
pygpt_net/app.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
# GitHub: https://github.com/szczyglis-dev/py-gpt #
|
7
7
|
# MIT License #
|
8
8
|
# Created By : Marcin Szczygliński #
|
9
|
-
# Updated Date: 2024.
|
9
|
+
# Updated Date: 2024.12.15 04:00:00 #
|
10
10
|
# ================================================== #
|
11
11
|
|
12
12
|
from pygpt_net.launcher import Launcher
|
@@ -32,6 +32,7 @@ from pygpt_net.plugin.openai_dalle import Plugin as OpenAIDallePlugin
|
|
32
32
|
from pygpt_net.plugin.openai_vision import Plugin as OpenAIVisionPlugin
|
33
33
|
from pygpt_net.plugin.real_time import Plugin as RealTimePlugin
|
34
34
|
from pygpt_net.plugin.agent import Plugin as AgentPlugin
|
35
|
+
from pygpt_net.plugin.mailer import Plugin as MailerPlugin
|
35
36
|
|
36
37
|
# agents (Llama-index)
|
37
38
|
from pygpt_net.provider.agents.openai import OpenAIAgent
|
@@ -320,6 +321,7 @@ def run(**kwargs):
|
|
320
321
|
launcher.add_plugin(OpenAIDallePlugin())
|
321
322
|
launcher.add_plugin(OpenAIVisionPlugin())
|
322
323
|
launcher.add_plugin(IdxLlamaIndexPlugin())
|
324
|
+
launcher.add_plugin(MailerPlugin())
|
323
325
|
launcher.add_plugin(CrontabPlugin())
|
324
326
|
|
325
327
|
# register custom plugins
|
pygpt_net/controller/__init__.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
# GitHub: https://github.com/szczyglis-dev/py-gpt #
|
7
7
|
# MIT License #
|
8
8
|
# Created By : Marcin Szczygliński #
|
9
|
-
# Updated Date: 2024.
|
9
|
+
# Updated Date: 2024.12.09 23:00:00 #
|
10
10
|
# ================================================== #
|
11
11
|
|
12
12
|
from pygpt_net.controller.access import Access
|
@@ -87,15 +87,16 @@ class Controller:
|
|
87
87
|
self.chat.init()
|
88
88
|
|
89
89
|
# setup layout
|
90
|
-
self.ui.pre_setup()
|
91
90
|
self.layout.setup()
|
92
91
|
self.ui.setup()
|
92
|
+
self.ui.tabs.setup()
|
93
93
|
|
94
94
|
# setup controllers
|
95
95
|
self.lang.setup()
|
96
96
|
self.assistant.setup()
|
97
97
|
self.chat.setup()
|
98
98
|
self.agent.setup()
|
99
|
+
self.tools.setup()
|
99
100
|
self.ctx.setup()
|
100
101
|
self.presets.setup()
|
101
102
|
self.idx.setup()
|
@@ -105,7 +106,8 @@ class Controller:
|
|
105
106
|
self.attachment.setup()
|
106
107
|
self.camera.setup_ui()
|
107
108
|
self.access.setup()
|
108
|
-
|
109
|
+
|
110
|
+
|
109
111
|
|
110
112
|
def post_setup(self):
|
111
113
|
"""Post-setup, after plugins are loaded"""
|
@@ -116,6 +118,7 @@ class Controller:
|
|
116
118
|
self.calendar.setup() # after everything is loaded
|
117
119
|
self.painter.setup() # load previous image if exists
|
118
120
|
self.debug.post_setup() # post setup debug after all loaded
|
121
|
+
self.ui.tabs.restore_data() # restore opened tabs data
|
119
122
|
|
120
123
|
# show license terms dialog
|
121
124
|
if not self.window.core.config.get('license.accepted'):
|
@@ -168,6 +171,7 @@ class Controller:
|
|
168
171
|
# post-reload
|
169
172
|
self.ui.tabs.reload_after()
|
170
173
|
self.ctx.reload_after()
|
174
|
+
self.ui.tabs.restore_data() # restore opened tabs data
|
171
175
|
self.kernel.restart()
|
172
176
|
|
173
177
|
self.reloading = False # unlock
|
@@ -6,9 +6,11 @@
|
|
6
6
|
# GitHub: https://github.com/szczyglis-dev/py-gpt #
|
7
7
|
# MIT License #
|
8
8
|
# Created By : Marcin Szczygliński #
|
9
|
-
# Updated Date: 2024.
|
9
|
+
# Updated Date: 2024.12.14 08:00:00 #
|
10
10
|
# ================================================== #
|
11
11
|
|
12
|
+
from typing import Optional, List, Dict, Any
|
13
|
+
|
12
14
|
import pyaudio
|
13
15
|
import wave
|
14
16
|
import os
|
@@ -59,7 +61,7 @@ class Voice:
|
|
59
61
|
"""Setup voice control"""
|
60
62
|
self.update()
|
61
63
|
|
62
|
-
def delayed_play(self, text: str, event: AppEvent
|
64
|
+
def delayed_play(self, text: str, event: AppEvent):
|
63
65
|
"""
|
64
66
|
Delayed play audio
|
65
67
|
|
@@ -185,7 +187,11 @@ class Voice:
|
|
185
187
|
self.enable_voice_control()
|
186
188
|
|
187
189
|
def is_voice_control_enabled(self) -> bool:
|
188
|
-
"""
|
190
|
+
"""
|
191
|
+
Check if voice control is enabled
|
192
|
+
|
193
|
+
:return: True if enabled
|
194
|
+
"""
|
189
195
|
return self.window.core.config.get("access.voice_control")
|
190
196
|
|
191
197
|
def toggle_recording(self):
|
@@ -342,7 +348,7 @@ class Voice:
|
|
342
348
|
self.window.tools.get("transcriber").on_transcribe(path, text)
|
343
349
|
|
344
350
|
@Slot(object, object)
|
345
|
-
def handle_input(self, text: str, ctx: CtxItem = None):
|
351
|
+
def handle_input(self, text: str, ctx: Optional[CtxItem] = None):
|
346
352
|
"""
|
347
353
|
Insert text to input and send
|
348
354
|
|
@@ -356,7 +362,7 @@ class Voice:
|
|
356
362
|
commands = self.window.core.access.voice.recognize_commands(text)
|
357
363
|
self.handle_commands(commands)
|
358
364
|
|
359
|
-
def handle_commands(self, commands:
|
365
|
+
def handle_commands(self, commands: List[Dict[str, Any]]):
|
360
366
|
"""
|
361
367
|
Handle commands
|
362
368
|
|
@@ -6,9 +6,11 @@
|
|
6
6
|
# GitHub: https://github.com/szczyglis-dev/py-gpt #
|
7
7
|
# MIT License #
|
8
8
|
# Created By : Marcin Szczygliński #
|
9
|
-
# Updated Date: 2024.
|
9
|
+
# Updated Date: 2024.12.14 08:00:00 #
|
10
10
|
# ================================================== #
|
11
11
|
|
12
|
+
from typing import Optional, Any
|
13
|
+
|
12
14
|
from pygpt_net.core.types import (
|
13
15
|
MODE_AGENT,
|
14
16
|
MODE_EXPERT,
|
@@ -44,9 +46,7 @@ class Experts:
|
|
44
46
|
return self.is_stop
|
45
47
|
|
46
48
|
def unlock(self):
|
47
|
-
"""
|
48
|
-
Unlock experts
|
49
|
-
"""
|
49
|
+
"""Unlock experts"""
|
50
50
|
self.is_stop = False
|
51
51
|
|
52
52
|
def enabled(self) -> bool:
|
@@ -61,7 +61,12 @@ class Experts:
|
|
61
61
|
return True
|
62
62
|
return False
|
63
63
|
|
64
|
-
def append_prompts(
|
64
|
+
def append_prompts(
|
65
|
+
self,
|
66
|
+
mode: str,
|
67
|
+
sys_prompt: str,
|
68
|
+
parent_id: Optional[str] = None
|
69
|
+
):
|
65
70
|
"""
|
66
71
|
Append prompt to the window
|
67
72
|
|
@@ -151,7 +156,7 @@ class Experts:
|
|
151
156
|
return num_calls # abort continue if expert call detected
|
152
157
|
return num_calls
|
153
158
|
|
154
|
-
def log(self, data:
|
159
|
+
def log(self, data: Any):
|
155
160
|
"""
|
156
161
|
Log data to debug
|
157
162
|
|
@@ -6,9 +6,11 @@
|
|
6
6
|
# GitHub: https://github.com/szczyglis-dev/py-gpt #
|
7
7
|
# MIT License #
|
8
8
|
# Created By : Marcin Szczygliński #
|
9
|
-
# Updated Date: 2024.
|
9
|
+
# Updated Date: 2024.12.14 08:00:00 #
|
10
10
|
# ================================================== #
|
11
11
|
|
12
|
+
from typing import Optional, List, Dict, Any
|
13
|
+
|
12
14
|
from pygpt_net.core.types import (
|
13
15
|
MODE_AGENT,
|
14
16
|
MODE_AGENT_LLAMA,
|
@@ -109,7 +111,7 @@ class Legacy:
|
|
109
111
|
self.window.ui.nodes['status.agent'].setText(status)
|
110
112
|
self.window.controller.agent.common.toggle_status()
|
111
113
|
|
112
|
-
def get_functions(self) ->
|
114
|
+
def get_functions(self) -> List[Dict[str, Any]]:
|
113
115
|
"""
|
114
116
|
Append goal commands
|
115
117
|
|
@@ -137,7 +139,7 @@ class Legacy:
|
|
137
139
|
def on_system_prompt(
|
138
140
|
self,
|
139
141
|
prompt: str,
|
140
|
-
append_prompt: str = "",
|
142
|
+
append_prompt: Optional[str] = "",
|
141
143
|
auto_stop: bool = True,
|
142
144
|
) -> str:
|
143
145
|
"""
|
@@ -286,7 +288,7 @@ class Legacy:
|
|
286
288
|
def on_cmd(
|
287
289
|
self,
|
288
290
|
ctx: CtxItem,
|
289
|
-
cmds:
|
291
|
+
cmds: List[Dict[str, Any]],
|
290
292
|
):
|
291
293
|
"""
|
292
294
|
Event: On commands
|
@@ -300,7 +302,7 @@ class Legacy:
|
|
300
302
|
def cmd(
|
301
303
|
self,
|
302
304
|
ctx: CtxItem,
|
303
|
-
cmds:
|
305
|
+
cmds: List[Dict[str, Any]],
|
304
306
|
):
|
305
307
|
"""
|
306
308
|
Event: On command
|
@@ -378,7 +380,7 @@ class Legacy:
|
|
378
380
|
mode="agent",
|
379
381
|
)
|
380
382
|
|
381
|
-
def hook_update(self, key, value, caller, *args, **kwargs):
|
383
|
+
def hook_update(self, key: str, value: Any, caller, *args, **kwargs):
|
382
384
|
"""
|
383
385
|
Hook: on option update
|
384
386
|
|
@@ -6,9 +6,11 @@
|
|
6
6
|
# GitHub: https://github.com/szczyglis-dev/py-gpt #
|
7
7
|
# MIT License #
|
8
8
|
# Created By : Marcin Szczygliński #
|
9
|
-
# Updated Date: 2024.
|
9
|
+
# Updated Date: 2024.12.14 08:00:00 #
|
10
10
|
# ================================================== #
|
11
11
|
|
12
|
+
from typing import Any
|
13
|
+
|
12
14
|
from pygpt_net.core.events import KernelEvent
|
13
15
|
from pygpt_net.core.bridge.context import BridgeContext
|
14
16
|
from pygpt_net.item.ctx import CtxItem
|
@@ -134,7 +136,7 @@ class Llama:
|
|
134
136
|
"""Update agent status"""
|
135
137
|
pass
|
136
138
|
|
137
|
-
def hook_update(self, key, value, caller, *args, **kwargs):
|
139
|
+
def hook_update(self, key: str, value: Any, caller, *args, **kwargs):
|
138
140
|
"""
|
139
141
|
Hook: on option update
|
140
142
|
|
@@ -6,9 +6,10 @@
|
|
6
6
|
# GitHub: https://github.com/szczyglis-dev/py-gpt #
|
7
7
|
# MIT License #
|
8
8
|
# Created By : Marcin Szczygliński #
|
9
|
-
# Updated Date: 2024.
|
9
|
+
# Updated Date: 2024.12.14 08:00:00 #
|
10
10
|
# ================================================== #
|
11
11
|
|
12
|
+
from typing import Optional
|
12
13
|
import webbrowser
|
13
14
|
|
14
15
|
from pygpt_net.item.assistant import AssistantItem
|
@@ -22,7 +23,7 @@ from .threads import Threads
|
|
22
23
|
from pygpt_net.core.text.utils import has_unclosed_code_tag
|
23
24
|
from pygpt_net.utils import trans
|
24
25
|
from pygpt_net.item.ctx import CtxItem
|
25
|
-
from
|
26
|
+
from pygpt_net.core.events import RenderEvent
|
26
27
|
|
27
28
|
|
28
29
|
class Assistant:
|
@@ -49,7 +50,7 @@ class Assistant:
|
|
49
50
|
"""
|
50
51
|
Update assistants list
|
51
52
|
|
52
|
-
:param update_list: update list
|
53
|
+
:param update_list: True if update list
|
53
54
|
"""
|
54
55
|
if update_list:
|
55
56
|
self.update_list()
|
@@ -244,7 +245,11 @@ class Assistant:
|
|
244
245
|
self.window.update_status(trans('status.assistant.cleared'))
|
245
246
|
self.update()
|
246
247
|
|
247
|
-
def delete(
|
248
|
+
def delete(
|
249
|
+
self,
|
250
|
+
idx: Optional[int] = None,
|
251
|
+
force: bool = False
|
252
|
+
):
|
248
253
|
"""
|
249
254
|
Delete assistant
|
250
255
|
|
@@ -6,9 +6,10 @@
|
|
6
6
|
# GitHub: https://github.com/szczyglis-dev/py-gpt #
|
7
7
|
# MIT License #
|
8
8
|
# Created By : Marcin Szczygliński #
|
9
|
-
# Updated Date: 2024.
|
9
|
+
# Updated Date: 2024.12.14 08:00:00 #
|
10
10
|
# ================================================== #
|
11
11
|
|
12
|
+
from typing import Optional, Any
|
12
13
|
|
13
14
|
from PySide6.QtWidgets import QApplication, QFileDialog
|
14
15
|
|
@@ -95,7 +96,11 @@ class Batch:
|
|
95
96
|
self.window.core.debug.log(e)
|
96
97
|
self.window.ui.dialogs.alert(e)
|
97
98
|
|
98
|
-
def import_store_files(
|
99
|
+
def import_store_files(
|
100
|
+
self,
|
101
|
+
store_id: str,
|
102
|
+
force: bool = False
|
103
|
+
):
|
99
104
|
"""
|
100
105
|
Sync files with API (store)
|
101
106
|
|
@@ -123,7 +128,7 @@ class Batch:
|
|
123
128
|
"""
|
124
129
|
Truncate all files in API
|
125
130
|
|
126
|
-
:param force: if
|
131
|
+
:param force: if True, imports without confirmation
|
127
132
|
"""
|
128
133
|
if not force:
|
129
134
|
self.window.ui.dialogs.confirm(
|
@@ -142,7 +147,7 @@ class Batch:
|
|
142
147
|
Truncate all files in API (store)
|
143
148
|
|
144
149
|
:param idx: store index
|
145
|
-
:param force: if
|
150
|
+
:param force: if True, imports without confirmation
|
146
151
|
"""
|
147
152
|
store_id = self.window.controller.assistant.store.get_by_tab_idx(idx)
|
148
153
|
self.truncate_store_files(store_id, force)
|
@@ -152,7 +157,7 @@ class Batch:
|
|
152
157
|
Truncate all files in API (store)
|
153
158
|
|
154
159
|
:param store_id: store ID
|
155
|
-
:param force: if
|
160
|
+
:param force: if True, imports without confirmation
|
156
161
|
"""
|
157
162
|
if store_id is None:
|
158
163
|
self.window.ui.dialogs.alert(trans("dialog.assistant.store.alert.select"))
|
@@ -170,22 +175,30 @@ class Batch:
|
|
170
175
|
QApplication.processEvents()
|
171
176
|
self.window.core.gpt.assistants.importer.truncate_files(store_id) # remove all files from API
|
172
177
|
|
173
|
-
def clear_store_files_by_idx(
|
178
|
+
def clear_store_files_by_idx(
|
179
|
+
self,
|
180
|
+
idx: int,
|
181
|
+
force: bool = False
|
182
|
+
):
|
174
183
|
"""
|
175
184
|
Clear files (store, local only)
|
176
185
|
|
177
186
|
:param idx: store index
|
178
|
-
:param force: if
|
187
|
+
:param force: if True, clears without confirmation
|
179
188
|
"""
|
180
189
|
store_id = self.window.controller.assistant.store.get_by_tab_idx(idx)
|
181
190
|
self.clear_store_files(store_id, force)
|
182
191
|
|
183
|
-
def clear_store_files(
|
192
|
+
def clear_store_files(
|
193
|
+
self,
|
194
|
+
store_id: Optional[str] = None,
|
195
|
+
force: bool = False
|
196
|
+
):
|
184
197
|
"""
|
185
198
|
Clear files (store, local only)
|
186
199
|
|
187
200
|
:param store_id: store ID
|
188
|
-
:param force: if
|
201
|
+
:param force: if True, clears without confirmation
|
189
202
|
"""
|
190
203
|
if store_id is None:
|
191
204
|
self.window.ui.dialogs.alert(trans("dialog.assistant.store.alert.select"))
|
@@ -209,7 +222,7 @@ class Batch:
|
|
209
222
|
"""
|
210
223
|
Clear files (all, local only)
|
211
224
|
|
212
|
-
:param force: if
|
225
|
+
:param force: if True, clears without confirmation
|
213
226
|
"""
|
214
227
|
if not force:
|
215
228
|
self.window.ui.dialogs.confirm(
|
@@ -229,7 +242,7 @@ class Batch:
|
|
229
242
|
"""
|
230
243
|
Clear vector stores (local only)
|
231
244
|
|
232
|
-
:param force: if
|
245
|
+
:param force: if True, clears without confirmation
|
233
246
|
"""
|
234
247
|
if not force:
|
235
248
|
self.window.ui.dialogs.confirm(
|
@@ -251,7 +264,7 @@ class Batch:
|
|
251
264
|
"""
|
252
265
|
Truncate vector stores in API
|
253
266
|
|
254
|
-
:param force: if
|
267
|
+
:param force: if True, truncates without confirmation
|
255
268
|
"""
|
256
269
|
if not force:
|
257
270
|
self.window.ui.dialogs.confirm(
|
@@ -274,7 +287,7 @@ class Batch:
|
|
274
287
|
"""
|
275
288
|
Refresh all vector stores
|
276
289
|
|
277
|
-
:param force: if
|
290
|
+
:param force: if True, refresh without confirmation
|
278
291
|
"""
|
279
292
|
if not force:
|
280
293
|
self.window.ui.dialogs.confirm(
|
@@ -299,7 +312,7 @@ class Batch:
|
|
299
312
|
self.window.update_status("OK. Imported assistants: " + str(num) + ".")
|
300
313
|
self.window.ui.dialogs.alert(trans("status.finished"))
|
301
314
|
|
302
|
-
def handle_imported_assistants_failed(self, error:
|
315
|
+
def handle_imported_assistants_failed(self, error: Any):
|
303
316
|
"""
|
304
317
|
Handle error on importing assistants
|
305
318
|
|
@@ -322,7 +335,7 @@ class Batch:
|
|
322
335
|
self.window.ui.dialogs.alert(trans("status.finished"))
|
323
336
|
self.window.update_status("OK. All stores refreshed.")
|
324
337
|
|
325
|
-
def handle_refreshed_stores_failed(self, error:
|
338
|
+
def handle_refreshed_stores_failed(self, error: Any):
|
326
339
|
"""
|
327
340
|
Handle error on refreshing stores
|
328
341
|
|
@@ -347,7 +360,7 @@ class Batch:
|
|
347
360
|
# alert on files import after stores
|
348
361
|
# self.window.ui.dialogs.alert(trans("status.finished"))
|
349
362
|
|
350
|
-
def handle_imported_stores_failed(self, error:
|
363
|
+
def handle_imported_stores_failed(self, error: Any):
|
351
364
|
"""
|
352
365
|
Handle error on importing stores
|
353
366
|
|
@@ -375,7 +388,7 @@ class Batch:
|
|
375
388
|
self.window.update_status("OK. Removed stores: " + str(num) + ".")
|
376
389
|
self.window.ui.dialogs.alert(trans("status.finished"))
|
377
390
|
|
378
|
-
def handle_truncated_stores_failed(self, error:
|
391
|
+
def handle_truncated_stores_failed(self, error: Any):
|
379
392
|
"""
|
380
393
|
Handle error on truncating stores
|
381
394
|
|
@@ -398,7 +411,7 @@ class Batch:
|
|
398
411
|
self.window.update_status("OK. Imported files: " + str(num) + ".")
|
399
412
|
self.window.ui.dialogs.alert(trans("status.finished"))
|
400
413
|
|
401
|
-
def handle_imported_files_failed(self, error:
|
414
|
+
def handle_imported_files_failed(self, error: Any):
|
402
415
|
"""
|
403
416
|
Handle error on importing files
|
404
417
|
|
@@ -410,7 +423,11 @@ class Batch:
|
|
410
423
|
self.window.update_status("Error importing files.")
|
411
424
|
self.window.ui.dialogs.alert(error)
|
412
425
|
|
413
|
-
def handle_truncated_files(
|
426
|
+
def handle_truncated_files(
|
427
|
+
self,
|
428
|
+
store_id: Optional[str] = None,
|
429
|
+
num: int = 0
|
430
|
+
):
|
414
431
|
"""
|
415
432
|
Handle truncated (in API) files
|
416
433
|
|
@@ -423,7 +440,7 @@ class Batch:
|
|
423
440
|
self.window.controller.assistant.files.update()
|
424
441
|
self.window.ui.dialogs.alert(trans("status.finished"))
|
425
442
|
|
426
|
-
def handle_truncated_files_failed(self, error:
|
443
|
+
def handle_truncated_files_failed(self, error: Any):
|
427
444
|
"""
|
428
445
|
Handle error on truncated files
|
429
446
|
|
@@ -536,7 +553,7 @@ class Batch:
|
|
536
553
|
self.window.update_status("OK. Uploaded files: " + str(num) + ".")
|
537
554
|
self.window.ui.dialogs.alert("OK. Uploaded files: " + str(num) + ".")
|
538
555
|
|
539
|
-
def handle_uploaded_files_failed(self, error:
|
556
|
+
def handle_uploaded_files_failed(self, error: Any):
|
540
557
|
"""
|
541
558
|
Handle error on uploading files
|
542
559
|
|
@@ -6,10 +6,11 @@
|
|
6
6
|
# GitHub: https://github.com/szczyglis-dev/py-gpt #
|
7
7
|
# MIT License #
|
8
8
|
# Created By : Marcin Szczygliński #
|
9
|
-
# Updated Date: 2024.
|
9
|
+
# Updated Date: 2024.12.14 08:00:00 #
|
10
10
|
# ================================================== #
|
11
11
|
|
12
12
|
import copy
|
13
|
+
from typing import Optional
|
13
14
|
|
14
15
|
from PySide6.QtWidgets import QApplication
|
15
16
|
|
@@ -133,7 +134,7 @@ class Editor:
|
|
133
134
|
value="",
|
134
135
|
)
|
135
136
|
|
136
|
-
def get_selected_store_id(self) -> str
|
137
|
+
def get_selected_store_id(self) -> Optional[str]:
|
137
138
|
"""
|
138
139
|
Return current selected vector store ID
|
139
140
|
|
@@ -149,7 +150,7 @@ class Editor:
|
|
149
150
|
return self.window.ui.config[self.id]['vector_store'].combo.itemData(idx)
|
150
151
|
return None
|
151
152
|
|
152
|
-
def get_choice_idx_by_id(self, store_id) -> int:
|
153
|
+
def get_choice_idx_by_id(self, store_id: str) -> int:
|
153
154
|
"""
|
154
155
|
Return combo choice index by vector store ID
|
155
156
|
|
@@ -166,7 +167,7 @@ class Editor:
|
|
166
167
|
i += 1
|
167
168
|
return 0 # none
|
168
169
|
|
169
|
-
def edit(self, idx: int = None):
|
170
|
+
def edit(self, idx: Optional[int] = None):
|
170
171
|
"""
|
171
172
|
Open assistant editor
|
172
173
|
|
@@ -183,7 +184,7 @@ class Editor:
|
|
183
184
|
"""Close assistant editor"""
|
184
185
|
self.window.ui.dialogs.close('editor.assistants')
|
185
186
|
|
186
|
-
def init(self, id: str = None):
|
187
|
+
def init(self, id: Optional[str] = None):
|
187
188
|
"""
|
188
189
|
Initialize assistant editor
|
189
190
|
|
@@ -379,7 +380,7 @@ class Editor:
|
|
379
380
|
"""
|
380
381
|
Assign data from fields to assistant
|
381
382
|
|
382
|
-
:param assistant: assistant
|
383
|
+
:param assistant: assistant item
|
383
384
|
"""
|
384
385
|
model = self.window.controller.config.get_value(
|
385
386
|
parent_id=self.id,
|