From db0b5fd5063b5d10e4442cc16e2f0885a4bac1f0 Mon Sep 17 00:00:00 2001 From: Marcin Szczyglinski Date: Mon, 25 Dec 2023 21:32:15 +0100 Subject: [PATCH] Reorganized project structure --- pyproject.toml | 2 +- run.py | 2 +- src/pygpt_net/__init__.py | 2 +- src/pygpt_net/app.py | 300 ++++++++++++++++- src/pygpt_net/{core => }/config.py | 6 +- src/pygpt_net/{core => }/container.py | 8 +- .../{core => controller}/__init__.py | 0 .../{core => }/controller/assistant.py | 4 +- .../{core => }/controller/assistant_files.py | 4 +- .../{core => }/controller/assistant_thread.py | 4 +- .../{core => }/controller/attachment.py | 4 +- src/pygpt_net/{core => }/controller/audio.py | 2 +- src/pygpt_net/{core => }/controller/camera.py | 4 +- .../{core => }/controller/command.py | 2 +- .../{core => }/controller/confirm.py | 2 +- src/pygpt_net/{core => }/controller/ctx.py | 4 +- src/pygpt_net/{core => }/controller/debug.py | 2 +- src/pygpt_net/{core => }/controller/files.py | 4 +- src/pygpt_net/{core => }/controller/image.py | 6 +- src/pygpt_net/{core => }/controller/info.py | 2 +- src/pygpt_net/{core => }/controller/input.py | 6 +- src/pygpt_net/{core => }/controller/lang.py | 4 +- .../{core => }/controller/launcher.py | 2 +- src/pygpt_net/{core => }/controller/layout.py | 2 +- src/pygpt_net/{core => }/controller/main.py | 54 +-- src/pygpt_net/{core => }/controller/model.py | 4 +- .../{core => }/controller/notepad.py | 4 +- src/pygpt_net/{core => }/controller/output.py | 6 +- .../{core => }/controller/plugins.py | 4 +- .../{core => }/controller/presets.py | 6 +- .../{core => }/controller/settings.py | 4 +- .../{core => }/controller/summarize.py | 2 +- src/pygpt_net/{core => }/controller/theme.py | 4 +- src/pygpt_net/{core => }/controller/ui.py | 4 +- src/pygpt_net/core/app.py | 308 ------------------ src/pygpt_net/core/assistants.py | 6 +- src/pygpt_net/core/attachments.py | 6 +- src/pygpt_net/core/camera.py | 3 +- src/pygpt_net/core/chain.py | 4 +- src/pygpt_net/core/command.py | 2 +- src/pygpt_net/core/ctx.py | 8 +- src/pygpt_net/core/debugger.py | 20 +- src/pygpt_net/core/dispatcher.py | 2 +- src/pygpt_net/core/filesystem.py | 2 +- src/pygpt_net/core/gpt.py | 4 +- src/pygpt_net/core/gpt_assistants.py | 4 +- src/pygpt_net/core/history.py | 4 +- src/pygpt_net/core/image.py | 2 +- src/pygpt_net/core/info.py | 2 +- src/pygpt_net/core/locale.py | 4 +- src/pygpt_net/core/models.py | 4 +- src/pygpt_net/core/modes.py | 4 +- src/pygpt_net/core/notepad.py | 7 +- src/pygpt_net/core/platform.py | 4 +- src/pygpt_net/core/plugins.py | 2 +- src/pygpt_net/core/presets.py | 6 +- src/pygpt_net/core/settings.py | 2 +- src/pygpt_net/core/tokens.py | 2 +- src/pygpt_net/core/ui/dialog/__init__.py | 10 - .../{core/controller => debug}/__init__.py | 0 src/pygpt_net/{core => }/debug/assistants.py | 3 +- src/pygpt_net/{core => }/debug/attachments.py | 4 +- src/pygpt_net/{core => }/debug/config.py | 2 +- src/pygpt_net/{core => }/debug/context.py | 2 +- src/pygpt_net/{core => }/debug/models.py | 2 +- src/pygpt_net/{core => }/debug/plugins.py | 2 +- src/pygpt_net/{core => }/debug/presets.py | 2 +- src/pygpt_net/{core => }/debug/ui.py | 2 +- src/pygpt_net/{core => }/installer.py | 2 +- src/pygpt_net/{core => }/item/__init__.py | 0 src/pygpt_net/{core => }/item/assistant.py | 2 +- src/pygpt_net/{core => }/item/attachment.py | 2 +- src/pygpt_net/{core => }/item/ctx.py | 2 +- src/pygpt_net/{core => }/item/mode.py | 2 +- src/pygpt_net/{core => }/item/model.py | 2 +- src/pygpt_net/{core => }/item/notepad.py | 3 +- src/pygpt_net/{core => }/item/preset.py | 2 +- src/pygpt_net/{core => }/llm/Anthropic.py | 2 +- src/pygpt_net/{core => }/llm/AzureOpenAI.py | 2 +- src/pygpt_net/{core => }/llm/HuggingFace.py | 2 +- src/pygpt_net/{core => }/llm/Llama2.py | 2 +- src/pygpt_net/{core => }/llm/Ollama.py | 2 +- src/pygpt_net/{core => }/llm/OpenAI.py | 3 +- src/pygpt_net/{core => }/llm/__init__.py | 0 .../{core/debug => plugin}/__init__.py | 0 .../plugin => plugin/audio_azure}/__init__.py | 0 .../{core => }/plugin/audio_azure/plugin.py | 4 +- .../audio_openai_tts}/__init__.py | 0 .../plugin/audio_openai_tts/plugin.py | 6 +- .../audio_openai_whisper}/__init__.py | 0 .../plugin/audio_openai_whisper/plugin.py | 6 +- .../{core => }/plugin/base_plugin.py | 6 +- .../cmd_code_interpreter}/__init__.py | 0 .../plugin/cmd_code_interpreter/plugin.py | 4 +- .../{core => }/plugin/cmd_custom/__init__.py | 0 .../{core => }/plugin/cmd_custom/plugin.py | 4 +- .../cmd_files}/__init__.py | 0 .../{core => }/plugin/cmd_files/plugin.py | 4 +- .../cmd_web_google}/__init__.py | 0 .../plugin/cmd_web_google/plugin.py | 4 +- .../plugin/cmd_web_google/websearch.py | 2 +- .../real_time}/__init__.py | 0 .../{core => }/plugin/real_time/plugin.py | 5 +- .../self_loop}/__init__.py | 0 .../{core => }/plugin/self_loop/plugin.py | 2 +- src/pygpt_net/{core => }/provider/__init__.py | 0 .../{core => }/provider/assistant/__init__.py | 0 .../{core => }/provider/assistant/base.py | 2 +- .../provider/assistant/json_file.py | 10 +- .../provider/attachment/__init__.py | 0 .../{core => }/provider/attachment/base.py | 2 +- .../provider/attachment/json_file.py | 6 +- .../{core => }/provider/config/__init__.py | 0 .../{core => }/provider/config/base.py | 2 +- .../{core => }/provider/config/json_file.py | 4 +- .../{core => }/provider/ctx/__init__.py | 0 src/pygpt_net/{core => }/provider/ctx/base.py | 2 +- .../{core => }/provider/ctx/db_sqlite.py | 4 +- .../{core => }/provider/ctx/json_file.py | 6 +- .../{core => }/provider/history/__init__.py | 0 .../{core => }/provider/history/base.py | 2 +- .../{core => }/provider/history/txt_file.py | 4 +- .../{core => }/provider/mode/__init__.py | 0 .../{core => }/provider/mode/base.py | 2 +- .../{core => }/provider/mode/json_file.py | 6 +- .../{core => }/provider/model/__init__.py | 0 .../{core => }/provider/model/base.py | 2 +- .../{core => }/provider/model/json_file.py | 6 +- .../{core => }/provider/notepad/__init__.py | 0 .../{core => }/provider/notepad/base.py | 2 +- .../{core => }/provider/notepad/json_file.py | 7 +- .../{core => }/provider/preset/__init__.py | 0 .../{core => }/provider/preset/base.py | 2 +- .../{core => }/provider/preset/json_file.py | 6 +- .../{core/plugin/self_loop => ui}/__init__.py | 0 .../{core/ui => ui/dialog}/__init__.py | 0 src/pygpt_net/{core => }/ui/dialog/about.py | 6 +- .../{core => }/ui/dialog/assistant.py | 14 +- .../{core => }/ui/dialog/changelog.py | 6 +- src/pygpt_net/{core => }/ui/dialog/debug.py | 4 +- src/pygpt_net/{core => }/ui/dialog/editor.py | 6 +- src/pygpt_net/{core => }/ui/dialog/image.py | 8 +- src/pygpt_net/{core => }/ui/dialog/logger.py | 6 +- src/pygpt_net/{core => }/ui/dialog/plugins.py | 22 +- src/pygpt_net/{core => }/ui/dialog/preset.py | 14 +- src/pygpt_net/{core => }/ui/dialog/rename.py | 6 +- .../{core => }/ui/dialog/settings.py | 18 +- src/pygpt_net/{core => }/ui/dialog/start.py | 6 +- src/pygpt_net/{core => }/ui/dialog/update.py | 4 +- src/pygpt_net/{core => }/ui/dialogs.py | 32 +- .../{core => }/ui/layout/__init__.py | 0 .../{core => }/ui/layout/chat/__init__.py | 0 .../{core => }/ui/layout/chat/attachments.py | 6 +- .../ui/layout/chat/attachments_uploaded.py | 6 +- .../{core => }/ui/layout/chat/input.py | 14 +- .../{core => }/ui/layout/chat/main.py | 6 +- .../{core => }/ui/layout/chat/markdown.py | 0 .../{core => }/ui/layout/chat/output.py | 16 +- .../{core => }/ui/layout/ctx/__init__.py | 0 .../{core => }/ui/layout/ctx/ctx_list.py | 6 +- .../{core => }/ui/layout/ctx/main.py | 6 +- .../{core => }/ui/layout/ctx/video.py | 4 +- src/pygpt_net/{core => }/ui/layout/status.py | 4 +- .../{core => }/ui/layout/toolbox/__init__.py | 0 .../ui/layout/toolbox/assistants.py | 6 +- .../{core => }/ui/layout/toolbox/footer.py | 12 +- .../{core => }/ui/layout/toolbox/image.py | 6 +- .../{core => }/ui/layout/toolbox/main.py | 14 +- .../{core => }/ui/layout/toolbox/mode.py | 6 +- .../{core => }/ui/layout/toolbox/model.py | 6 +- .../{core => }/ui/layout/toolbox/presets.py | 8 +- .../{core => }/ui/layout/toolbox/prompt.py | 6 +- .../{core => }/ui/layout/toolbox/vision.py | 4 +- src/pygpt_net/{core => }/ui/main.py | 10 +- src/pygpt_net/{core => }/ui/menu.py | 4 +- .../{core => }/ui/widget/__init__.py | 0 .../{core => }/ui/widget/audio/__init__.py | 0 .../{core => }/ui/widget/audio/input.py | 4 +- .../{core => }/ui/widget/audio/output.py | 2 +- .../{core => }/ui/widget/dialog/__init__.py | 0 .../{core => }/ui/widget/dialog/alert.py | 4 +- .../{core => }/ui/widget/dialog/confirm.py | 4 +- .../{core => }/ui/widget/dialog/debug.py | 2 +- .../{core => }/ui/widget/dialog/editor.py | 2 +- .../ui/widget/dialog/editor_file.py | 2 +- .../{core => }/ui/widget/dialog/image.py | 2 +- .../{core => }/ui/widget/dialog/info.py | 2 +- .../{core => }/ui/widget/dialog/logger.py | 2 +- .../{core => }/ui/widget/dialog/rename.py | 6 +- .../{core => }/ui/widget/dialog/settings.py | 2 +- .../ui/widget/dialog/settings_plugin.py | 2 +- .../{core => }/ui/widget/dialog/update.py | 4 +- .../{core => }/ui/widget/element/__init__.py | 0 .../{core => }/ui/widget/element/group.py | 2 +- .../{core => }/ui/widget/element/url.py | 2 +- .../ui/widget/filesystem/__init__.py | 0 .../ui/widget/filesystem/explorer.py | 4 +- .../{core => }/ui/widget/image/__init__.py | 0 .../{core => }/ui/widget/image/display.py | 4 +- .../{core => }/ui/widget/lists/__init__.py | 0 .../{core => }/ui/widget/lists/assistant.py | 6 +- .../{core => }/ui/widget/lists/attachment.py | 6 +- .../{core => }/ui/widget/lists/base.py | 2 +- .../{core => }/ui/widget/lists/context.py | 6 +- .../{core => }/ui/widget/lists/plugin.py | 4 +- .../{core => }/ui/widget/lists/preset.py | 6 +- .../{core => }/ui/widget/lists/uploaded.py | 6 +- .../{core => }/ui/widget/option/__init__.py | 0 .../{core => }/ui/widget/option/checkbox.py | 2 +- .../{core => }/ui/widget/option/dictionary.py | 4 +- .../{core => }/ui/widget/option/input.py | 2 +- .../{core => }/ui/widget/option/slider.py | 4 +- .../{core => }/ui/widget/option/textarea.py | 2 +- .../{core => }/ui/widget/textarea/__init__.py | 0 .../{core => }/ui/widget/textarea/input.py | 4 +- .../{core => }/ui/widget/textarea/name.py | 2 +- .../{core => }/ui/widget/textarea/notepad.py | 4 +- .../{core => }/ui/widget/textarea/output.py | 4 +- .../{core => }/ui/widget/textarea/rename.py | 2 +- .../{core => }/ui/widget/vision/__init__.py | 0 .../{core => }/ui/widget/vision/camera.py | 4 +- src/pygpt_net/{core => }/updater.py | 4 +- src/pygpt_net/{core => }/utils.py | 4 +- 223 files changed, 739 insertions(+), 758 deletions(-) rename src/pygpt_net/{core => }/config.py (97%) rename src/pygpt_net/{core => }/container.py (93%) rename src/pygpt_net/{core => controller}/__init__.py (100%) rename src/pygpt_net/{core => }/controller/assistant.py (99%) rename src/pygpt_net/{core => }/controller/assistant_files.py (99%) rename src/pygpt_net/{core => }/controller/assistant_thread.py (98%) rename src/pygpt_net/{core => }/controller/attachment.py (99%) rename src/pygpt_net/{core => }/controller/audio.py (98%) rename src/pygpt_net/{core => }/controller/camera.py (98%) rename src/pygpt_net/{core => }/controller/command.py (98%) rename src/pygpt_net/{core => }/controller/confirm.py (98%) rename src/pygpt_net/{core => }/controller/ctx.py (99%) rename src/pygpt_net/{core => }/controller/debug.py (98%) rename src/pygpt_net/{core => }/controller/files.py (96%) rename src/pygpt_net/{core => }/controller/image.py (97%) rename src/pygpt_net/{core => }/controller/info.py (97%) rename src/pygpt_net/{core => }/controller/input.py (99%) rename src/pygpt_net/{core => }/controller/lang.py (99%) rename src/pygpt_net/{core => }/controller/launcher.py (96%) rename src/pygpt_net/{core => }/controller/layout.py (99%) rename src/pygpt_net/{core => }/controller/main.py (63%) rename src/pygpt_net/{core => }/controller/model.py (99%) rename src/pygpt_net/{core => }/controller/notepad.py (97%) rename src/pygpt_net/{core => }/controller/output.py (98%) rename src/pygpt_net/{core => }/controller/plugins.py (99%) rename src/pygpt_net/{core => }/controller/presets.py (99%) rename src/pygpt_net/{core => }/controller/settings.py (99%) rename src/pygpt_net/{core => }/controller/summarize.py (97%) rename src/pygpt_net/{core => }/controller/theme.py (99%) rename src/pygpt_net/{core => }/controller/ui.py (99%) delete mode 100755 src/pygpt_net/core/app.py delete mode 100755 src/pygpt_net/core/ui/dialog/__init__.py rename src/pygpt_net/{core/controller => debug}/__init__.py (100%) rename src/pygpt_net/{core => }/debug/assistants.py (96%) rename src/pygpt_net/{core => }/debug/attachments.py (96%) rename src/pygpt_net/{core => }/debug/config.py (95%) rename src/pygpt_net/{core => }/debug/context.py (98%) rename src/pygpt_net/{core => }/debug/models.py (96%) rename src/pygpt_net/{core => }/debug/plugins.py (96%) rename src/pygpt_net/{core => }/debug/presets.py (97%) rename src/pygpt_net/{core => }/debug/ui.py (97%) rename src/pygpt_net/{core => }/installer.py (97%) rename src/pygpt_net/{core => }/item/__init__.py (100%) rename src/pygpt_net/{core => }/item/assistant.py (98%) rename src/pygpt_net/{core => }/item/attachment.py (96%) rename src/pygpt_net/{core => }/item/ctx.py (97%) rename src/pygpt_net/{core => }/item/mode.py (90%) rename src/pygpt_net/{core => }/item/model.py (93%) rename src/pygpt_net/{core => }/item/notepad.py (92%) rename src/pygpt_net/{core => }/item/preset.py (93%) rename src/pygpt_net/{core => }/llm/Anthropic.py (96%) rename src/pygpt_net/{core => }/llm/AzureOpenAI.py (96%) rename src/pygpt_net/{core => }/llm/HuggingFace.py (96%) rename src/pygpt_net/{core => }/llm/Llama2.py (96%) rename src/pygpt_net/{core => }/llm/Ollama.py (95%) rename src/pygpt_net/{core => }/llm/OpenAI.py (96%) rename src/pygpt_net/{core => }/llm/__init__.py (100%) rename src/pygpt_net/{core/debug => plugin}/__init__.py (100%) rename src/pygpt_net/{core/plugin => plugin/audio_azure}/__init__.py (100%) rename src/pygpt_net/{core => }/plugin/audio_azure/plugin.py (98%) rename src/pygpt_net/{core/plugin/audio_azure => plugin/audio_openai_tts}/__init__.py (100%) rename src/pygpt_net/{core => }/plugin/audio_openai_tts/plugin.py (97%) rename src/pygpt_net/{core/plugin/audio_openai_tts => plugin/audio_openai_whisper}/__init__.py (100%) rename src/pygpt_net/{core => }/plugin/audio_openai_whisper/plugin.py (99%) rename src/pygpt_net/{core => }/plugin/base_plugin.py (98%) rename src/pygpt_net/{core/plugin/audio_openai_whisper => plugin/cmd_code_interpreter}/__init__.py (100%) rename src/pygpt_net/{core => }/plugin/cmd_code_interpreter/plugin.py (99%) rename src/pygpt_net/{core => }/plugin/cmd_custom/__init__.py (100%) rename src/pygpt_net/{core => }/plugin/cmd_custom/plugin.py (98%) rename src/pygpt_net/{core/plugin/cmd_code_interpreter => plugin/cmd_files}/__init__.py (100%) rename src/pygpt_net/{core => }/plugin/cmd_files/plugin.py (99%) rename src/pygpt_net/{core/plugin/cmd_files => plugin/cmd_web_google}/__init__.py (100%) rename src/pygpt_net/{core => }/plugin/cmd_web_google/plugin.py (98%) rename src/pygpt_net/{core => }/plugin/cmd_web_google/websearch.py (99%) rename src/pygpt_net/{core/plugin/cmd_web_google => plugin/real_time}/__init__.py (100%) rename src/pygpt_net/{core => }/plugin/real_time/plugin.py (96%) rename src/pygpt_net/{core/plugin/real_time => plugin/self_loop}/__init__.py (100%) rename src/pygpt_net/{core => }/plugin/self_loop/plugin.py (98%) rename src/pygpt_net/{core => }/provider/__init__.py (100%) rename src/pygpt_net/{core => }/provider/assistant/__init__.py (100%) rename src/pygpt_net/{core => }/provider/assistant/base.py (94%) rename src/pygpt_net/{core => }/provider/assistant/json_file.py (94%) rename src/pygpt_net/{core => }/provider/attachment/__init__.py (100%) rename src/pygpt_net/{core => }/provider/attachment/base.py (94%) rename src/pygpt_net/{core => }/provider/attachment/json_file.py (96%) rename src/pygpt_net/{core => }/provider/config/__init__.py (100%) rename src/pygpt_net/{core => }/provider/config/base.py (94%) rename src/pygpt_net/{core => }/provider/config/json_file.py (99%) rename src/pygpt_net/{core => }/provider/ctx/__init__.py (100%) rename src/pygpt_net/{core => }/provider/ctx/base.py (94%) rename src/pygpt_net/{core => }/provider/ctx/db_sqlite.py (85%) rename src/pygpt_net/{core => }/provider/ctx/json_file.py (98%) rename src/pygpt_net/{core => }/provider/history/__init__.py (100%) rename src/pygpt_net/{core => }/provider/history/base.py (92%) rename src/pygpt_net/{core => }/provider/history/txt_file.py (95%) rename src/pygpt_net/{core => }/provider/mode/__init__.py (100%) rename src/pygpt_net/{core => }/provider/mode/base.py (93%) rename src/pygpt_net/{core => }/provider/mode/json_file.py (95%) rename src/pygpt_net/{core => }/provider/model/__init__.py (100%) rename src/pygpt_net/{core => }/provider/model/base.py (94%) rename src/pygpt_net/{core => }/provider/model/json_file.py (97%) rename src/pygpt_net/{core => }/provider/notepad/__init__.py (100%) rename src/pygpt_net/{core => }/provider/notepad/base.py (94%) rename src/pygpt_net/{core => }/provider/notepad/json_file.py (97%) rename src/pygpt_net/{core => }/provider/preset/__init__.py (100%) rename src/pygpt_net/{core => }/provider/preset/base.py (94%) rename src/pygpt_net/{core => }/provider/preset/json_file.py (97%) rename src/pygpt_net/{core/plugin/self_loop => ui}/__init__.py (100%) rename src/pygpt_net/{core/ui => ui/dialog}/__init__.py (100%) rename src/pygpt_net/{core => }/ui/dialog/about.py (95%) rename src/pygpt_net/{core => }/ui/dialog/assistant.py (95%) rename src/pygpt_net/{core => }/ui/dialog/changelog.py (91%) rename src/pygpt_net/{core => }/ui/dialog/debug.py (92%) rename src/pygpt_net/{core => }/ui/dialog/editor.py (93%) rename src/pygpt_net/{core => }/ui/dialog/image.py (88%) rename src/pygpt_net/{core => }/ui/dialog/logger.py (90%) rename src/pygpt_net/{core => }/ui/dialog/plugins.py (95%) rename src/pygpt_net/{core => }/ui/dialog/preset.py (94%) rename src/pygpt_net/{core => }/ui/dialog/rename.py (84%) rename src/pygpt_net/{core => }/ui/dialog/settings.py (95%) rename src/pygpt_net/{core => }/ui/dialog/start.py (93%) rename src/pygpt_net/{core => }/ui/dialog/update.py (85%) rename src/pygpt_net/{core => }/ui/dialogs.py (82%) rename src/pygpt_net/{core => }/ui/layout/__init__.py (100%) rename src/pygpt_net/{core => }/ui/layout/chat/__init__.py (100%) rename src/pygpt_net/{core => }/ui/layout/chat/attachments.py (96%) rename src/pygpt_net/{core => }/ui/layout/chat/attachments_uploaded.py (95%) rename src/pygpt_net/{core => }/ui/layout/chat/input.py (95%) rename src/pygpt_net/{core => }/ui/layout/chat/main.py (89%) rename src/pygpt_net/{core => }/ui/layout/chat/markdown.py (100%) rename src/pygpt_net/{core => }/ui/layout/chat/output.py (89%) rename src/pygpt_net/{core => }/ui/layout/ctx/__init__.py (100%) rename src/pygpt_net/{core => }/ui/layout/ctx/ctx_list.py (96%) rename src/pygpt_net/{core => }/ui/layout/ctx/main.py (86%) rename src/pygpt_net/{core => }/ui/layout/ctx/video.py (88%) rename src/pygpt_net/{core => }/ui/layout/status.py (91%) rename src/pygpt_net/{core => }/ui/layout/toolbox/__init__.py (100%) rename src/pygpt_net/{core => }/ui/layout/toolbox/assistants.py (96%) rename src/pygpt_net/{core => }/ui/layout/toolbox/footer.py (91%) rename src/pygpt_net/{core => }/ui/layout/toolbox/image.py (92%) rename src/pygpt_net/{core => }/ui/layout/toolbox/main.py (84%) rename src/pygpt_net/{core => }/ui/layout/toolbox/mode.py (95%) rename src/pygpt_net/{core => }/ui/layout/toolbox/model.py (95%) rename src/pygpt_net/{core => }/ui/layout/toolbox/presets.py (94%) rename src/pygpt_net/{core => }/ui/layout/toolbox/prompt.py (94%) rename src/pygpt_net/{core => }/ui/layout/toolbox/vision.py (96%) rename src/pygpt_net/{core => }/ui/main.py (91%) rename src/pygpt_net/{core => }/ui/menu.py (99%) rename src/pygpt_net/{core => }/ui/widget/__init__.py (100%) rename src/pygpt_net/{core => }/ui/widget/audio/__init__.py (100%) rename src/pygpt_net/{core => }/ui/widget/audio/input.py (94%) rename src/pygpt_net/{core => }/ui/widget/audio/output.py (96%) rename src/pygpt_net/{core => }/ui/widget/dialog/__init__.py (100%) rename src/pygpt_net/{core => }/ui/widget/dialog/alert.py (92%) rename src/pygpt_net/{core => }/ui/widget/dialog/confirm.py (95%) rename src/pygpt_net/{core => }/ui/widget/dialog/debug.py (96%) rename src/pygpt_net/{core => }/ui/widget/dialog/editor.py (96%) rename src/pygpt_net/{core => }/ui/widget/dialog/editor_file.py (96%) rename src/pygpt_net/{core => }/ui/widget/dialog/image.py (93%) rename src/pygpt_net/{core => }/ui/widget/dialog/info.py (96%) rename src/pygpt_net/{core => }/ui/widget/dialog/logger.py (96%) rename src/pygpt_net/{core => }/ui/widget/dialog/rename.py (92%) rename src/pygpt_net/{core => }/ui/widget/dialog/settings.py (96%) rename src/pygpt_net/{core => }/ui/widget/dialog/settings_plugin.py (96%) rename src/pygpt_net/{core => }/ui/widget/dialog/update.py (96%) rename src/pygpt_net/{core => }/ui/widget/element/__init__.py (100%) rename src/pygpt_net/{core => }/ui/widget/element/group.py (97%) rename src/pygpt_net/{core => }/ui/widget/element/url.py (96%) rename src/pygpt_net/{core => }/ui/widget/filesystem/__init__.py (100%) rename src/pygpt_net/{core => }/ui/widget/filesystem/explorer.py (97%) rename src/pygpt_net/{core => }/ui/widget/image/__init__.py (100%) rename src/pygpt_net/{core => }/ui/widget/image/display.py (96%) rename src/pygpt_net/{core => }/ui/widget/lists/__init__.py (100%) rename src/pygpt_net/{core => }/ui/widget/lists/assistant.py (94%) rename src/pygpt_net/{core => }/ui/widget/lists/attachment.py (96%) rename src/pygpt_net/{core => }/ui/widget/lists/base.py (97%) rename src/pygpt_net/{core => }/ui/widget/lists/context.py (94%) rename src/pygpt_net/{core => }/ui/widget/lists/plugin.py (91%) rename src/pygpt_net/{core => }/ui/widget/lists/preset.py (95%) rename src/pygpt_net/{core => }/ui/widget/lists/uploaded.py (96%) rename src/pygpt_net/{core => }/ui/widget/option/__init__.py (100%) rename src/pygpt_net/{core => }/ui/widget/option/checkbox.py (96%) rename src/pygpt_net/{core => }/ui/widget/option/dictionary.py (98%) rename src/pygpt_net/{core => }/ui/widget/option/input.py (97%) rename src/pygpt_net/{core => }/ui/widget/option/slider.py (94%) rename src/pygpt_net/{core => }/ui/widget/option/textarea.py (96%) rename src/pygpt_net/{core => }/ui/widget/textarea/__init__.py (100%) rename src/pygpt_net/{core => }/ui/widget/textarea/input.py (97%) rename src/pygpt_net/{core => }/ui/widget/textarea/name.py (95%) rename src/pygpt_net/{core => }/ui/widget/textarea/notepad.py (97%) rename src/pygpt_net/{core => }/ui/widget/textarea/output.py (97%) rename src/pygpt_net/{core => }/ui/widget/textarea/rename.py (96%) rename src/pygpt_net/{core => }/ui/widget/vision/__init__.py (100%) rename src/pygpt_net/{core => }/ui/widget/vision/camera.py (96%) rename src/pygpt_net/{core => }/updater.py (98%) rename src/pygpt_net/{core => }/utils.py (95%) diff --git a/pyproject.toml b/pyproject.toml index cae4f0ba8..f5117cd1a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,4 +44,4 @@ requires-python = ">=3.10" Homepage = "https://github.com/szczyglis-dev/py-gpt" [project.scripts] -pygpt = "pygpt_net.core.app:run" +pygpt = "pygpt_net.app:run" diff --git a/run.py b/run.py index 2f1a8b5f4..3aced51ae 100755 --- a/run.py +++ b/run.py @@ -14,7 +14,7 @@ sys.path.insert(0, str((Path(__file__).parent / 'src').resolve())) -from pygpt_net.core.app import run +from pygpt_net.app import run if __name__ == '__main__': run() diff --git a/src/pygpt_net/__init__.py b/src/pygpt_net/__init__.py index 3a9cbb4d4..55322f4f9 100755 --- a/src/pygpt_net/__init__.py +++ b/src/pygpt_net/__init__.py @@ -13,7 +13,7 @@ __copyright__ = "Copyright 2023, Marcin Szczygliński" __credits__ = ["Marcin Szczygliński"] __license__ = "MIT" -__version__ = "2.0.55" +__version__ = "2.0.56" __build__ = "2023.12.25" __maintainer__ = "Marcin Szczygliński" __github__ = "https://github.com/szczyglis-dev/py-gpt" diff --git a/src/pygpt_net/app.py b/src/pygpt_net/app.py index 27aeb5b91..a580c5579 100755 --- a/src/pygpt_net/app.py +++ b/src/pygpt_net/app.py @@ -6,11 +6,307 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.05 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # +import os +import sys -from pygpt_net.core.app import run +from PySide6.QtCore import QTimer, Signal, Slot +from PySide6.QtGui import QScreen, QIcon +from PySide6.QtWidgets import (QApplication, QMainWindow) +from qt_material import QtStyleTools +from logging import ERROR, WARNING, INFO, DEBUG + +from pygpt_net.container import Container +from pygpt_net.controller.main import Controller +from pygpt_net.core.debugger import Debug +from pygpt_net.core.platform import Platform +from pygpt_net.ui.main import UI +from pygpt_net.utils import get_app_meta + +from pygpt_net.plugin.audio_azure.plugin import Plugin as AudioAzurePlugin +from pygpt_net.plugin.audio_openai_tts.plugin import Plugin as AudioOpenAITTSPlugin +from pygpt_net.plugin.audio_openai_whisper.plugin import Plugin as AudioOpenAIWhisperPlugin +from pygpt_net.plugin.cmd_code_interpreter.plugin import Plugin as CmdCodeInterpreterPlugin +from pygpt_net.plugin.cmd_custom.plugin import Plugin as CmdCustomCommandPlugin +from pygpt_net.plugin.cmd_files.plugin import Plugin as CmdFilesPlugin +from pygpt_net.plugin.cmd_web_google.plugin import Plugin as CmdWebGooglePlugin +from pygpt_net.plugin.real_time.plugin import Plugin as RealTimePlugin +from pygpt_net.plugin.self_loop.plugin import Plugin as SelfLoopPlugin + +from pygpt_net.llm.Anthropic import AnthropicLLM +from pygpt_net.llm.AzureOpenAI import AzureOpenAILLM +from pygpt_net.llm.HuggingFace import HuggingFaceLLM +from pygpt_net.llm.Llama2 import Llama2LLM +from pygpt_net.llm.Ollama import OllamaLLM +from pygpt_net.llm.OpenAI import OpenAILLM + + +Debug.init(ERROR) # <-- set logging level [ERROR|WARNING|INFO|DEBUG] + + +class MainWindow(QMainWindow, QtStyleTools): + statusChanged = Signal(str) + + def __init__(self): + """Main window""" + super().__init__() + self.timer = None + self.timer_interval = 30 + self.is_closing = False + + # load version info + self.meta = get_app_meta() + + # setup service container + self.app = Container(self) + self.app.init() + self.app.patch() # patch version if needed + + # setup controllers + self.controller = Controller(self) + + # init, load settings options, etc. + self.controller.init() + + # setup UI + self.ui = UI(self) + self.ui.init() + + # set window title + self.setWindowTitle('PyGPT - Desktop AI Assistant v{} | build {}'. + format(self.meta['version'], self.meta['build'])) + + # setup global signals + self.statusChanged.connect(self.update_status) + + def log(self, data, window=True): + """ + Log data to logger and console + + :param data: content to log + :param window: log to window + """ + self.controller.debug.log(data, window) + + def dispatch(self, event, all=False): + """ + Dispatch event to plugins and other listeners + + :param event: event object + :param all: dispatch to all listeners (plugins, etc.) + """ + self.app.dispatcher.dispatch(event, all) + + def add_plugin(self, plugin): + """ + Add plugin to app + + :param plugin: plugin instance + """ + self.app.plugins.register(plugin) + + def add_llm(self, llm): + """ + Add Langchain LLM wrapper to app + + :param llm: LLM wrapper instance + """ + self.app.chain.register(llm.id, llm) + + def setup(self): + """Setup app""" + self.controller.setup() + self.controller.plugins.setup() + self.controller.post_setup() + self.timer = QTimer() + self.timer.timeout.connect(self.update) + self.timer.start(self.timer_interval) + self.post_timer = QTimer() + self.post_timer.timeout.connect(self.post_update) + self.post_timer.start(1000) + + def post_setup(self): + """Called after setup""" + self.controller.layout.post_setup() + + def post_update(self): + """Called on post-update (slow)""" + self.app.debug.update() + + def update(self): + """Called on every update""" + self.controller.update() + + def set_status(self, text): + """ + Update status text + + :param text: status text + """ + self.ui.nodes['status'].setText(str(text)) + + @Slot(str) + def update_status(self, text): + """ + Update status text + + :param text: status text + """ + self.set_status(text) + + def closeEvent(self, event): + """ + Handle close event + + :param event: close event + """ + self.is_closing = True + print("Closing...") + print("Sending terminate signal to plugins...") + self.controller.plugins.destroy() + print("Saving notepad...") + self.controller.notepad.save_all() + print("Saving layout state...") + self.controller.layout.save() + print("Stopping timers...") + self.timer.stop() + self.post_timer.stop() + print("Saving config...") + self.app.config.save() + print("Saving presets...") + self.app.presets.save_all() + print("Exiting...") + event.accept() # let the window close + + +class Launcher: + def __init__(self): + """Launcher""" + self.app = None + self.window = None + + def init(self): + """Initialize app""" + Platform.prepare() # setup platform specific options + + self.app = QApplication(sys.argv) + self.window = MainWindow() + self.app.setWindowIcon(QIcon(os.path.join(self.window.app.config.get_root_path(), 'data', 'icon.ico'))) + self.app.aboutToQuit.connect(self.app.quit) + + def add_plugin(self, plugin=None): + """ + Register plugin + + :param plugin: plugin instance + """ + self.window.add_plugin(plugin) + + def add_llm(self, llm=None): + """ + Register LLM wrapper + + :param llm: LLM wrapper instance + """ + self.window.add_llm(llm) + + def run(self): + """Run app""" + margin = 50 + try: + self.window.setup() + available_geometry = self.window.screen().availableGeometry() + pos = QScreen.availableGeometry(QApplication.primaryScreen()).topLeft() + self.window.resize(available_geometry.width() - margin, available_geometry.height() - margin) + self.window.show() + self.window.move(pos) + self.window.post_setup() + sys.exit(self.app.exec()) + except SystemExit: + print("Closing...") + except Exception as e: + print("Fatal error, exiting...") + self.window.app.debug.log(e) + + +def run(plugins=None, llms=None): + """ + PyGPT launcher. + + :param plugins: List containing custom plugin instances. + :param llms: List containing custom LLMs (Large Language Models) wrapper instances. + + Extending PyGPT with custom plugins and LLMs wrappers: + + - You can pass custom plugin instances and LLMs wrappers to the launcher. + - This is useful if you want to extend PyGPT with your own plugins and LLMs. + + To register custom plugins: + + - Pass a list with the plugin instances as the first argument. + + To register custom LLMs wrappers: + + - Pass a list with the LLMs wrappers instances as the second argument. + + Example: + -------- + :: + + from pygpt_net.app import run + from my_plugins import MyCustomPlugin, MyOtherCustomPlugin + from my_llms import MyCustomLLM + + plugins = [ + MyCustomPlugin(), + MyOtherCustomPlugin(), + ] + llms = [ + MyCustomLLM(), + ] + + run(plugins=plugins, llms=llms) + + """ + + # initialize app launcher + launcher = Launcher() + launcher.init() + + # register base plugins + launcher.add_plugin(SelfLoopPlugin()) + launcher.add_plugin(RealTimePlugin()) + launcher.add_plugin(AudioAzurePlugin()) + launcher.add_plugin(AudioOpenAITTSPlugin()) + launcher.add_plugin(AudioOpenAIWhisperPlugin()) + launcher.add_plugin(CmdWebGooglePlugin()) + launcher.add_plugin(CmdFilesPlugin()) + launcher.add_plugin(CmdCodeInterpreterPlugin()) + launcher.add_plugin(CmdCustomCommandPlugin()) + + # register custom plugins + if plugins is not None: + for plugin in plugins: + launcher.add_plugin(plugin) + + # register base langchain LLMs + launcher.add_llm(OpenAILLM()) + launcher.add_llm(AzureOpenAILLM()) + launcher.add_llm(AnthropicLLM()) + launcher.add_llm(HuggingFaceLLM()) + launcher.add_llm(Llama2LLM()) + launcher.add_llm(OllamaLLM()) + + # register custom langchain LLMs + if llms is not None: + for llm in llms: + launcher.add_llm(llm) + + # run app + launcher.run() + if __name__ == '__main__': run() diff --git a/src/pygpt_net/core/config.py b/src/pygpt_net/config.py similarity index 97% rename from src/pygpt_net/core/config.py rename to src/pygpt_net/config.py index 28e98fc55..2998cfeef 100755 --- a/src/pygpt_net/core/config.py +++ b/src/pygpt_net/config.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import copy import datetime @@ -14,7 +14,7 @@ import re from pathlib import Path -from pygpt_net.core.provider.config.json_file import JsonFileProvider +from pygpt_net.provider.config.json_file import JsonFileProvider class Config: @@ -81,7 +81,7 @@ def get_root_path(self): if __file__.endswith('.pyc'): # if compiled with pyinstaller return os.path.abspath('.') else: - return os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) + return os.path.abspath(os.path.dirname(__file__)) def get_user_path(self): """ diff --git a/src/pygpt_net/core/container.py b/src/pygpt_net/container.py similarity index 93% rename from src/pygpt_net/core/container.py rename to src/pygpt_net/container.py index 917299957..3da080f0a 100755 --- a/src/pygpt_net/core/container.py +++ b/src/pygpt_net/container.py @@ -6,15 +6,15 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # +from pygpt_net.config import Config from pygpt_net.core.assistants import Assistants from pygpt_net.core.attachments import Attachments from pygpt_net.core.camera import Camera from pygpt_net.core.chain import Chain from pygpt_net.core.command import Command -from pygpt_net.core.config import Config from pygpt_net.core.ctx import Ctx from pygpt_net.core.debugger import Debug from pygpt_net.core.dispatcher import Dispatcher @@ -24,7 +24,6 @@ from pygpt_net.core.history import History from pygpt_net.core.image import Image from pygpt_net.core.info import Info -from pygpt_net.core.installer import Installer from pygpt_net.core.models import Models from pygpt_net.core.modes import Modes from pygpt_net.core.notepad import Notepad @@ -32,7 +31,8 @@ from pygpt_net.core.plugins import Plugins from pygpt_net.core.presets import Presets from pygpt_net.core.settings import Settings -from pygpt_net.core.updater import Updater +from pygpt_net.installer import Installer +from pygpt_net.updater import Updater class Container: diff --git a/src/pygpt_net/core/__init__.py b/src/pygpt_net/controller/__init__.py similarity index 100% rename from src/pygpt_net/core/__init__.py rename to src/pygpt_net/controller/__init__.py diff --git a/src/pygpt_net/core/controller/assistant.py b/src/pygpt_net/controller/assistant.py similarity index 99% rename from src/pygpt_net/core/controller/assistant.py rename to src/pygpt_net/controller/assistant.py index 6580a897d..79593141a 100755 --- a/src/pygpt_net/core/controller/assistant.py +++ b/src/pygpt_net/controller/assistant.py @@ -6,12 +6,12 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import webbrowser -from pygpt_net.core.utils import trans +from pygpt_net.utils import trans class Assistant: diff --git a/src/pygpt_net/core/controller/assistant_files.py b/src/pygpt_net/controller/assistant_files.py similarity index 99% rename from src/pygpt_net/core/controller/assistant_files.py rename to src/pygpt_net/controller/assistant_files.py index 6fd360d1a..f3baa48ce 100755 --- a/src/pygpt_net/core/controller/assistant_files.py +++ b/src/pygpt_net/controller/assistant_files.py @@ -6,12 +6,12 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import os -from pygpt_net.core.utils import trans +from pygpt_net.utils import trans class AssistantFiles: diff --git a/src/pygpt_net/core/controller/assistant_thread.py b/src/pygpt_net/controller/assistant_thread.py similarity index 98% rename from src/pygpt_net/core/controller/assistant_thread.py rename to src/pygpt_net/controller/assistant_thread.py index a025ab912..4e958046d 100755 --- a/src/pygpt_net/core/controller/assistant_thread.py +++ b/src/pygpt_net/controller/assistant_thread.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import threading @@ -14,7 +14,7 @@ from PySide6.QtCore import QObject, Signal, Slot -from pygpt_net.core.utils import trans +from pygpt_net.utils import trans class AssistantThread: diff --git a/src/pygpt_net/core/controller/attachment.py b/src/pygpt_net/controller/attachment.py similarity index 99% rename from src/pygpt_net/core/controller/attachment.py rename to src/pygpt_net/controller/attachment.py index 634c007e3..b03b6fd43 100755 --- a/src/pygpt_net/core/controller/attachment.py +++ b/src/pygpt_net/controller/attachment.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import os @@ -15,7 +15,7 @@ from PySide6.QtWidgets import QFileDialog from pathlib import PurePath -from pygpt_net.core.utils import trans +from pygpt_net.utils import trans class Attachment: diff --git a/src/pygpt_net/core/controller/audio.py b/src/pygpt_net/controller/audio.py similarity index 98% rename from src/pygpt_net/core/controller/audio.py rename to src/pygpt_net/controller/audio.py index 802959b7d..b3337524f 100755 --- a/src/pygpt_net/core/controller/audio.py +++ b/src/pygpt_net/controller/audio.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from pygpt_net.core.dispatcher import Event diff --git a/src/pygpt_net/core/controller/camera.py b/src/pygpt_net/controller/camera.py similarity index 98% rename from src/pygpt_net/core/controller/camera.py rename to src/pygpt_net/controller/camera.py index a3ee33349..a889a3de1 100755 --- a/src/pygpt_net/core/controller/camera.py +++ b/src/pygpt_net/controller/camera.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import datetime @@ -17,7 +17,7 @@ from PySide6.QtGui import QImage, QPixmap, Qt from pygpt_net.core.camera import CameraThread -from pygpt_net.core.utils import trans +from pygpt_net.utils import trans class Camera: diff --git a/src/pygpt_net/core/controller/command.py b/src/pygpt_net/controller/command.py similarity index 98% rename from src/pygpt_net/core/controller/command.py rename to src/pygpt_net/controller/command.py index 72ce4254c..1a73ec12c 100644 --- a/src/pygpt_net/core/controller/command.py +++ b/src/pygpt_net/controller/command.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import json diff --git a/src/pygpt_net/core/controller/confirm.py b/src/pygpt_net/controller/confirm.py similarity index 98% rename from src/pygpt_net/core/controller/confirm.py rename to src/pygpt_net/controller/confirm.py index f39cc9e67..1aae44159 100755 --- a/src/pygpt_net/core/controller/confirm.py +++ b/src/pygpt_net/controller/confirm.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.17 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # class Confirm: diff --git a/src/pygpt_net/core/controller/ctx.py b/src/pygpt_net/controller/ctx.py similarity index 99% rename from src/pygpt_net/core/controller/ctx.py rename to src/pygpt_net/controller/ctx.py index 64587db3b..c289b1d41 100755 --- a/src/pygpt_net/core/controller/ctx.py +++ b/src/pygpt_net/controller/ctx.py @@ -6,10 +6,10 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # -from pygpt_net.core.utils import trans +from pygpt_net.utils import trans class Ctx: diff --git a/src/pygpt_net/core/controller/debug.py b/src/pygpt_net/controller/debug.py similarity index 98% rename from src/pygpt_net/core/controller/debug.py rename to src/pygpt_net/controller/debug.py index ed0e33289..f02a99016 100755 --- a/src/pygpt_net/core/controller/debug.py +++ b/src/pygpt_net/controller/debug.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from datetime import datetime diff --git a/src/pygpt_net/core/controller/files.py b/src/pygpt_net/controller/files.py similarity index 96% rename from src/pygpt_net/core/controller/files.py rename to src/pygpt_net/controller/files.py index fce5d6e55..15a6d44fc 100755 --- a/src/pygpt_net/core/controller/files.py +++ b/src/pygpt_net/controller/files.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import os @@ -14,7 +14,7 @@ from pathlib import PurePath from showinfm import show_in_file_manager -from pygpt_net.core.utils import trans +from pygpt_net.utils import trans class Files: diff --git a/src/pygpt_net/core/controller/image.py b/src/pygpt_net/controller/image.py similarity index 97% rename from src/pygpt_net/core/controller/image.py rename to src/pygpt_net/controller/image.py index 137306682..18322d12a 100755 --- a/src/pygpt_net/core/controller/image.py +++ b/src/pygpt_net/controller/image.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import os @@ -17,9 +17,9 @@ from PySide6 import QtGui, QtCore from PySide6.QtWidgets import QFileDialog -from pygpt_net.core.item.ctx import CtxItem +from pygpt_net.item.ctx import CtxItem from pygpt_net.core.dispatcher import Event -from pygpt_net.core.utils import trans +from pygpt_net.utils import trans class Image: diff --git a/src/pygpt_net/core/controller/info.py b/src/pygpt_net/controller/info.py similarity index 97% rename from src/pygpt_net/core/controller/info.py rename to src/pygpt_net/controller/info.py index 8003eee17..778edccfd 100755 --- a/src/pygpt_net/core/controller/info.py +++ b/src/pygpt_net/controller/info.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.18 14:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import webbrowser diff --git a/src/pygpt_net/core/controller/input.py b/src/pygpt_net/controller/input.py similarity index 99% rename from src/pygpt_net/core/controller/input.py rename to src/pygpt_net/controller/input.py index d3aeaa8f8..4d49aa585 100755 --- a/src/pygpt_net/core/controller/input.py +++ b/src/pygpt_net/controller/input.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import threading @@ -15,9 +15,9 @@ from PySide6.QtGui import QTextCursor from PySide6.QtWidgets import QApplication -from pygpt_net.core.item.ctx import CtxItem +from pygpt_net.item.ctx import CtxItem from pygpt_net.core.dispatcher import Event -from pygpt_net.core.utils import trans +from pygpt_net.utils import trans class Input: diff --git a/src/pygpt_net/core/controller/lang.py b/src/pygpt_net/controller/lang.py similarity index 99% rename from src/pygpt_net/core/controller/lang.py rename to src/pygpt_net/controller/lang.py index d3ffa12fc..04185db42 100755 --- a/src/pygpt_net/core/controller/lang.py +++ b/src/pygpt_net/controller/lang.py @@ -6,12 +6,12 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtGui import QAction, Qt -from pygpt_net.core.utils import trans +from pygpt_net.utils import trans class Lang: diff --git a/src/pygpt_net/core/controller/launcher.py b/src/pygpt_net/controller/launcher.py similarity index 96% rename from src/pygpt_net/core/controller/launcher.py rename to src/pygpt_net/controller/launcher.py index 262dc49b4..067c6f738 100755 --- a/src/pygpt_net/core/controller/launcher.py +++ b/src/pygpt_net/controller/launcher.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # class Launcher: diff --git a/src/pygpt_net/core/controller/layout.py b/src/pygpt_net/controller/layout.py similarity index 99% rename from src/pygpt_net/core/controller/layout.py rename to src/pygpt_net/controller/layout.py index c6f43d2dd..09c35da48 100755 --- a/src/pygpt_net/core/controller/layout.py +++ b/src/pygpt_net/controller/layout.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # diff --git a/src/pygpt_net/core/controller/main.py b/src/pygpt_net/controller/main.py similarity index 63% rename from src/pygpt_net/core/controller/main.py rename to src/pygpt_net/controller/main.py index c7f8b60f8..c7246f4c5 100755 --- a/src/pygpt_net/core/controller/main.py +++ b/src/pygpt_net/controller/main.py @@ -6,35 +6,35 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # -from pygpt_net.core.controller.assistant import Assistant -from pygpt_net.core.controller.assistant_files import AssistantFiles -from pygpt_net.core.controller.assistant_thread import AssistantThread -from pygpt_net.core.controller.attachment import Attachment -from pygpt_net.core.controller.audio import Audio -from pygpt_net.core.controller.camera import Camera -from pygpt_net.core.controller.command import Command -from pygpt_net.core.controller.confirm import Confirm -from pygpt_net.core.controller.ctx import Ctx -from pygpt_net.core.controller.debug import Debug -from pygpt_net.core.controller.files import Files -from pygpt_net.core.controller.image import Image -from pygpt_net.core.controller.info import Info -from pygpt_net.core.controller.input import Input -from pygpt_net.core.controller.lang import Lang -from pygpt_net.core.controller.launcher import Launcher -from pygpt_net.core.controller.layout import Layout -from pygpt_net.core.controller.model import Model -from pygpt_net.core.controller.notepad import Notepad -from pygpt_net.core.controller.output import Output -from pygpt_net.core.controller.plugins import Plugins -from pygpt_net.core.controller.presets import Presets -from pygpt_net.core.controller.settings import Settings -from pygpt_net.core.controller.summarize import Summarize -from pygpt_net.core.controller.theme import Theme -from pygpt_net.core.controller.ui import UI +from pygpt_net.controller.assistant import Assistant +from pygpt_net.controller.assistant_files import AssistantFiles +from pygpt_net.controller.assistant_thread import AssistantThread +from pygpt_net.controller.attachment import Attachment +from pygpt_net.controller.audio import Audio +from pygpt_net.controller.camera import Camera +from pygpt_net.controller.command import Command +from pygpt_net.controller.confirm import Confirm +from pygpt_net.controller.ctx import Ctx +from pygpt_net.controller.debug import Debug +from pygpt_net.controller.files import Files +from pygpt_net.controller.image import Image +from pygpt_net.controller.info import Info +from pygpt_net.controller.input import Input +from pygpt_net.controller.lang import Lang +from pygpt_net.controller.launcher import Launcher +from pygpt_net.controller.layout import Layout +from pygpt_net.controller.model import Model +from pygpt_net.controller.notepad import Notepad +from pygpt_net.controller.output import Output +from pygpt_net.controller.plugins import Plugins +from pygpt_net.controller.presets import Presets +from pygpt_net.controller.settings import Settings +from pygpt_net.controller.summarize import Summarize +from pygpt_net.controller.theme import Theme +from pygpt_net.controller.ui import UI class Controller: diff --git a/src/pygpt_net/core/controller/model.py b/src/pygpt_net/controller/model.py similarity index 99% rename from src/pygpt_net/core/controller/model.py rename to src/pygpt_net/controller/model.py index 06a136ddb..1c0c27900 100755 --- a/src/pygpt_net/core/controller/model.py +++ b/src/pygpt_net/controller/model.py @@ -6,10 +6,10 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # -from pygpt_net.core.utils import trans +from pygpt_net.utils import trans class Model: diff --git a/src/pygpt_net/core/controller/notepad.py b/src/pygpt_net/controller/notepad.py similarity index 97% rename from src/pygpt_net/core/controller/notepad.py rename to src/pygpt_net/controller/notepad.py index 8ffda6db4..350a4f133 100755 --- a/src/pygpt_net/core/controller/notepad.py +++ b/src/pygpt_net/controller/notepad.py @@ -6,12 +6,12 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import datetime -from pygpt_net.core.item.notepad import NotepadItem +from pygpt_net.item.notepad import NotepadItem class Notepad: diff --git a/src/pygpt_net/core/controller/output.py b/src/pygpt_net/controller/output.py similarity index 98% rename from src/pygpt_net/core/controller/output.py rename to src/pygpt_net/controller/output.py index ea5b410d2..bbe5f59ab 100755 --- a/src/pygpt_net/core/controller/output.py +++ b/src/pygpt_net/controller/output.py @@ -6,16 +6,16 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from datetime import datetime from PySide6.QtGui import QTextCursor from PySide6.QtWidgets import QApplication -from pygpt_net.core.item.ctx import CtxItem +from pygpt_net.item.ctx import CtxItem from pygpt_net.core.dispatcher import Event -from pygpt_net.core.utils import trans +from pygpt_net.utils import trans class Output: diff --git a/src/pygpt_net/core/controller/plugins.py b/src/pygpt_net/controller/plugins.py similarity index 99% rename from src/pygpt_net/core/controller/plugins.py rename to src/pygpt_net/controller/plugins.py index 928a041d5..58a36aab1 100755 --- a/src/pygpt_net/core/controller/plugins.py +++ b/src/pygpt_net/controller/plugins.py @@ -6,13 +6,13 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtGui import QAction from pygpt_net.core.dispatcher import Event -from pygpt_net.core.utils import trans +from pygpt_net.utils import trans class Plugins: diff --git a/src/pygpt_net/core/controller/presets.py b/src/pygpt_net/controller/presets.py similarity index 99% rename from src/pygpt_net/core/controller/presets.py rename to src/pygpt_net/controller/presets.py index d5777a350..18b36e987 100755 --- a/src/pygpt_net/core/controller/presets.py +++ b/src/pygpt_net/controller/presets.py @@ -6,15 +6,15 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import datetime import os import re -from pygpt_net.core.item.preset import PresetItem -from pygpt_net.core.utils import trans +from pygpt_net.item.preset import PresetItem +from pygpt_net.utils import trans class Presets: diff --git a/src/pygpt_net/core/controller/settings.py b/src/pygpt_net/controller/settings.py similarity index 99% rename from src/pygpt_net/core/controller/settings.py rename to src/pygpt_net/controller/settings.py index 916f4cd80..30856352a 100755 --- a/src/pygpt_net/core/controller/settings.py +++ b/src/pygpt_net/controller/settings.py @@ -6,13 +6,13 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import os import copy -from pygpt_net.core.utils import trans +from pygpt_net.utils import trans class Settings: diff --git a/src/pygpt_net/core/controller/summarize.py b/src/pygpt_net/controller/summarize.py similarity index 97% rename from src/pygpt_net/core/controller/summarize.py rename to src/pygpt_net/controller/summarize.py index 0885c0821..f424c36e3 100644 --- a/src/pygpt_net/core/controller/summarize.py +++ b/src/pygpt_net/controller/summarize.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import threading diff --git a/src/pygpt_net/core/controller/theme.py b/src/pygpt_net/controller/theme.py similarity index 99% rename from src/pygpt_net/core/controller/theme.py rename to src/pygpt_net/controller/theme.py index d174885c9..167f7d798 100755 --- a/src/pygpt_net/core/controller/theme.py +++ b/src/pygpt_net/controller/theme.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import json @@ -14,7 +14,7 @@ from PySide6.QtGui import QAction -from pygpt_net.core.utils import trans +from pygpt_net.utils import trans class Theme: diff --git a/src/pygpt_net/core/controller/ui.py b/src/pygpt_net/controller/ui.py similarity index 99% rename from src/pygpt_net/core/controller/ui.py rename to src/pygpt_net/controller/ui.py index 7855c4ad3..fe701b70b 100755 --- a/src/pygpt_net/core/controller/ui.py +++ b/src/pygpt_net/controller/ui.py @@ -6,12 +6,12 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from pygpt_net.core.dispatcher import Event from pygpt_net.core.tokens import num_tokens_prompt, num_tokens_only, num_tokens_extra -from pygpt_net.core.utils import trans +from pygpt_net.utils import trans class UI: diff --git a/src/pygpt_net/core/app.py b/src/pygpt_net/core/app.py deleted file mode 100755 index 74360ce8d..000000000 --- a/src/pygpt_net/core/app.py +++ /dev/null @@ -1,308 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# ================================================== # -# This file is a part of PYGPT package # -# Website: https://pygpt.net # -# GitHub: https://github.com/szczyglis-dev/py-gpt # -# MIT License # -# Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # -# ================================================== # - -import os -import sys - -from PySide6.QtCore import QTimer, Signal, Slot -from PySide6.QtGui import QScreen, QIcon -from PySide6.QtWidgets import (QApplication, QMainWindow) -from qt_material import QtStyleTools -from logging import ERROR, WARNING, INFO, DEBUG - -from pygpt_net.core.container import Container -from pygpt_net.core.controller.main import Controller -from pygpt_net.core.debugger import Debug -from pygpt_net.core.platform import Platform -from pygpt_net.core.ui.main import UI -from pygpt_net.core.utils import get_app_meta - -from pygpt_net.core.plugin.audio_azure.plugin import Plugin as AudioAzurePlugin -from pygpt_net.core.plugin.audio_openai_tts.plugin import Plugin as AudioOpenAITTSPlugin -from pygpt_net.core.plugin.audio_openai_whisper.plugin import Plugin as AudioOpenAIWhisperPlugin -from pygpt_net.core.plugin.cmd_code_interpreter.plugin import Plugin as CmdCodeInterpreterPlugin -from pygpt_net.core.plugin.cmd_custom.plugin import Plugin as CmdCustomCommandPlugin -from pygpt_net.core.plugin.cmd_files.plugin import Plugin as CmdFilesPlugin -from pygpt_net.core.plugin.cmd_web_google.plugin import Plugin as CmdWebGooglePlugin -from pygpt_net.core.plugin.real_time.plugin import Plugin as RealTimePlugin -from pygpt_net.core.plugin.self_loop.plugin import Plugin as SelfLoopPlugin - -from pygpt_net.core.llm.Anthropic import AnthropicLLM -from pygpt_net.core.llm.AzureOpenAI import AzureOpenAILLM -from pygpt_net.core.llm.HuggingFace import HuggingFaceLLM -from pygpt_net.core.llm.Llama2 import Llama2LLM -from pygpt_net.core.llm.Ollama import OllamaLLM -from pygpt_net.core.llm.OpenAI import OpenAILLM - - -Debug.init(ERROR) # <-- set logging level [ERROR|WARNING|INFO|DEBUG] - - -class MainWindow(QMainWindow, QtStyleTools): - statusChanged = Signal(str) - - def __init__(self): - """Main window""" - super().__init__() - self.timer = None - self.timer_interval = 30 - self.is_closing = False - - # load version info - self.meta = get_app_meta() - - # setup service container - self.app = Container(self) - self.app.init() - self.app.patch() # patch version if needed - - # setup controllers - self.controller = Controller(self) - - # init, load settings options, etc. - self.controller.init() - - # setup UI - self.ui = UI(self) - self.ui.init() - - # set window title - self.setWindowTitle('PyGPT - Desktop AI Assistant v{} | build {}'. - format(self.meta['version'], self.meta['build'])) - - # setup global signals - self.statusChanged.connect(self.update_status) - - def log(self, data, window=True): - """ - Log data to logger and console - - :param data: content to log - :param window: log to window - """ - self.controller.debug.log(data, window) - - def dispatch(self, event, all=False): - """ - Dispatch event to plugins and other listeners - - :param event: event object - :param all: dispatch to all listeners (plugins, etc.) - """ - self.app.dispatcher.dispatch(event, all) - - def add_plugin(self, plugin): - """ - Add plugin to app - - :param plugin: plugin instance - """ - self.app.plugins.register(plugin) - - def add_llm(self, llm): - """ - Add Langchain LLM wrapper to app - - :param llm: LLM wrapper instance - """ - self.app.chain.register(llm.id, llm) - - def setup(self): - """Setup app""" - self.controller.setup() - self.controller.plugins.setup() - self.controller.post_setup() - self.timer = QTimer() - self.timer.timeout.connect(self.update) - self.timer.start(self.timer_interval) - self.post_timer = QTimer() - self.post_timer.timeout.connect(self.post_update) - self.post_timer.start(1000) - - def post_setup(self): - """Called after setup""" - self.controller.layout.post_setup() - - def post_update(self): - """Called on post-update (slow)""" - self.app.debug.update() - - def update(self): - """Called on every update""" - self.controller.update() - - def set_status(self, text): - """ - Update status text - - :param text: status text - """ - self.ui.nodes['status'].setText(str(text)) - - @Slot(str) - def update_status(self, text): - """ - Update status text - - :param text: status text - """ - self.set_status(text) - - def closeEvent(self, event): - """ - Handle close event - - :param event: close event - """ - self.is_closing = True - print("Closing...") - print("Sending terminate signal to plugins...") - self.controller.plugins.destroy() - print("Saving notepad...") - self.controller.notepad.save_all() - print("Saving layout state...") - self.controller.layout.save() - print("Stopping timers...") - self.timer.stop() - self.post_timer.stop() - print("Saving config...") - self.app.config.save() - print("Saving presets...") - self.app.presets.save_all() - print("Exiting...") - event.accept() # let the window close - - -class Launcher: - def __init__(self): - """Launcher""" - self.app = None - self.window = None - - def init(self): - """Initialize app""" - Platform.prepare() # setup platform specific options - - self.app = QApplication(sys.argv) - self.window = MainWindow() - self.app.setWindowIcon(QIcon(os.path.join(self.window.app.config.get_root_path(), 'data', 'icon.ico'))) - self.app.aboutToQuit.connect(self.app.quit) - - def add_plugin(self, plugin=None): - """ - Register plugin - - :param plugin: plugin instance - """ - self.window.add_plugin(plugin) - - def add_llm(self, llm=None): - """ - Register LLM wrapper - - :param llm: LLM wrapper instance - """ - self.window.add_llm(llm) - - def run(self): - """Run app""" - margin = 50 - try: - self.window.setup() - available_geometry = self.window.screen().availableGeometry() - pos = QScreen.availableGeometry(QApplication.primaryScreen()).topLeft() - self.window.resize(available_geometry.width() - margin, available_geometry.height() - margin) - self.window.show() - self.window.move(pos) - self.window.post_setup() - sys.exit(self.app.exec()) - except SystemExit: - print("Closing...") - except Exception as e: - print("Fatal error, exiting...") - self.window.app.debug.log(e) - - -def run(plugins=None, llms=None): - """ - PyGPT launcher. - - :param plugins: List containing custom plugin instances. - :param llms: List containing custom LLMs (Large Language Models) wrapper instances. - - Extending PyGPT with custom plugins and LLMs wrappers: - - - You can pass custom plugin instances and LLMs wrappers to the launcher. - - This is useful if you want to extend PyGPT with your own plugins and LLMs. - - To register custom plugins: - - - Pass a list with the plugin instances as the first argument. - - To register custom LLMs wrappers: - - - Pass a list with the LLMs wrappers instances as the second argument. - - Example: - -------- - :: - - from pygpt_net.core.app import run - from my_plugins import MyCustomPlugin, MyOtherCustomPlugin - from my_llms import MyCustomLLM - - plugins = [ - MyCustomPlugin(), - MyOtherCustomPlugin(), - ] - llms = [ - MyCustomLLM(), - ] - - run(plugins=plugins, llms=llms) - - """ - - # initialize app launcher - launcher = Launcher() - launcher.init() - - # register base plugins - launcher.add_plugin(SelfLoopPlugin()) - launcher.add_plugin(RealTimePlugin()) - launcher.add_plugin(AudioAzurePlugin()) - launcher.add_plugin(AudioOpenAITTSPlugin()) - launcher.add_plugin(AudioOpenAIWhisperPlugin()) - launcher.add_plugin(CmdWebGooglePlugin()) - launcher.add_plugin(CmdFilesPlugin()) - launcher.add_plugin(CmdCodeInterpreterPlugin()) - launcher.add_plugin(CmdCustomCommandPlugin()) - - # register custom plugins - if plugins is not None: - for plugin in plugins: - launcher.add_plugin(plugin) - - # register base langchain LLMs - launcher.add_llm(OpenAILLM()) - launcher.add_llm(AzureOpenAILLM()) - launcher.add_llm(AnthropicLLM()) - launcher.add_llm(HuggingFaceLLM()) - launcher.add_llm(Llama2LLM()) - launcher.add_llm(OllamaLLM()) - - # register custom langchain LLMs - if llms is not None: - for llm in llms: - launcher.add_llm(llm) - - # run app - launcher.run() diff --git a/src/pygpt_net/core/assistants.py b/src/pygpt_net/core/assistants.py index 94e9bbe4d..7a68bec3f 100755 --- a/src/pygpt_net/core/assistants.py +++ b/src/pygpt_net/core/assistants.py @@ -6,12 +6,12 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # -from pygpt_net.core.item.assistant import AssistantItem -from pygpt_net.core.provider.assistant.json_file import JsonFileProvider +from pygpt_net.item.assistant import AssistantItem +from pygpt_net.provider.assistant.json_file import JsonFileProvider class Assistants: diff --git a/src/pygpt_net/core/attachments.py b/src/pygpt_net/core/attachments.py index c5b467046..954e51443 100755 --- a/src/pygpt_net/core/attachments.py +++ b/src/pygpt_net/core/attachments.py @@ -6,11 +6,11 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # -from pygpt_net.core.item.attachment import AttachmentItem -from pygpt_net.core.provider.attachment.json_file import JsonFileProvider +from pygpt_net.item.attachment import AttachmentItem +from pygpt_net.provider.attachment.json_file import JsonFileProvider class Attachments: diff --git a/src/pygpt_net/core/camera.py b/src/pygpt_net/core/camera.py index cd2b80ed3..6c53443e9 100755 --- a/src/pygpt_net/core/camera.py +++ b/src/pygpt_net/core/camera.py @@ -6,8 +6,9 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # + import os import cv2 diff --git a/src/pygpt_net/core/chain.py b/src/pygpt_net/core/chain.py index 54f6e3913..9310e413a 100755 --- a/src/pygpt_net/core/chain.py +++ b/src/pygpt_net/core/chain.py @@ -6,11 +6,11 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from langchain.schema import SystemMessage, HumanMessage, AIMessage -from pygpt_net.core.item.ctx import CtxItem +from pygpt_net.item.ctx import CtxItem class Chain: diff --git a/src/pygpt_net/core/command.py b/src/pygpt_net/core/command.py index ff4c61cda..141852f5d 100755 --- a/src/pygpt_net/core/command.py +++ b/src/pygpt_net/core/command.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import json diff --git a/src/pygpt_net/core/ctx.py b/src/pygpt_net/core/ctx.py index a0f48eab0..a1fc6dfb8 100755 --- a/src/pygpt_net/core/ctx.py +++ b/src/pygpt_net/core/ctx.py @@ -6,16 +6,16 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import datetime import os -from pygpt_net.core.item.ctx import CtxItem, CtxMeta +from pygpt_net.item.ctx import CtxItem, CtxMeta from pygpt_net.core.tokens import num_tokens_from_context_item -from pygpt_net.core.provider.ctx.json_file import JsonFileProvider -from pygpt_net.core.utils import trans +from pygpt_net.provider.ctx.json_file import JsonFileProvider +from pygpt_net.utils import trans class Ctx: diff --git a/src/pygpt_net/core/debugger.py b/src/pygpt_net/core/debugger.py index 239e69d2e..294e13ea7 100755 --- a/src/pygpt_net/core/debugger.py +++ b/src/pygpt_net/core/debugger.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import os @@ -20,15 +20,15 @@ from PySide6.QtGui import QStandardItemModel from PySide6.QtCore import QtMsgType, qInstallMessageHandler -from pygpt_net.core.debug.assistants import AssistantsDebug -from pygpt_net.core.debug.attachments import AttachmentsDebug -from pygpt_net.core.debug.config import ConfigDebug -from pygpt_net.core.debug.context import ContextDebug -from pygpt_net.core.debug.models import ModelsDebug -from pygpt_net.core.debug.plugins import PluginsDebug -from pygpt_net.core.debug.presets import PresetsDebug -from pygpt_net.core.debug.ui import UIDebug -from pygpt_net.core.config import Config +from pygpt_net.debug.assistants import AssistantsDebug +from pygpt_net.debug.attachments import AttachmentsDebug +from pygpt_net.debug.config import ConfigDebug +from pygpt_net.debug.context import ContextDebug +from pygpt_net.debug.models import ModelsDebug +from pygpt_net.debug.plugins import PluginsDebug +from pygpt_net.debug.presets import PresetsDebug +from pygpt_net.debug.ui import UIDebug +from pygpt_net.config import Config class Debug: diff --git a/src/pygpt_net/core/dispatcher.py b/src/pygpt_net/core/dispatcher.py index 7bd00c31e..c93a17c09 100755 --- a/src/pygpt_net/core/dispatcher.py +++ b/src/pygpt_net/core/dispatcher.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 01:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # class Dispatcher: diff --git a/src/pygpt_net/core/filesystem.py b/src/pygpt_net/core/filesystem.py index ea3314694..edb5945b2 100644 --- a/src/pygpt_net/core/filesystem.py +++ b/src/pygpt_net/core/filesystem.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import os diff --git a/src/pygpt_net/core/gpt.py b/src/pygpt_net/core/gpt.py index 00aadaf35..59c711b45 100755 --- a/src/pygpt_net/core/gpt.py +++ b/src/pygpt_net/core/gpt.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import base64 @@ -21,7 +21,7 @@ num_tokens_completion, num_tokens_only, ) -from pygpt_net.core.item.ctx import CtxItem +from pygpt_net.item.ctx import CtxItem class Gpt: diff --git a/src/pygpt_net/core/gpt_assistants.py b/src/pygpt_net/core/gpt_assistants.py index f3016ec13..e02da3a12 100755 --- a/src/pygpt_net/core/gpt_assistants.py +++ b/src/pygpt_net/core/gpt_assistants.py @@ -6,14 +6,14 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import json import os from openai import OpenAI -from pygpt_net.core.item.assistant import AssistantItem +from pygpt_net.item.assistant import AssistantItem class GptAssistants: diff --git a/src/pygpt_net/core/history.py b/src/pygpt_net/core/history.py index 03e1e8f95..5d44077cb 100755 --- a/src/pygpt_net/core/history.py +++ b/src/pygpt_net/core/history.py @@ -6,10 +6,10 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # -from pygpt_net.core.provider.history.txt_file import TxtFileProvider +from pygpt_net.provider.history.txt_file import TxtFileProvider class History: diff --git a/src/pygpt_net/core/image.py b/src/pygpt_net/core/image.py index 045398cea..2b100509f 100755 --- a/src/pygpt_net/core/image.py +++ b/src/pygpt_net/core/image.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import datetime diff --git a/src/pygpt_net/core/info.py b/src/pygpt_net/core/info.py index a122dc809..fe8b6b57b 100755 --- a/src/pygpt_net/core/info.py +++ b/src/pygpt_net/core/info.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.05 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # class Info: diff --git a/src/pygpt_net/core/locale.py b/src/pygpt_net/core/locale.py index fd58bb545..acf326a4a 100755 --- a/src/pygpt_net/core/locale.py +++ b/src/pygpt_net/core/locale.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import json @@ -14,7 +14,7 @@ import configparser import io -from pygpt_net.core.config import Config +from pygpt_net.config import Config class Locale: diff --git a/src/pygpt_net/core/models.py b/src/pygpt_net/core/models.py index 0f8c75ddd..f4bf4901c 100644 --- a/src/pygpt_net/core/models.py +++ b/src/pygpt_net/core/models.py @@ -6,10 +6,10 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # -from pygpt_net.core.provider.model.json_file import JsonFileProvider +from pygpt_net.provider.model.json_file import JsonFileProvider class Models: diff --git a/src/pygpt_net/core/modes.py b/src/pygpt_net/core/modes.py index 7c156e614..03a1e603f 100644 --- a/src/pygpt_net/core/modes.py +++ b/src/pygpt_net/core/modes.py @@ -6,10 +6,10 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # -from pygpt_net.core.provider.mode.json_file import JsonFileProvider +from pygpt_net.provider.mode.json_file import JsonFileProvider class Modes: diff --git a/src/pygpt_net/core/notepad.py b/src/pygpt_net/core/notepad.py index bce2b638a..3477143ae 100755 --- a/src/pygpt_net/core/notepad.py +++ b/src/pygpt_net/core/notepad.py @@ -6,12 +6,13 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # + import datetime -from pygpt_net.core.item.notepad import NotepadItem -from pygpt_net.core.provider.notepad.json_file import JsonFileProvider +from pygpt_net.item.notepad import NotepadItem +from pygpt_net.provider.notepad.json_file import JsonFileProvider class Notepad: diff --git a/src/pygpt_net/core/platform.py b/src/pygpt_net/core/platform.py index 2d24ce9ef..b0883b728 100755 --- a/src/pygpt_net/core/platform.py +++ b/src/pygpt_net/core/platform.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.20 21:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import platform @@ -14,7 +14,7 @@ from PySide6 import QtCore, QtWidgets -from pygpt_net.core.config import Config +from pygpt_net.config import Config class Platform: diff --git a/src/pygpt_net/core/plugins.py b/src/pygpt_net/core/plugins.py index 2126b5f79..88a4a2281 100755 --- a/src/pygpt_net/core/plugins.py +++ b/src/pygpt_net/core/plugins.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import copy diff --git a/src/pygpt_net/core/presets.py b/src/pygpt_net/core/presets.py index b6ed0f0a4..f392df483 100644 --- a/src/pygpt_net/core/presets.py +++ b/src/pygpt_net/core/presets.py @@ -6,13 +6,13 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import copy -from pygpt_net.core.item.preset import PresetItem -from pygpt_net.core.provider.preset.json_file import JsonFileProvider +from pygpt_net.item.preset import PresetItem +from pygpt_net.provider.preset.json_file import JsonFileProvider class Presets: diff --git a/src/pygpt_net/core/settings.py b/src/pygpt_net/core/settings.py index 98f4a1f58..ee963399b 100755 --- a/src/pygpt_net/core/settings.py +++ b/src/pygpt_net/core/settings.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import json diff --git a/src/pygpt_net/core/tokens.py b/src/pygpt_net/core/tokens.py index e7c83421f..59cc49325 100755 --- a/src/pygpt_net/core/tokens.py +++ b/src/pygpt_net/core/tokens.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.21 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import tiktoken diff --git a/src/pygpt_net/core/ui/dialog/__init__.py b/src/pygpt_net/core/ui/dialog/__init__.py deleted file mode 100755 index 022cf3ad8..000000000 --- a/src/pygpt_net/core/ui/dialog/__init__.py +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# ================================================== # -# This file is a part of PYGPT package # -# Website: https://pygpt.net # -# GitHub: https://github.com/szczyglis-dev/py-gpt # -# MIT License # -# Created By : Marcin Szczygliński # -# Updated Date: 2023.12.05 22:00:00 # -# ================================================== # diff --git a/src/pygpt_net/core/controller/__init__.py b/src/pygpt_net/debug/__init__.py similarity index 100% rename from src/pygpt_net/core/controller/__init__.py rename to src/pygpt_net/debug/__init__.py diff --git a/src/pygpt_net/core/debug/assistants.py b/src/pygpt_net/debug/assistants.py similarity index 96% rename from src/pygpt_net/core/debug/assistants.py rename to src/pygpt_net/debug/assistants.py index 62030d668..34de3b928 100755 --- a/src/pygpt_net/core/debug/assistants.py +++ b/src/pygpt_net/debug/assistants.py @@ -6,9 +6,8 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # -import os class AssistantsDebug: diff --git a/src/pygpt_net/core/debug/attachments.py b/src/pygpt_net/debug/attachments.py similarity index 96% rename from src/pygpt_net/core/debug/attachments.py rename to src/pygpt_net/debug/attachments.py index 725382472..94cff64b5 100755 --- a/src/pygpt_net/core/debug/attachments.py +++ b/src/pygpt_net/debug/attachments.py @@ -6,11 +6,9 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # -import os - class AttachmentsDebug: def __init__(self, window=None): diff --git a/src/pygpt_net/core/debug/config.py b/src/pygpt_net/debug/config.py similarity index 95% rename from src/pygpt_net/core/debug/config.py rename to src/pygpt_net/debug/config.py index 716e0417f..4aa3bd2df 100755 --- a/src/pygpt_net/core/debug/config.py +++ b/src/pygpt_net/debug/config.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import os diff --git a/src/pygpt_net/core/debug/context.py b/src/pygpt_net/debug/context.py similarity index 98% rename from src/pygpt_net/core/debug/context.py rename to src/pygpt_net/debug/context.py index f75a608bb..fafb5d60e 100755 --- a/src/pygpt_net/core/debug/context.py +++ b/src/pygpt_net/debug/context.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.05 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # class ContextDebug: diff --git a/src/pygpt_net/core/debug/models.py b/src/pygpt_net/debug/models.py similarity index 96% rename from src/pygpt_net/core/debug/models.py rename to src/pygpt_net/debug/models.py index 63336dcb0..fa01ee92b 100755 --- a/src/pygpt_net/core/debug/models.py +++ b/src/pygpt_net/debug/models.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import os diff --git a/src/pygpt_net/core/debug/plugins.py b/src/pygpt_net/debug/plugins.py similarity index 96% rename from src/pygpt_net/core/debug/plugins.py rename to src/pygpt_net/debug/plugins.py index 7b1f2ac50..116900ce7 100755 --- a/src/pygpt_net/core/debug/plugins.py +++ b/src/pygpt_net/debug/plugins.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.05 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # diff --git a/src/pygpt_net/core/debug/presets.py b/src/pygpt_net/debug/presets.py similarity index 97% rename from src/pygpt_net/core/debug/presets.py rename to src/pygpt_net/debug/presets.py index d041555b9..c28ac492c 100755 --- a/src/pygpt_net/core/debug/presets.py +++ b/src/pygpt_net/debug/presets.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import os diff --git a/src/pygpt_net/core/debug/ui.py b/src/pygpt_net/debug/ui.py similarity index 97% rename from src/pygpt_net/core/debug/ui.py rename to src/pygpt_net/debug/ui.py index cf202e026..2a8d3db0b 100755 --- a/src/pygpt_net/core/debug/ui.py +++ b/src/pygpt_net/debug/ui.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.18 18:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # diff --git a/src/pygpt_net/core/installer.py b/src/pygpt_net/installer.py similarity index 97% rename from src/pygpt_net/core/installer.py rename to src/pygpt_net/installer.py index dad3219f2..4624205a6 100644 --- a/src/pygpt_net/core/installer.py +++ b/src/pygpt_net/installer.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from pathlib import Path diff --git a/src/pygpt_net/core/item/__init__.py b/src/pygpt_net/item/__init__.py similarity index 100% rename from src/pygpt_net/core/item/__init__.py rename to src/pygpt_net/item/__init__.py diff --git a/src/pygpt_net/core/item/assistant.py b/src/pygpt_net/item/assistant.py similarity index 98% rename from src/pygpt_net/core/item/assistant.py rename to src/pygpt_net/item/assistant.py index 3f91b550a..50ab66de9 100644 --- a/src/pygpt_net/core/item/assistant.py +++ b/src/pygpt_net/item/assistant.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # class AssistantItem: diff --git a/src/pygpt_net/core/item/attachment.py b/src/pygpt_net/item/attachment.py similarity index 96% rename from src/pygpt_net/core/item/attachment.py rename to src/pygpt_net/item/attachment.py index 47db1a637..ffd217b3e 100644 --- a/src/pygpt_net/core/item/attachment.py +++ b/src/pygpt_net/item/attachment.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # class AttachmentItem: diff --git a/src/pygpt_net/core/item/ctx.py b/src/pygpt_net/item/ctx.py similarity index 97% rename from src/pygpt_net/core/item/ctx.py rename to src/pygpt_net/item/ctx.py index b3de6081d..bb4309279 100644 --- a/src/pygpt_net/core/item/ctx.py +++ b/src/pygpt_net/item/ctx.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import datetime diff --git a/src/pygpt_net/core/item/mode.py b/src/pygpt_net/item/mode.py similarity index 90% rename from src/pygpt_net/core/item/mode.py rename to src/pygpt_net/item/mode.py index 2e162384b..9162d48ee 100644 --- a/src/pygpt_net/core/item/mode.py +++ b/src/pygpt_net/item/mode.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # diff --git a/src/pygpt_net/core/item/model.py b/src/pygpt_net/item/model.py similarity index 93% rename from src/pygpt_net/core/item/model.py rename to src/pygpt_net/item/model.py index 45ec7c660..90173b262 100644 --- a/src/pygpt_net/core/item/model.py +++ b/src/pygpt_net/item/model.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # diff --git a/src/pygpt_net/core/item/notepad.py b/src/pygpt_net/item/notepad.py similarity index 92% rename from src/pygpt_net/core/item/notepad.py rename to src/pygpt_net/item/notepad.py index 62ce134cc..d3b30661f 100644 --- a/src/pygpt_net/core/item/notepad.py +++ b/src/pygpt_net/item/notepad.py @@ -6,8 +6,9 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # + import datetime diff --git a/src/pygpt_net/core/item/preset.py b/src/pygpt_net/item/preset.py similarity index 93% rename from src/pygpt_net/core/item/preset.py rename to src/pygpt_net/item/preset.py index 2d3018f2f..69dccaf7a 100644 --- a/src/pygpt_net/core/item/preset.py +++ b/src/pygpt_net/item/preset.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # diff --git a/src/pygpt_net/core/llm/Anthropic.py b/src/pygpt_net/llm/Anthropic.py similarity index 96% rename from src/pygpt_net/core/llm/Anthropic.py rename to src/pygpt_net/llm/Anthropic.py index 836fad57a..8ef3d6fbc 100755 --- a/src/pygpt_net/core/llm/Anthropic.py +++ b/src/pygpt_net/llm/Anthropic.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.06 12:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import os diff --git a/src/pygpt_net/core/llm/AzureOpenAI.py b/src/pygpt_net/llm/AzureOpenAI.py similarity index 96% rename from src/pygpt_net/core/llm/AzureOpenAI.py rename to src/pygpt_net/llm/AzureOpenAI.py index f568947c2..4d9646322 100755 --- a/src/pygpt_net/core/llm/AzureOpenAI.py +++ b/src/pygpt_net/llm/AzureOpenAI.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.06 12:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import os diff --git a/src/pygpt_net/core/llm/HuggingFace.py b/src/pygpt_net/llm/HuggingFace.py similarity index 96% rename from src/pygpt_net/core/llm/HuggingFace.py rename to src/pygpt_net/llm/HuggingFace.py index b6cabfafb..0b36c65cc 100755 --- a/src/pygpt_net/core/llm/HuggingFace.py +++ b/src/pygpt_net/llm/HuggingFace.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.06 12:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import os diff --git a/src/pygpt_net/core/llm/Llama2.py b/src/pygpt_net/llm/Llama2.py similarity index 96% rename from src/pygpt_net/core/llm/Llama2.py rename to src/pygpt_net/llm/Llama2.py index 73e535a4a..db56ea386 100755 --- a/src/pygpt_net/core/llm/Llama2.py +++ b/src/pygpt_net/llm/Llama2.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.06 12:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from langchain.llms import HuggingFaceTextGenInference diff --git a/src/pygpt_net/core/llm/Ollama.py b/src/pygpt_net/llm/Ollama.py similarity index 95% rename from src/pygpt_net/core/llm/Ollama.py rename to src/pygpt_net/llm/Ollama.py index f4d32f28a..d3a6819fe 100755 --- a/src/pygpt_net/core/llm/Ollama.py +++ b/src/pygpt_net/llm/Ollama.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.06 12:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from langchain.chat_models import ChatOllama diff --git a/src/pygpt_net/core/llm/OpenAI.py b/src/pygpt_net/llm/OpenAI.py similarity index 96% rename from src/pygpt_net/core/llm/OpenAI.py rename to src/pygpt_net/llm/OpenAI.py index aac92d120..af06fc118 100755 --- a/src/pygpt_net/core/llm/OpenAI.py +++ b/src/pygpt_net/llm/OpenAI.py @@ -6,8 +6,9 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.06 12:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # + import os from langchain.llms import OpenAI diff --git a/src/pygpt_net/core/llm/__init__.py b/src/pygpt_net/llm/__init__.py similarity index 100% rename from src/pygpt_net/core/llm/__init__.py rename to src/pygpt_net/llm/__init__.py diff --git a/src/pygpt_net/core/debug/__init__.py b/src/pygpt_net/plugin/__init__.py similarity index 100% rename from src/pygpt_net/core/debug/__init__.py rename to src/pygpt_net/plugin/__init__.py diff --git a/src/pygpt_net/core/plugin/__init__.py b/src/pygpt_net/plugin/audio_azure/__init__.py similarity index 100% rename from src/pygpt_net/core/plugin/__init__.py rename to src/pygpt_net/plugin/audio_azure/__init__.py diff --git a/src/pygpt_net/core/plugin/audio_azure/plugin.py b/src/pygpt_net/plugin/audio_azure/plugin.py similarity index 98% rename from src/pygpt_net/core/plugin/audio_azure/plugin.py rename to src/pygpt_net/plugin/audio_azure/plugin.py index 5c57450cb..c556be779 100755 --- a/src/pygpt_net/core/plugin/audio_azure/plugin.py +++ b/src/pygpt_net/plugin/audio_azure/plugin.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import os @@ -16,7 +16,7 @@ from PySide6.QtCore import QObject import pygame -from pygpt_net.core.plugin.base_plugin import BasePlugin +from pygpt_net.plugin.base_plugin import BasePlugin class Plugin(BasePlugin): diff --git a/src/pygpt_net/core/plugin/audio_azure/__init__.py b/src/pygpt_net/plugin/audio_openai_tts/__init__.py similarity index 100% rename from src/pygpt_net/core/plugin/audio_azure/__init__.py rename to src/pygpt_net/plugin/audio_openai_tts/__init__.py diff --git a/src/pygpt_net/core/plugin/audio_openai_tts/plugin.py b/src/pygpt_net/plugin/audio_openai_tts/plugin.py similarity index 97% rename from src/pygpt_net/core/plugin/audio_openai_tts/plugin.py rename to src/pygpt_net/plugin/audio_openai_tts/plugin.py index 02a3241a3..99fa8ea31 100755 --- a/src/pygpt_net/core/plugin/audio_openai_tts/plugin.py +++ b/src/pygpt_net/plugin/audio_openai_tts/plugin.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import os @@ -16,8 +16,8 @@ from PySide6.QtCore import QObject from openai import OpenAI -from pygpt_net.core.plugin.base_plugin import BasePlugin -from pygpt_net.core.utils import trans +from pygpt_net.plugin.base_plugin import BasePlugin +from pygpt_net.utils import trans class Plugin(BasePlugin): diff --git a/src/pygpt_net/core/plugin/audio_openai_tts/__init__.py b/src/pygpt_net/plugin/audio_openai_whisper/__init__.py similarity index 100% rename from src/pygpt_net/core/plugin/audio_openai_tts/__init__.py rename to src/pygpt_net/plugin/audio_openai_whisper/__init__.py diff --git a/src/pygpt_net/core/plugin/audio_openai_whisper/plugin.py b/src/pygpt_net/plugin/audio_openai_whisper/plugin.py similarity index 99% rename from src/pygpt_net/core/plugin/audio_openai_whisper/plugin.py rename to src/pygpt_net/plugin/audio_openai_whisper/plugin.py index 8f1863621..b7a1b68b3 100755 --- a/src/pygpt_net/core/plugin/audio_openai_whisper/plugin.py +++ b/src/pygpt_net/plugin/audio_openai_whisper/plugin.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import os @@ -18,8 +18,8 @@ from openai import OpenAI import audioop -from pygpt_net.core.plugin.base_plugin import BasePlugin -from pygpt_net.core.utils import trans +from pygpt_net.plugin.base_plugin import BasePlugin +from pygpt_net.utils import trans class Plugin(BasePlugin): diff --git a/src/pygpt_net/core/plugin/base_plugin.py b/src/pygpt_net/plugin/base_plugin.py similarity index 98% rename from src/pygpt_net/core/plugin/base_plugin.py rename to src/pygpt_net/plugin/base_plugin.py index bbbb88ec1..2b185d801 100755 --- a/src/pygpt_net/core/plugin/base_plugin.py +++ b/src/pygpt_net/plugin/base_plugin.py @@ -6,10 +6,10 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 01:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # -# -from pygpt_net.core.utils import trans + +from pygpt_net.utils import trans from PySide6.QtCore import QCoreApplication, QThread diff --git a/src/pygpt_net/core/plugin/audio_openai_whisper/__init__.py b/src/pygpt_net/plugin/cmd_code_interpreter/__init__.py similarity index 100% rename from src/pygpt_net/core/plugin/audio_openai_whisper/__init__.py rename to src/pygpt_net/plugin/cmd_code_interpreter/__init__.py diff --git a/src/pygpt_net/core/plugin/cmd_code_interpreter/plugin.py b/src/pygpt_net/plugin/cmd_code_interpreter/plugin.py similarity index 99% rename from src/pygpt_net/core/plugin/cmd_code_interpreter/plugin.py rename to src/pygpt_net/plugin/cmd_code_interpreter/plugin.py index 3539ab5c6..06605974b 100755 --- a/src/pygpt_net/core/plugin/cmd_code_interpreter/plugin.py +++ b/src/pygpt_net/plugin/cmd_code_interpreter/plugin.py @@ -6,14 +6,14 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import os.path import subprocess import docker -from pygpt_net.core.plugin.base_plugin import BasePlugin +from pygpt_net.plugin.base_plugin import BasePlugin class Plugin(BasePlugin): diff --git a/src/pygpt_net/core/plugin/cmd_custom/__init__.py b/src/pygpt_net/plugin/cmd_custom/__init__.py similarity index 100% rename from src/pygpt_net/core/plugin/cmd_custom/__init__.py rename to src/pygpt_net/plugin/cmd_custom/__init__.py diff --git a/src/pygpt_net/core/plugin/cmd_custom/plugin.py b/src/pygpt_net/plugin/cmd_custom/plugin.py similarity index 98% rename from src/pygpt_net/core/plugin/cmd_custom/plugin.py rename to src/pygpt_net/plugin/cmd_custom/plugin.py index 6b9dbbf04..2ad2ecb4c 100755 --- a/src/pygpt_net/core/plugin/cmd_custom/plugin.py +++ b/src/pygpt_net/plugin/cmd_custom/plugin.py @@ -6,14 +6,14 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import os.path import subprocess from datetime import datetime -from pygpt_net.core.plugin.base_plugin import BasePlugin +from pygpt_net.plugin.base_plugin import BasePlugin class Plugin(BasePlugin): diff --git a/src/pygpt_net/core/plugin/cmd_code_interpreter/__init__.py b/src/pygpt_net/plugin/cmd_files/__init__.py similarity index 100% rename from src/pygpt_net/core/plugin/cmd_code_interpreter/__init__.py rename to src/pygpt_net/plugin/cmd_files/__init__.py diff --git a/src/pygpt_net/core/plugin/cmd_files/plugin.py b/src/pygpt_net/plugin/cmd_files/plugin.py similarity index 99% rename from src/pygpt_net/core/plugin/cmd_files/plugin.py rename to src/pygpt_net/plugin/cmd_files/plugin.py index 56a879f99..e59cf6202 100755 --- a/src/pygpt_net/core/plugin/cmd_files/plugin.py +++ b/src/pygpt_net/plugin/cmd_files/plugin.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import mimetypes @@ -15,7 +15,7 @@ import ssl from urllib.request import Request, urlopen -from pygpt_net.core.plugin.base_plugin import BasePlugin +from pygpt_net.plugin.base_plugin import BasePlugin class Plugin(BasePlugin): diff --git a/src/pygpt_net/core/plugin/cmd_files/__init__.py b/src/pygpt_net/plugin/cmd_web_google/__init__.py similarity index 100% rename from src/pygpt_net/core/plugin/cmd_files/__init__.py rename to src/pygpt_net/plugin/cmd_web_google/__init__.py diff --git a/src/pygpt_net/core/plugin/cmd_web_google/plugin.py b/src/pygpt_net/plugin/cmd_web_google/plugin.py similarity index 98% rename from src/pygpt_net/core/plugin/cmd_web_google/plugin.py rename to src/pygpt_net/plugin/cmd_web_google/plugin.py index 91644275b..eefb97b8e 100755 --- a/src/pygpt_net/core/plugin/cmd_web_google/plugin.py +++ b/src/pygpt_net/plugin/cmd_web_google/plugin.py @@ -6,10 +6,10 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # -from pygpt_net.core.plugin.base_plugin import BasePlugin +from pygpt_net.plugin.base_plugin import BasePlugin from .websearch import WebSearch diff --git a/src/pygpt_net/core/plugin/cmd_web_google/websearch.py b/src/pygpt_net/plugin/cmd_web_google/websearch.py similarity index 99% rename from src/pygpt_net/core/plugin/cmd_web_google/websearch.py rename to src/pygpt_net/plugin/cmd_web_google/websearch.py index cceea2249..21d2d13e5 100755 --- a/src/pygpt_net/core/plugin/cmd_web_google/websearch.py +++ b/src/pygpt_net/plugin/cmd_web_google/websearch.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 01:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import json diff --git a/src/pygpt_net/core/plugin/cmd_web_google/__init__.py b/src/pygpt_net/plugin/real_time/__init__.py similarity index 100% rename from src/pygpt_net/core/plugin/cmd_web_google/__init__.py rename to src/pygpt_net/plugin/real_time/__init__.py diff --git a/src/pygpt_net/core/plugin/real_time/plugin.py b/src/pygpt_net/plugin/real_time/plugin.py similarity index 96% rename from src/pygpt_net/core/plugin/real_time/plugin.py rename to src/pygpt_net/plugin/real_time/plugin.py index 5d0e4bdc0..443d32bb3 100755 --- a/src/pygpt_net/core/plugin/real_time/plugin.py +++ b/src/pygpt_net/plugin/real_time/plugin.py @@ -6,11 +6,12 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.18 04:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # + from datetime import datetime -from pygpt_net.core.plugin.base_plugin import BasePlugin +from pygpt_net.plugin.base_plugin import BasePlugin class Plugin(BasePlugin): diff --git a/src/pygpt_net/core/plugin/real_time/__init__.py b/src/pygpt_net/plugin/self_loop/__init__.py similarity index 100% rename from src/pygpt_net/core/plugin/real_time/__init__.py rename to src/pygpt_net/plugin/self_loop/__init__.py diff --git a/src/pygpt_net/core/plugin/self_loop/plugin.py b/src/pygpt_net/plugin/self_loop/plugin.py similarity index 98% rename from src/pygpt_net/core/plugin/self_loop/plugin.py rename to src/pygpt_net/plugin/self_loop/plugin.py index ba82b0f02..f2e4ca872 100755 --- a/src/pygpt_net/core/plugin/self_loop/plugin.py +++ b/src/pygpt_net/plugin/self_loop/plugin.py @@ -9,7 +9,7 @@ # Updated Date: 2023.12.18 04:00:00 # # ================================================== # -from pygpt_net.core.plugin.base_plugin import BasePlugin +from pygpt_net.plugin.base_plugin import BasePlugin class Plugin(BasePlugin): diff --git a/src/pygpt_net/core/provider/__init__.py b/src/pygpt_net/provider/__init__.py similarity index 100% rename from src/pygpt_net/core/provider/__init__.py rename to src/pygpt_net/provider/__init__.py diff --git a/src/pygpt_net/core/provider/assistant/__init__.py b/src/pygpt_net/provider/assistant/__init__.py similarity index 100% rename from src/pygpt_net/core/provider/assistant/__init__.py rename to src/pygpt_net/provider/assistant/__init__.py diff --git a/src/pygpt_net/core/provider/assistant/base.py b/src/pygpt_net/provider/assistant/base.py similarity index 94% rename from src/pygpt_net/core/provider/assistant/base.py rename to src/pygpt_net/provider/assistant/base.py index 5f4100a95..4adf63e9e 100644 --- a/src/pygpt_net/core/provider/assistant/base.py +++ b/src/pygpt_net/provider/assistant/base.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # diff --git a/src/pygpt_net/core/provider/assistant/json_file.py b/src/pygpt_net/provider/assistant/json_file.py similarity index 94% rename from src/pygpt_net/core/provider/assistant/json_file.py rename to src/pygpt_net/provider/assistant/json_file.py index fa4e96c00..b20117c44 100644 --- a/src/pygpt_net/core/provider/assistant/json_file.py +++ b/src/pygpt_net/provider/assistant/json_file.py @@ -6,17 +6,17 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import json import os import uuid -from pygpt_net.core.item.assistant import AssistantItem -from pygpt_net.core.item.attachment import AttachmentItem -from pygpt_net.core.provider.assistant.base import BaseProvider -from pygpt_net.core.provider.attachment.json_file import JsonFileProvider as AttachmentJsonFileProvider +from pygpt_net.item.assistant import AssistantItem +from pygpt_net.item.attachment import AttachmentItem +from pygpt_net.provider.assistant.base import BaseProvider +from pygpt_net.provider.attachment.json_file import JsonFileProvider as AttachmentJsonFileProvider class JsonFileProvider(BaseProvider): diff --git a/src/pygpt_net/core/provider/attachment/__init__.py b/src/pygpt_net/provider/attachment/__init__.py similarity index 100% rename from src/pygpt_net/core/provider/attachment/__init__.py rename to src/pygpt_net/provider/attachment/__init__.py diff --git a/src/pygpt_net/core/provider/attachment/base.py b/src/pygpt_net/provider/attachment/base.py similarity index 94% rename from src/pygpt_net/core/provider/attachment/base.py rename to src/pygpt_net/provider/attachment/base.py index b2aa7e5ae..dd3c5be0d 100644 --- a/src/pygpt_net/core/provider/attachment/base.py +++ b/src/pygpt_net/provider/attachment/base.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # diff --git a/src/pygpt_net/core/provider/attachment/json_file.py b/src/pygpt_net/provider/attachment/json_file.py similarity index 96% rename from src/pygpt_net/core/provider/attachment/json_file.py rename to src/pygpt_net/provider/attachment/json_file.py index ce2e279d0..39fd526d8 100644 --- a/src/pygpt_net/core/provider/attachment/json_file.py +++ b/src/pygpt_net/provider/attachment/json_file.py @@ -6,15 +6,15 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import json import os import uuid -from pygpt_net.core.provider.attachment.base import BaseProvider -from pygpt_net.core.item.attachment import AttachmentItem +from pygpt_net.provider.attachment.base import BaseProvider +from pygpt_net.item.attachment import AttachmentItem class JsonFileProvider(BaseProvider): diff --git a/src/pygpt_net/core/provider/config/__init__.py b/src/pygpt_net/provider/config/__init__.py similarity index 100% rename from src/pygpt_net/core/provider/config/__init__.py rename to src/pygpt_net/provider/config/__init__.py diff --git a/src/pygpt_net/core/provider/config/base.py b/src/pygpt_net/provider/config/base.py similarity index 94% rename from src/pygpt_net/core/provider/config/base.py rename to src/pygpt_net/provider/config/base.py index 2245672d7..701f3bfb1 100644 --- a/src/pygpt_net/core/provider/config/base.py +++ b/src/pygpt_net/provider/config/base.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # diff --git a/src/pygpt_net/core/provider/config/json_file.py b/src/pygpt_net/provider/config/json_file.py similarity index 99% rename from src/pygpt_net/core/provider/config/json_file.py rename to src/pygpt_net/provider/config/json_file.py index f5e341920..c654300f7 100755 --- a/src/pygpt_net/core/provider/config/json_file.py +++ b/src/pygpt_net/provider/config/json_file.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import json @@ -14,7 +14,7 @@ import shutil from packaging.version import parse as parse_version -from pygpt_net.core.provider.config.base import BaseProvider +from pygpt_net.provider.config.base import BaseProvider class JsonFileProvider(BaseProvider): diff --git a/src/pygpt_net/core/provider/ctx/__init__.py b/src/pygpt_net/provider/ctx/__init__.py similarity index 100% rename from src/pygpt_net/core/provider/ctx/__init__.py rename to src/pygpt_net/provider/ctx/__init__.py diff --git a/src/pygpt_net/core/provider/ctx/base.py b/src/pygpt_net/provider/ctx/base.py similarity index 94% rename from src/pygpt_net/core/provider/ctx/base.py rename to src/pygpt_net/provider/ctx/base.py index 6547f2c8e..9f838c1c8 100644 --- a/src/pygpt_net/core/provider/ctx/base.py +++ b/src/pygpt_net/provider/ctx/base.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # diff --git a/src/pygpt_net/core/provider/ctx/db_sqlite.py b/src/pygpt_net/provider/ctx/db_sqlite.py similarity index 85% rename from src/pygpt_net/core/provider/ctx/db_sqlite.py rename to src/pygpt_net/provider/ctx/db_sqlite.py index aeb94a816..278a9276a 100644 --- a/src/pygpt_net/core/provider/ctx/db_sqlite.py +++ b/src/pygpt_net/provider/ctx/db_sqlite.py @@ -6,10 +6,10 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # -from pygpt_net.core.provider.ctx.base import BaseProvider +from pygpt_net.provider.ctx.base import BaseProvider class DbSqliteProvider(BaseProvider): diff --git a/src/pygpt_net/core/provider/ctx/json_file.py b/src/pygpt_net/provider/ctx/json_file.py similarity index 98% rename from src/pygpt_net/core/provider/ctx/json_file.py rename to src/pygpt_net/provider/ctx/json_file.py index 75d991071..f5d406071 100644 --- a/src/pygpt_net/core/provider/ctx/json_file.py +++ b/src/pygpt_net/provider/ctx/json_file.py @@ -6,15 +6,15 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import datetime import json import os -from pygpt_net.core.provider.ctx.base import BaseProvider -from pygpt_net.core.item.ctx import CtxItem, CtxMeta +from pygpt_net.provider.ctx.base import BaseProvider +from pygpt_net.item.ctx import CtxItem, CtxMeta class JsonFileProvider(BaseProvider): diff --git a/src/pygpt_net/core/provider/history/__init__.py b/src/pygpt_net/provider/history/__init__.py similarity index 100% rename from src/pygpt_net/core/provider/history/__init__.py rename to src/pygpt_net/provider/history/__init__.py diff --git a/src/pygpt_net/core/provider/history/base.py b/src/pygpt_net/provider/history/base.py similarity index 92% rename from src/pygpt_net/core/provider/history/base.py rename to src/pygpt_net/provider/history/base.py index 5932913b5..69d30af3b 100644 --- a/src/pygpt_net/core/provider/history/base.py +++ b/src/pygpt_net/provider/history/base.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # diff --git a/src/pygpt_net/core/provider/history/txt_file.py b/src/pygpt_net/provider/history/txt_file.py similarity index 95% rename from src/pygpt_net/core/provider/history/txt_file.py rename to src/pygpt_net/provider/history/txt_file.py index 471698399..c146c9270 100644 --- a/src/pygpt_net/core/provider/history/txt_file.py +++ b/src/pygpt_net/provider/history/txt_file.py @@ -6,13 +6,13 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import datetime import os -from pygpt_net.core.provider.history.base import BaseProvider +from pygpt_net.provider.history.base import BaseProvider class TxtFileProvider(BaseProvider): diff --git a/src/pygpt_net/core/provider/mode/__init__.py b/src/pygpt_net/provider/mode/__init__.py similarity index 100% rename from src/pygpt_net/core/provider/mode/__init__.py rename to src/pygpt_net/provider/mode/__init__.py diff --git a/src/pygpt_net/core/provider/mode/base.py b/src/pygpt_net/provider/mode/base.py similarity index 93% rename from src/pygpt_net/core/provider/mode/base.py rename to src/pygpt_net/provider/mode/base.py index 98e3d2ec6..b7eba31b0 100644 --- a/src/pygpt_net/core/provider/mode/base.py +++ b/src/pygpt_net/provider/mode/base.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # diff --git a/src/pygpt_net/core/provider/mode/json_file.py b/src/pygpt_net/provider/mode/json_file.py similarity index 95% rename from src/pygpt_net/core/provider/mode/json_file.py rename to src/pygpt_net/provider/mode/json_file.py index 17d26f554..262a82cf8 100644 --- a/src/pygpt_net/core/provider/mode/json_file.py +++ b/src/pygpt_net/provider/mode/json_file.py @@ -6,14 +6,14 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import json import os -from pygpt_net.core.provider.mode.base import BaseProvider -from pygpt_net.core.item.mode import ModeItem +from pygpt_net.provider.mode.base import BaseProvider +from pygpt_net.item.mode import ModeItem class JsonFileProvider(BaseProvider): diff --git a/src/pygpt_net/core/provider/model/__init__.py b/src/pygpt_net/provider/model/__init__.py similarity index 100% rename from src/pygpt_net/core/provider/model/__init__.py rename to src/pygpt_net/provider/model/__init__.py diff --git a/src/pygpt_net/core/provider/model/base.py b/src/pygpt_net/provider/model/base.py similarity index 94% rename from src/pygpt_net/core/provider/model/base.py rename to src/pygpt_net/provider/model/base.py index d78ea688b..0a3f45c63 100644 --- a/src/pygpt_net/core/provider/model/base.py +++ b/src/pygpt_net/provider/model/base.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # diff --git a/src/pygpt_net/core/provider/model/json_file.py b/src/pygpt_net/provider/model/json_file.py similarity index 97% rename from src/pygpt_net/core/provider/model/json_file.py rename to src/pygpt_net/provider/model/json_file.py index d4c61ffb7..ac7a02fb1 100644 --- a/src/pygpt_net/core/provider/model/json_file.py +++ b/src/pygpt_net/provider/model/json_file.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import json @@ -14,8 +14,8 @@ import shutil from packaging.version import parse as parse_version -from pygpt_net.core.provider.model.base import BaseProvider -from pygpt_net.core.item.model import ModelItem +from pygpt_net.provider.model.base import BaseProvider +from pygpt_net.item.model import ModelItem class JsonFileProvider(BaseProvider): diff --git a/src/pygpt_net/core/provider/notepad/__init__.py b/src/pygpt_net/provider/notepad/__init__.py similarity index 100% rename from src/pygpt_net/core/provider/notepad/__init__.py rename to src/pygpt_net/provider/notepad/__init__.py diff --git a/src/pygpt_net/core/provider/notepad/base.py b/src/pygpt_net/provider/notepad/base.py similarity index 94% rename from src/pygpt_net/core/provider/notepad/base.py rename to src/pygpt_net/provider/notepad/base.py index df457253c..5d98bfa66 100644 --- a/src/pygpt_net/core/provider/notepad/base.py +++ b/src/pygpt_net/provider/notepad/base.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # diff --git a/src/pygpt_net/core/provider/notepad/json_file.py b/src/pygpt_net/provider/notepad/json_file.py similarity index 97% rename from src/pygpt_net/core/provider/notepad/json_file.py rename to src/pygpt_net/provider/notepad/json_file.py index b4a4cc5cf..ccd902cb4 100644 --- a/src/pygpt_net/core/provider/notepad/json_file.py +++ b/src/pygpt_net/provider/notepad/json_file.py @@ -6,15 +6,16 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # + import datetime import json import os import uuid -from pygpt_net.core.provider.notepad.base import BaseProvider -from pygpt_net.core.item.notepad import NotepadItem +from pygpt_net.provider.notepad.base import BaseProvider +from pygpt_net.item.notepad import NotepadItem class JsonFileProvider(BaseProvider): diff --git a/src/pygpt_net/core/provider/preset/__init__.py b/src/pygpt_net/provider/preset/__init__.py similarity index 100% rename from src/pygpt_net/core/provider/preset/__init__.py rename to src/pygpt_net/provider/preset/__init__.py diff --git a/src/pygpt_net/core/provider/preset/base.py b/src/pygpt_net/provider/preset/base.py similarity index 94% rename from src/pygpt_net/core/provider/preset/base.py rename to src/pygpt_net/provider/preset/base.py index ddd16f527..22b7a64a1 100755 --- a/src/pygpt_net/core/provider/preset/base.py +++ b/src/pygpt_net/provider/preset/base.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # diff --git a/src/pygpt_net/core/provider/preset/json_file.py b/src/pygpt_net/provider/preset/json_file.py similarity index 97% rename from src/pygpt_net/core/provider/preset/json_file.py rename to src/pygpt_net/provider/preset/json_file.py index 165b169f8..de490f945 100755 --- a/src/pygpt_net/core/provider/preset/json_file.py +++ b/src/pygpt_net/provider/preset/json_file.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import json @@ -14,8 +14,8 @@ import shutil from packaging.version import parse as parse_version -from pygpt_net.core.provider.preset.base import BaseProvider -from pygpt_net.core.item.preset import PresetItem +from pygpt_net.provider.preset.base import BaseProvider +from pygpt_net.item.preset import PresetItem class JsonFileProvider(BaseProvider): diff --git a/src/pygpt_net/core/plugin/self_loop/__init__.py b/src/pygpt_net/ui/__init__.py similarity index 100% rename from src/pygpt_net/core/plugin/self_loop/__init__.py rename to src/pygpt_net/ui/__init__.py diff --git a/src/pygpt_net/core/ui/__init__.py b/src/pygpt_net/ui/dialog/__init__.py similarity index 100% rename from src/pygpt_net/core/ui/__init__.py rename to src/pygpt_net/ui/dialog/__init__.py diff --git a/src/pygpt_net/core/ui/dialog/about.py b/src/pygpt_net/ui/dialog/about.py similarity index 95% rename from src/pygpt_net/core/ui/dialog/about.py rename to src/pygpt_net/ui/dialog/about.py index b7a7e7fd5..403b1d150 100755 --- a/src/pygpt_net/core/ui/dialog/about.py +++ b/src/pygpt_net/ui/dialog/about.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import os @@ -14,8 +14,8 @@ from PySide6.QtGui import QPixmap, Qt from PySide6.QtWidgets import QVBoxLayout, QLabel, QPushButton, QHBoxLayout, QPlainTextEdit -from pygpt_net.core.ui.widget.dialog.info import InfoDialog -from pygpt_net.core.utils import trans +from pygpt_net.ui.widget.dialog.info import InfoDialog +from pygpt_net.utils import trans class About: diff --git a/src/pygpt_net/core/ui/dialog/assistant.py b/src/pygpt_net/ui/dialog/assistant.py similarity index 95% rename from src/pygpt_net/core/ui/dialog/assistant.py rename to src/pygpt_net/ui/dialog/assistant.py index a993145f8..1e5682dda 100755 --- a/src/pygpt_net/core/ui/dialog/assistant.py +++ b/src/pygpt_net/ui/dialog/assistant.py @@ -6,18 +6,18 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtCore import Qt from PySide6.QtWidgets import QPushButton, QHBoxLayout, QLabel, QVBoxLayout, QSizePolicy -from pygpt_net.core.ui.widget.option.checkbox import OptionCheckbox -from pygpt_net.core.ui.widget.option.dictionary import OptionDict -from pygpt_net.core.ui.widget.option.input import OptionInput -from pygpt_net.core.ui.widget.option.textarea import OptionTextarea -from pygpt_net.core.ui.widget.dialog.editor import EditorDialog -from pygpt_net.core.utils import trans +from pygpt_net.ui.widget.option.checkbox import OptionCheckbox +from pygpt_net.ui.widget.option.dictionary import OptionDict +from pygpt_net.ui.widget.option.input import OptionInput +from pygpt_net.ui.widget.option.textarea import OptionTextarea +from pygpt_net.ui.widget.dialog.editor import EditorDialog +from pygpt_net.utils import trans class Assistant: diff --git a/src/pygpt_net/core/ui/dialog/changelog.py b/src/pygpt_net/ui/dialog/changelog.py similarity index 91% rename from src/pygpt_net/core/ui/dialog/changelog.py rename to src/pygpt_net/ui/dialog/changelog.py index 11089e325..fca1206c1 100755 --- a/src/pygpt_net/core/ui/dialog/changelog.py +++ b/src/pygpt_net/ui/dialog/changelog.py @@ -6,15 +6,15 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import os from PySide6.QtWidgets import QPlainTextEdit, QVBoxLayout, QLabel -from pygpt_net.core.ui.widget.dialog.info import InfoDialog -from pygpt_net.core.utils import trans +from pygpt_net.ui.widget.dialog.info import InfoDialog +from pygpt_net.utils import trans class Changelog: diff --git a/src/pygpt_net/core/ui/dialog/debug.py b/src/pygpt_net/ui/dialog/debug.py similarity index 92% rename from src/pygpt_net/core/ui/dialog/debug.py rename to src/pygpt_net/ui/dialog/debug.py index 88cf9ae9d..bf1e52cac 100755 --- a/src/pygpt_net/core/ui/dialog/debug.py +++ b/src/pygpt_net/ui/dialog/debug.py @@ -6,12 +6,12 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 18:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtWidgets import QTreeView, QGridLayout, QAbstractItemView, QScrollArea -from pygpt_net.core.ui.widget.dialog.debug import DebugDialog +from pygpt_net.ui.widget.dialog.debug import DebugDialog class Debug: diff --git a/src/pygpt_net/core/ui/dialog/editor.py b/src/pygpt_net/ui/dialog/editor.py similarity index 93% rename from src/pygpt_net/core/ui/dialog/editor.py rename to src/pygpt_net/ui/dialog/editor.py index 754d76b0a..a33e5760f 100755 --- a/src/pygpt_net/core/ui/dialog/editor.py +++ b/src/pygpt_net/ui/dialog/editor.py @@ -6,13 +6,13 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 18:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtWidgets import QPlainTextEdit, QPushButton, QHBoxLayout, QLabel, QVBoxLayout -from pygpt_net.core.ui.widget.dialog.editor_file import EditorFileDialog -from pygpt_net.core.utils import trans +from pygpt_net.ui.widget.dialog.editor_file import EditorFileDialog +from pygpt_net.utils import trans class Editor: diff --git a/src/pygpt_net/core/ui/dialog/image.py b/src/pygpt_net/ui/dialog/image.py similarity index 88% rename from src/pygpt_net/core/ui/dialog/image.py rename to src/pygpt_net/ui/dialog/image.py index f58a9a68f..aa903be22 100755 --- a/src/pygpt_net/core/ui/dialog/image.py +++ b/src/pygpt_net/ui/dialog/image.py @@ -6,14 +6,14 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 18:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtWidgets import QVBoxLayout, QHBoxLayout -from pygpt_net.core.ui.widget.dialog.image import ImageDialog -from pygpt_net.core.ui.widget.image.display import ImageLabel -from pygpt_net.core.utils import trans +from pygpt_net.ui.widget.dialog.image import ImageDialog +from pygpt_net.ui.widget.image.display import ImageLabel +from pygpt_net.utils import trans class Image: diff --git a/src/pygpt_net/core/ui/dialog/logger.py b/src/pygpt_net/ui/dialog/logger.py similarity index 90% rename from src/pygpt_net/core/ui/dialog/logger.py rename to src/pygpt_net/ui/dialog/logger.py index 8adf729cc..ec54e3224 100755 --- a/src/pygpt_net/core/ui/dialog/logger.py +++ b/src/pygpt_net/ui/dialog/logger.py @@ -6,13 +6,13 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 01:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtWidgets import QPlainTextEdit, QPushButton, QHBoxLayout, QVBoxLayout -from pygpt_net.core.ui.widget.dialog.logger import LoggerDialog -from pygpt_net.core.utils import trans +from pygpt_net.ui.widget.dialog.logger import LoggerDialog +from pygpt_net.utils import trans class Logger: diff --git a/src/pygpt_net/core/ui/dialog/plugins.py b/src/pygpt_net/ui/dialog/plugins.py similarity index 95% rename from src/pygpt_net/core/ui/dialog/plugins.py rename to src/pygpt_net/ui/dialog/plugins.py index 537125298..e2254c540 100755 --- a/src/pygpt_net/core/ui/dialog/plugins.py +++ b/src/pygpt_net/ui/dialog/plugins.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtCore import Qt @@ -14,16 +14,16 @@ from PySide6.QtWidgets import QPushButton, QHBoxLayout, QLabel, QVBoxLayout, QScrollArea, QWidget, QTabWidget, QFrame, \ QLineEdit -from pygpt_net.core.ui.widget.dialog.settings_plugin import PluginSettingsDialog -from pygpt_net.core.ui.widget.element.group import CollapsedGroup -from pygpt_net.core.ui.widget.element.url import UrlLabel -from pygpt_net.core.ui.widget.lists.plugin import PluginList -from pygpt_net.core.ui.widget.option.checkbox import OptionCheckbox -from pygpt_net.core.ui.widget.option.dictionary import OptionDict -from pygpt_net.core.ui.widget.option.input import OptionInput -from pygpt_net.core.ui.widget.option.slider import OptionSlider -from pygpt_net.core.ui.widget.option.textarea import OptionTextarea -from pygpt_net.core.utils import trans +from pygpt_net.ui.widget.dialog.settings_plugin import PluginSettingsDialog +from pygpt_net.ui.widget.element.group import CollapsedGroup +from pygpt_net.ui.widget.element.url import UrlLabel +from pygpt_net.ui.widget.lists.plugin import PluginList +from pygpt_net.ui.widget.option.checkbox import OptionCheckbox +from pygpt_net.ui.widget.option.dictionary import OptionDict +from pygpt_net.ui.widget.option.input import OptionInput +from pygpt_net.ui.widget.option.slider import OptionSlider +from pygpt_net.ui.widget.option.textarea import OptionTextarea +from pygpt_net.utils import trans class Plugins: diff --git a/src/pygpt_net/core/ui/dialog/preset.py b/src/pygpt_net/ui/dialog/preset.py similarity index 94% rename from src/pygpt_net/core/ui/dialog/preset.py rename to src/pygpt_net/ui/dialog/preset.py index c014c5d7f..20bba3e7b 100755 --- a/src/pygpt_net/core/ui/dialog/preset.py +++ b/src/pygpt_net/ui/dialog/preset.py @@ -6,17 +6,17 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtWidgets import QPushButton, QHBoxLayout, QLabel, QVBoxLayout -from pygpt_net.core.ui.widget.option.checkbox import OptionCheckbox -from pygpt_net.core.ui.widget.option.input import OptionInput -from pygpt_net.core.ui.widget.option.slider import OptionSlider -from pygpt_net.core.ui.widget.option.textarea import OptionTextarea -from pygpt_net.core.ui.widget.dialog.editor import EditorDialog -from pygpt_net.core.utils import trans +from pygpt_net.ui.widget.option.checkbox import OptionCheckbox +from pygpt_net.ui.widget.option.input import OptionInput +from pygpt_net.ui.widget.option.slider import OptionSlider +from pygpt_net.ui.widget.option.textarea import OptionTextarea +from pygpt_net.ui.widget.dialog.editor import EditorDialog +from pygpt_net.utils import trans class Preset: diff --git a/src/pygpt_net/core/ui/dialog/rename.py b/src/pygpt_net/ui/dialog/rename.py similarity index 84% rename from src/pygpt_net/core/ui/dialog/rename.py rename to src/pygpt_net/ui/dialog/rename.py index ffb09080e..b8ff0c7e9 100755 --- a/src/pygpt_net/core/ui/dialog/rename.py +++ b/src/pygpt_net/ui/dialog/rename.py @@ -6,11 +6,11 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 18:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # -from pygpt_net.core.ui.widget.dialog.rename import RenameDialog -from pygpt_net.core.utils import trans +from pygpt_net.ui.widget.dialog.rename import RenameDialog +from pygpt_net.utils import trans class Rename: diff --git a/src/pygpt_net/core/ui/dialog/settings.py b/src/pygpt_net/ui/dialog/settings.py similarity index 95% rename from src/pygpt_net/core/ui/dialog/settings.py rename to src/pygpt_net/ui/dialog/settings.py index 8d128adb4..366442c3b 100755 --- a/src/pygpt_net/core/ui/dialog/settings.py +++ b/src/pygpt_net/ui/dialog/settings.py @@ -6,20 +6,20 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtCore import Qt from PySide6.QtWidgets import QPushButton, QHBoxLayout, QLabel, QVBoxLayout, QScrollArea, QWidget, QFrame, QLineEdit -from pygpt_net.core.ui.widget.dialog.settings import SettingsDialog -from pygpt_net.core.ui.widget.option.checkbox import OptionCheckbox -from pygpt_net.core.ui.widget.option.input import OptionInput -from pygpt_net.core.ui.widget.option.slider import OptionSlider -from pygpt_net.core.ui.widget.option.textarea import OptionTextarea -from pygpt_net.core.ui.widget.element.group import CollapsedGroup -from pygpt_net.core.ui.widget.element.url import UrlLabel -from pygpt_net.core.utils import trans +from pygpt_net.ui.widget.dialog.settings import SettingsDialog +from pygpt_net.ui.widget.option.checkbox import OptionCheckbox +from pygpt_net.ui.widget.option.input import OptionInput +from pygpt_net.ui.widget.option.slider import OptionSlider +from pygpt_net.ui.widget.option.textarea import OptionTextarea +from pygpt_net.ui.widget.element.group import CollapsedGroup +from pygpt_net.ui.widget.element.url import UrlLabel +from pygpt_net.utils import trans class Settings: diff --git a/src/pygpt_net/core/ui/dialog/start.py b/src/pygpt_net/ui/dialog/start.py similarity index 93% rename from src/pygpt_net/core/ui/dialog/start.py rename to src/pygpt_net/ui/dialog/start.py index 2061853cd..95dd76eb4 100755 --- a/src/pygpt_net/core/ui/dialog/start.py +++ b/src/pygpt_net/ui/dialog/start.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import os @@ -15,8 +15,8 @@ from PySide6.QtGui import QPixmap from PySide6.QtWidgets import QVBoxLayout, QLabel, QPushButton -from pygpt_net.core.ui.widget.dialog.info import InfoDialog -from pygpt_net.core.utils import trans +from pygpt_net.ui.widget.dialog.info import InfoDialog +from pygpt_net.utils import trans class Start: diff --git a/src/pygpt_net/core/ui/dialog/update.py b/src/pygpt_net/ui/dialog/update.py similarity index 85% rename from src/pygpt_net/core/ui/dialog/update.py rename to src/pygpt_net/ui/dialog/update.py index 853174ac0..9062050e2 100755 --- a/src/pygpt_net/core/ui/dialog/update.py +++ b/src/pygpt_net/ui/dialog/update.py @@ -6,10 +6,10 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 18:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # -from pygpt_net.core.ui.widget.dialog.update import UpdateDialog +from pygpt_net.ui.widget.dialog.update import UpdateDialog class Update: diff --git a/src/pygpt_net/core/ui/dialogs.py b/src/pygpt_net/ui/dialogs.py similarity index 82% rename from src/pygpt_net/core/ui/dialogs.py rename to src/pygpt_net/ui/dialogs.py index b9365f3af..6d3696554 100755 --- a/src/pygpt_net/core/ui/dialogs.py +++ b/src/pygpt_net/ui/dialogs.py @@ -6,24 +6,24 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # -from pygpt_net.core.ui.dialog.about import About -from pygpt_net.core.ui.dialog.assistant import Assistant -from pygpt_net.core.ui.dialog.changelog import Changelog -from pygpt_net.core.ui.dialog.debug import Debug -from pygpt_net.core.ui.dialog.editor import Editor -from pygpt_net.core.ui.dialog.image import Image -from pygpt_net.core.ui.dialog.logger import Logger -from pygpt_net.core.ui.dialog.plugins import Plugins -from pygpt_net.core.ui.dialog.preset import Preset -from pygpt_net.core.ui.dialog.rename import Rename -from pygpt_net.core.ui.dialog.settings import Settings -from pygpt_net.core.ui.dialog.start import Start -from pygpt_net.core.ui.dialog.update import Update -from pygpt_net.core.ui.widget.dialog.alert import AlertDialog -from pygpt_net.core.ui.widget.dialog.confirm import ConfirmDialog +from pygpt_net.ui.dialog.about import About +from pygpt_net.ui.dialog.assistant import Assistant +from pygpt_net.ui.dialog.changelog import Changelog +from pygpt_net.ui.dialog.debug import Debug +from pygpt_net.ui.dialog.editor import Editor +from pygpt_net.ui.dialog.image import Image +from pygpt_net.ui.dialog.logger import Logger +from pygpt_net.ui.dialog.plugins import Plugins +from pygpt_net.ui.dialog.preset import Preset +from pygpt_net.ui.dialog.rename import Rename +from pygpt_net.ui.dialog.settings import Settings +from pygpt_net.ui.dialog.start import Start +from pygpt_net.ui.dialog.update import Update +from pygpt_net.ui.widget.dialog.alert import AlertDialog +from pygpt_net.ui.widget.dialog.confirm import ConfirmDialog class Dialogs: diff --git a/src/pygpt_net/core/ui/layout/__init__.py b/src/pygpt_net/ui/layout/__init__.py similarity index 100% rename from src/pygpt_net/core/ui/layout/__init__.py rename to src/pygpt_net/ui/layout/__init__.py diff --git a/src/pygpt_net/core/ui/layout/chat/__init__.py b/src/pygpt_net/ui/layout/chat/__init__.py similarity index 100% rename from src/pygpt_net/core/ui/layout/chat/__init__.py rename to src/pygpt_net/ui/layout/chat/__init__.py diff --git a/src/pygpt_net/core/ui/layout/chat/attachments.py b/src/pygpt_net/ui/layout/chat/attachments.py similarity index 96% rename from src/pygpt_net/core/ui/layout/chat/attachments.py rename to src/pygpt_net/ui/layout/chat/attachments.py index 51f116ccb..e3a6c7be6 100644 --- a/src/pygpt_net/core/ui/layout/chat/attachments.py +++ b/src/pygpt_net/ui/layout/chat/attachments.py @@ -6,14 +6,14 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtGui import QStandardItemModel, Qt from PySide6.QtWidgets import QVBoxLayout, QPushButton, QHBoxLayout, QCheckBox, QWidget -from pygpt_net.core.ui.widget.lists.attachment import AttachmentList -from pygpt_net.core.utils import trans +from pygpt_net.ui.widget.lists.attachment import AttachmentList +from pygpt_net.utils import trans class Attachments: diff --git a/src/pygpt_net/core/ui/layout/chat/attachments_uploaded.py b/src/pygpt_net/ui/layout/chat/attachments_uploaded.py similarity index 95% rename from src/pygpt_net/core/ui/layout/chat/attachments_uploaded.py rename to src/pygpt_net/ui/layout/chat/attachments_uploaded.py index 1ea7d594c..ebdc124b7 100644 --- a/src/pygpt_net/core/ui/layout/chat/attachments_uploaded.py +++ b/src/pygpt_net/ui/layout/chat/attachments_uploaded.py @@ -6,14 +6,14 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 18:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtGui import QStandardItemModel, Qt from PySide6.QtWidgets import QVBoxLayout, QPushButton, QHBoxLayout, QCheckBox, QLabel, QWidget -from pygpt_net.core.ui.widget.lists.uploaded import UploadedFileList -from pygpt_net.core.utils import trans +from pygpt_net.ui.widget.lists.uploaded import UploadedFileList +from pygpt_net.utils import trans class AttachmentsUploaded: diff --git a/src/pygpt_net/core/ui/layout/chat/input.py b/src/pygpt_net/ui/layout/chat/input.py similarity index 95% rename from src/pygpt_net/core/ui/layout/chat/input.py rename to src/pygpt_net/ui/layout/chat/input.py index c3a73dfcc..4b5d44b59 100644 --- a/src/pygpt_net/core/ui/layout/chat/input.py +++ b/src/pygpt_net/ui/layout/chat/input.py @@ -6,19 +6,19 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtCore import Qt from PySide6.QtWidgets import QVBoxLayout, QLabel, QHBoxLayout, QPushButton, QRadioButton, QCheckBox, \ QTabWidget, QWidget -from pygpt_net.core.ui.layout.chat.attachments import Attachments -from pygpt_net.core.ui.layout.chat.attachments_uploaded import AttachmentsUploaded -from pygpt_net.core.ui.layout.status import Status -from pygpt_net.core.ui.widget.audio.input import AudioInput -from pygpt_net.core.ui.widget.textarea.input import ChatInput -from pygpt_net.core.utils import trans +from pygpt_net.ui.layout.chat.attachments import Attachments +from pygpt_net.ui.layout.chat.attachments_uploaded import AttachmentsUploaded +from pygpt_net.ui.layout.status import Status +from pygpt_net.ui.widget.audio.input import AudioInput +from pygpt_net.ui.widget.textarea.input import ChatInput +from pygpt_net.utils import trans class Input: diff --git a/src/pygpt_net/core/ui/layout/chat/main.py b/src/pygpt_net/ui/layout/chat/main.py similarity index 89% rename from src/pygpt_net/core/ui/layout/chat/main.py rename to src/pygpt_net/ui/layout/chat/main.py index 1fde70c18..47fbb5102 100644 --- a/src/pygpt_net/core/ui/layout/chat/main.py +++ b/src/pygpt_net/ui/layout/chat/main.py @@ -6,14 +6,14 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtCore import Qt from PySide6.QtWidgets import QSplitter -from pygpt_net.core.ui.layout.chat.input import Input -from pygpt_net.core.ui.layout.chat.output import Output +from pygpt_net.ui.layout.chat.input import Input +from pygpt_net.ui.layout.chat.output import Output class ChatMain: diff --git a/src/pygpt_net/core/ui/layout/chat/markdown.py b/src/pygpt_net/ui/layout/chat/markdown.py similarity index 100% rename from src/pygpt_net/core/ui/layout/chat/markdown.py rename to src/pygpt_net/ui/layout/chat/markdown.py diff --git a/src/pygpt_net/core/ui/layout/chat/output.py b/src/pygpt_net/ui/layout/chat/output.py similarity index 89% rename from src/pygpt_net/core/ui/layout/chat/output.py rename to src/pygpt_net/ui/layout/chat/output.py index 7be75d6e9..e12a5d973 100644 --- a/src/pygpt_net/core/ui/layout/chat/output.py +++ b/src/pygpt_net/ui/layout/chat/output.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import os @@ -14,13 +14,13 @@ from PySide6.QtCore import Qt from PySide6.QtWidgets import QVBoxLayout, QLabel, QHBoxLayout, QCheckBox, QWidget, QTabWidget -from pygpt_net.core.ui.layout.chat.input import Input -from pygpt_net.core.ui.layout.chat.markdown import MarkdownHighlighter -from pygpt_net.core.ui.widget.audio.output import AudioOutput -from pygpt_net.core.ui.widget.textarea.output import ChatOutput -from pygpt_net.core.ui.widget.textarea.notepad import NotepadOutput -from pygpt_net.core.ui.widget.filesystem.explorer import FileExplorer -from pygpt_net.core.utils import trans +from pygpt_net.ui.layout.chat.input import Input +from pygpt_net.ui.layout.chat.markdown import MarkdownHighlighter +from pygpt_net.ui.widget.audio.output import AudioOutput +from pygpt_net.ui.widget.textarea.output import ChatOutput +from pygpt_net.ui.widget.textarea.notepad import NotepadOutput +from pygpt_net.ui.widget.filesystem.explorer import FileExplorer +from pygpt_net.utils import trans class Output: diff --git a/src/pygpt_net/core/ui/layout/ctx/__init__.py b/src/pygpt_net/ui/layout/ctx/__init__.py similarity index 100% rename from src/pygpt_net/core/ui/layout/ctx/__init__.py rename to src/pygpt_net/ui/layout/ctx/__init__.py diff --git a/src/pygpt_net/core/ui/layout/ctx/ctx_list.py b/src/pygpt_net/ui/layout/ctx/ctx_list.py similarity index 96% rename from src/pygpt_net/core/ui/layout/ctx/ctx_list.py rename to src/pygpt_net/ui/layout/ctx/ctx_list.py index acb980a93..994aff3d2 100644 --- a/src/pygpt_net/core/ui/layout/ctx/ctx_list.py +++ b/src/pygpt_net/ui/layout/ctx/ctx_list.py @@ -6,15 +6,15 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtGui import QStandardItemModel from PySide6.QtWidgets import QVBoxLayout, QLabel, QPushButton, QWidget from datetime import datetime, timedelta -from pygpt_net.core.ui.widget.lists.context import ContextList -from pygpt_net.core.utils import trans +from pygpt_net.ui.widget.lists.context import ContextList +from pygpt_net.utils import trans class CtxList: diff --git a/src/pygpt_net/core/ui/layout/ctx/main.py b/src/pygpt_net/ui/layout/ctx/main.py similarity index 86% rename from src/pygpt_net/core/ui/layout/ctx/main.py rename to src/pygpt_net/ui/layout/ctx/main.py index c00366439..956d3bf6b 100644 --- a/src/pygpt_net/core/ui/layout/ctx/main.py +++ b/src/pygpt_net/ui/layout/ctx/main.py @@ -6,13 +6,13 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 18:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtWidgets import QVBoxLayout, QWidget -from pygpt_net.core.ui.layout.ctx.ctx_list import CtxList -from pygpt_net.core.ui.layout.ctx.video import Video +from pygpt_net.ui.layout.ctx.ctx_list import CtxList +from pygpt_net.ui.layout.ctx.video import Video class CtxMain: diff --git a/src/pygpt_net/core/ui/layout/ctx/video.py b/src/pygpt_net/ui/layout/ctx/video.py similarity index 88% rename from src/pygpt_net/core/ui/layout/ctx/video.py rename to src/pygpt_net/ui/layout/ctx/video.py index 15ed039c7..f05512d98 100644 --- a/src/pygpt_net/core/ui/layout/ctx/video.py +++ b/src/pygpt_net/ui/layout/ctx/video.py @@ -6,10 +6,10 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 18:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # -from pygpt_net.core.ui.widget.vision.camera import VideoContainer +from pygpt_net.ui.widget.vision.camera import VideoContainer class Video: diff --git a/src/pygpt_net/core/ui/layout/status.py b/src/pygpt_net/ui/layout/status.py similarity index 91% rename from src/pygpt_net/core/ui/layout/status.py rename to src/pygpt_net/ui/layout/status.py index ffdc4ba15..e810661b6 100644 --- a/src/pygpt_net/core/ui/layout/status.py +++ b/src/pygpt_net/ui/layout/status.py @@ -6,13 +6,13 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtCore import Qt from PySide6.QtWidgets import QLabel, QHBoxLayout -from pygpt_net.core.utils import trans +from pygpt_net.utils import trans class Status: diff --git a/src/pygpt_net/core/ui/layout/toolbox/__init__.py b/src/pygpt_net/ui/layout/toolbox/__init__.py similarity index 100% rename from src/pygpt_net/core/ui/layout/toolbox/__init__.py rename to src/pygpt_net/ui/layout/toolbox/__init__.py diff --git a/src/pygpt_net/core/ui/layout/toolbox/assistants.py b/src/pygpt_net/ui/layout/toolbox/assistants.py similarity index 96% rename from src/pygpt_net/core/ui/layout/toolbox/assistants.py rename to src/pygpt_net/ui/layout/toolbox/assistants.py index 868a14ff5..6029e2e55 100644 --- a/src/pygpt_net/core/ui/layout/toolbox/assistants.py +++ b/src/pygpt_net/ui/layout/toolbox/assistants.py @@ -6,14 +6,14 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtGui import QStandardItemModel, Qt from PySide6.QtWidgets import QVBoxLayout, QLabel, QHBoxLayout, QPushButton, QWidget -from pygpt_net.core.ui.widget.lists.assistant import AssistantList -from pygpt_net.core.utils import trans +from pygpt_net.ui.widget.lists.assistant import AssistantList +from pygpt_net.utils import trans class Assistants: diff --git a/src/pygpt_net/core/ui/layout/toolbox/footer.py b/src/pygpt_net/ui/layout/toolbox/footer.py similarity index 91% rename from src/pygpt_net/core/ui/layout/toolbox/footer.py rename to src/pygpt_net/ui/layout/toolbox/footer.py index a0ff84678..9896961fc 100644 --- a/src/pygpt_net/core/ui/layout/toolbox/footer.py +++ b/src/pygpt_net/ui/layout/toolbox/footer.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import os @@ -15,11 +15,11 @@ from PySide6.QtGui import Qt, QIcon from PySide6.QtWidgets import QVBoxLayout, QLabel, QHBoxLayout, QPushButton, QWidget, QSizePolicy -from pygpt_net.core.ui.layout.toolbox.image import Image -from pygpt_net.core.ui.layout.toolbox.vision import Vision -from pygpt_net.core.ui.widget.textarea.name import NameInput -from pygpt_net.core.ui.widget.option.slider import OptionSlider -from pygpt_net.core.utils import trans +from pygpt_net.ui.layout.toolbox.image import Image +from pygpt_net.ui.layout.toolbox.vision import Vision +from pygpt_net.ui.widget.textarea.name import NameInput +from pygpt_net.ui.widget.option.slider import OptionSlider +from pygpt_net.utils import trans class Footer: diff --git a/src/pygpt_net/core/ui/layout/toolbox/image.py b/src/pygpt_net/ui/layout/toolbox/image.py similarity index 92% rename from src/pygpt_net/core/ui/layout/toolbox/image.py rename to src/pygpt_net/ui/layout/toolbox/image.py index b8ea60e09..e9b4251fe 100644 --- a/src/pygpt_net/core/ui/layout/toolbox/image.py +++ b/src/pygpt_net/ui/layout/toolbox/image.py @@ -6,13 +6,13 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtWidgets import QVBoxLayout, QLabel, QHBoxLayout, QWidget, QCheckBox -from pygpt_net.core.ui.widget.option.slider import OptionSlider -from pygpt_net.core.utils import trans +from pygpt_net.ui.widget.option.slider import OptionSlider +from pygpt_net.utils import trans class Image: diff --git a/src/pygpt_net/core/ui/layout/toolbox/main.py b/src/pygpt_net/ui/layout/toolbox/main.py similarity index 84% rename from src/pygpt_net/core/ui/layout/toolbox/main.py rename to src/pygpt_net/ui/layout/toolbox/main.py index 37e382698..1496f3b41 100644 --- a/src/pygpt_net/core/ui/layout/toolbox/main.py +++ b/src/pygpt_net/ui/layout/toolbox/main.py @@ -6,18 +6,18 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtGui import Qt from PySide6.QtWidgets import QSplitter -from pygpt_net.core.ui.layout.toolbox.assistants import Assistants -from pygpt_net.core.ui.layout.toolbox.mode import Mode -from pygpt_net.core.ui.layout.toolbox.model import Model -from pygpt_net.core.ui.layout.toolbox.presets import Presets -from pygpt_net.core.ui.layout.toolbox.prompt import Prompt -from pygpt_net.core.ui.layout.toolbox.footer import Footer +from pygpt_net.ui.layout.toolbox.assistants import Assistants +from pygpt_net.ui.layout.toolbox.mode import Mode +from pygpt_net.ui.layout.toolbox.model import Model +from pygpt_net.ui.layout.toolbox.presets import Presets +from pygpt_net.ui.layout.toolbox.prompt import Prompt +from pygpt_net.ui.layout.toolbox.footer import Footer class ToolboxMain: diff --git a/src/pygpt_net/core/ui/layout/toolbox/mode.py b/src/pygpt_net/ui/layout/toolbox/mode.py similarity index 95% rename from src/pygpt_net/core/ui/layout/toolbox/mode.py rename to src/pygpt_net/ui/layout/toolbox/mode.py index b12eca0bb..60d6f9aee 100644 --- a/src/pygpt_net/core/ui/layout/toolbox/mode.py +++ b/src/pygpt_net/ui/layout/toolbox/mode.py @@ -6,14 +6,14 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtGui import QStandardItemModel from PySide6.QtWidgets import QVBoxLayout, QLabel, QWidget -from pygpt_net.core.ui.widget.lists.base import BaseList -from pygpt_net.core.utils import trans +from pygpt_net.ui.widget.lists.base import BaseList +from pygpt_net.utils import trans class Mode: diff --git a/src/pygpt_net/core/ui/layout/toolbox/model.py b/src/pygpt_net/ui/layout/toolbox/model.py similarity index 95% rename from src/pygpt_net/core/ui/layout/toolbox/model.py rename to src/pygpt_net/ui/layout/toolbox/model.py index afa79f94c..2ff30f18d 100644 --- a/src/pygpt_net/core/ui/layout/toolbox/model.py +++ b/src/pygpt_net/ui/layout/toolbox/model.py @@ -6,14 +6,14 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtGui import QStandardItemModel from PySide6.QtWidgets import QVBoxLayout, QLabel, QSplitter, QWidget -from pygpt_net.core.ui.widget.lists.base import BaseList -from pygpt_net.core.utils import trans +from pygpt_net.ui.widget.lists.base import BaseList +from pygpt_net.utils import trans class Model: diff --git a/src/pygpt_net/core/ui/layout/toolbox/presets.py b/src/pygpt_net/ui/layout/toolbox/presets.py similarity index 94% rename from src/pygpt_net/core/ui/layout/toolbox/presets.py rename to src/pygpt_net/ui/layout/toolbox/presets.py index 1d917426d..325d374aa 100644 --- a/src/pygpt_net/core/ui/layout/toolbox/presets.py +++ b/src/pygpt_net/ui/layout/toolbox/presets.py @@ -6,15 +6,15 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtGui import QStandardItemModel, Qt from PySide6.QtWidgets import QVBoxLayout, QLabel, QHBoxLayout, QPushButton, QSplitter, QWidget -from pygpt_net.core.ui.widget.lists.preset import PresetList -from pygpt_net.core.ui.layout.toolbox.footer import Footer -from pygpt_net.core.utils import trans +from pygpt_net.ui.widget.lists.preset import PresetList +from pygpt_net.ui.layout.toolbox.footer import Footer +from pygpt_net.utils import trans class Presets: diff --git a/src/pygpt_net/core/ui/layout/toolbox/prompt.py b/src/pygpt_net/ui/layout/toolbox/prompt.py similarity index 94% rename from src/pygpt_net/core/ui/layout/toolbox/prompt.py rename to src/pygpt_net/ui/layout/toolbox/prompt.py index 53e4ffa33..57bf8fc99 100644 --- a/src/pygpt_net/core/ui/layout/toolbox/prompt.py +++ b/src/pygpt_net/ui/layout/toolbox/prompt.py @@ -6,14 +6,14 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtGui import Qt from PySide6.QtWidgets import QVBoxLayout, QLabel, QHBoxLayout, QPushButton, QWidget, QCheckBox -from pygpt_net.core.ui.widget.option.textarea import OptionTextarea -from pygpt_net.core.utils import trans +from pygpt_net.ui.widget.option.textarea import OptionTextarea +from pygpt_net.utils import trans class Prompt: diff --git a/src/pygpt_net/core/ui/layout/toolbox/vision.py b/src/pygpt_net/ui/layout/toolbox/vision.py similarity index 96% rename from src/pygpt_net/core/ui/layout/toolbox/vision.py rename to src/pygpt_net/ui/layout/toolbox/vision.py index e001c1b7e..f70b11e7b 100644 --- a/src/pygpt_net/core/ui/layout/toolbox/vision.py +++ b/src/pygpt_net/ui/layout/toolbox/vision.py @@ -6,12 +6,12 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtWidgets import QVBoxLayout, QLabel, QHBoxLayout, QWidget, QCheckBox -from pygpt_net.core.utils import trans +from pygpt_net.utils import trans class Vision: diff --git a/src/pygpt_net/core/ui/main.py b/src/pygpt_net/ui/main.py similarity index 91% rename from src/pygpt_net/core/ui/main.py rename to src/pygpt_net/ui/main.py index 63a734077..747928d06 100755 --- a/src/pygpt_net/core/ui/main.py +++ b/src/pygpt_net/ui/main.py @@ -15,11 +15,11 @@ from PySide6.QtGui import QFontDatabase from PySide6.QtWidgets import QSplitter -from pygpt_net.core.ui.dialogs import Dialogs -from pygpt_net.core.ui.layout.chat.main import ChatMain -from pygpt_net.core.ui.layout.ctx.main import CtxMain -from pygpt_net.core.ui.layout.toolbox.main import ToolboxMain -from pygpt_net.core.ui.menu import Menu +from pygpt_net.ui.dialogs import Dialogs +from pygpt_net.ui.layout.chat.main import ChatMain +from pygpt_net.ui.layout.ctx.main import CtxMain +from pygpt_net.ui.layout.toolbox.main import ToolboxMain +from pygpt_net.ui.menu import Menu class UI: diff --git a/src/pygpt_net/core/ui/menu.py b/src/pygpt_net/ui/menu.py similarity index 99% rename from src/pygpt_net/core/ui/menu.py rename to src/pygpt_net/ui/menu.py index 130cd6a6a..13d54a474 100755 --- a/src/pygpt_net/core/ui/menu.py +++ b/src/pygpt_net/ui/menu.py @@ -6,12 +6,12 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtGui import QAction, QIcon -from pygpt_net.core.utils import trans +from pygpt_net.utils import trans class Menu: diff --git a/src/pygpt_net/core/ui/widget/__init__.py b/src/pygpt_net/ui/widget/__init__.py similarity index 100% rename from src/pygpt_net/core/ui/widget/__init__.py rename to src/pygpt_net/ui/widget/__init__.py diff --git a/src/pygpt_net/core/ui/widget/audio/__init__.py b/src/pygpt_net/ui/widget/audio/__init__.py similarity index 100% rename from src/pygpt_net/core/ui/widget/audio/__init__.py rename to src/pygpt_net/ui/widget/audio/__init__.py diff --git a/src/pygpt_net/core/ui/widget/audio/input.py b/src/pygpt_net/ui/widget/audio/input.py similarity index 94% rename from src/pygpt_net/core/ui/widget/audio/input.py rename to src/pygpt_net/ui/widget/audio/input.py index 5fd5d6485..297df5eca 100644 --- a/src/pygpt_net/core/ui/widget/audio/input.py +++ b/src/pygpt_net/ui/widget/audio/input.py @@ -6,13 +6,13 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtCore import Qt from PySide6.QtWidgets import QLabel, QCheckBox, QHBoxLayout, QWidget -from pygpt_net.core.utils import trans +from pygpt_net.utils import trans class AudioInput(QWidget): diff --git a/src/pygpt_net/core/ui/widget/audio/output.py b/src/pygpt_net/ui/widget/audio/output.py similarity index 96% rename from src/pygpt_net/core/ui/widget/audio/output.py rename to src/pygpt_net/ui/widget/audio/output.py index 25e4e2f8e..53c350b1f 100644 --- a/src/pygpt_net/core/ui/widget/audio/output.py +++ b/src/pygpt_net/ui/widget/audio/output.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtCore import Qt diff --git a/src/pygpt_net/core/ui/widget/dialog/__init__.py b/src/pygpt_net/ui/widget/dialog/__init__.py similarity index 100% rename from src/pygpt_net/core/ui/widget/dialog/__init__.py rename to src/pygpt_net/ui/widget/dialog/__init__.py diff --git a/src/pygpt_net/core/ui/widget/dialog/alert.py b/src/pygpt_net/ui/widget/dialog/alert.py similarity index 92% rename from src/pygpt_net/core/ui/widget/dialog/alert.py rename to src/pygpt_net/ui/widget/dialog/alert.py index debf1afda..89d217a08 100644 --- a/src/pygpt_net/core/ui/widget/dialog/alert.py +++ b/src/pygpt_net/ui/widget/dialog/alert.py @@ -6,12 +6,12 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtWidgets import QDialog, QDialogButtonBox, QVBoxLayout, QPlainTextEdit -from pygpt_net.core.utils import trans +from pygpt_net.utils import trans class AlertDialog(QDialog): diff --git a/src/pygpt_net/core/ui/widget/dialog/confirm.py b/src/pygpt_net/ui/widget/dialog/confirm.py similarity index 95% rename from src/pygpt_net/core/ui/widget/dialog/confirm.py rename to src/pygpt_net/ui/widget/dialog/confirm.py index d2e08fc4d..4267ba848 100644 --- a/src/pygpt_net/core/ui/widget/dialog/confirm.py +++ b/src/pygpt_net/ui/widget/dialog/confirm.py @@ -6,13 +6,13 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtCore import Qt from PySide6.QtWidgets import QDialog, QLabel, QHBoxLayout, QVBoxLayout, QPushButton -from pygpt_net.core.utils import trans +from pygpt_net.utils import trans class ConfirmDialog(QDialog): diff --git a/src/pygpt_net/core/ui/widget/dialog/debug.py b/src/pygpt_net/ui/widget/dialog/debug.py similarity index 96% rename from src/pygpt_net/core/ui/widget/dialog/debug.py rename to src/pygpt_net/ui/widget/dialog/debug.py index 2b9f0991c..daa71cff5 100644 --- a/src/pygpt_net/core/ui/widget/dialog/debug.py +++ b/src/pygpt_net/ui/widget/dialog/debug.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtCore import Qt diff --git a/src/pygpt_net/core/ui/widget/dialog/editor.py b/src/pygpt_net/ui/widget/dialog/editor.py similarity index 96% rename from src/pygpt_net/core/ui/widget/dialog/editor.py rename to src/pygpt_net/ui/widget/dialog/editor.py index 6516a2fbc..082ad5b8a 100644 --- a/src/pygpt_net/core/ui/widget/dialog/editor.py +++ b/src/pygpt_net/ui/widget/dialog/editor.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtCore import Qt diff --git a/src/pygpt_net/core/ui/widget/dialog/editor_file.py b/src/pygpt_net/ui/widget/dialog/editor_file.py similarity index 96% rename from src/pygpt_net/core/ui/widget/dialog/editor_file.py rename to src/pygpt_net/ui/widget/dialog/editor_file.py index 2ee028c70..e8c73d487 100644 --- a/src/pygpt_net/core/ui/widget/dialog/editor_file.py +++ b/src/pygpt_net/ui/widget/dialog/editor_file.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtCore import Qt diff --git a/src/pygpt_net/core/ui/widget/dialog/image.py b/src/pygpt_net/ui/widget/dialog/image.py similarity index 93% rename from src/pygpt_net/core/ui/widget/dialog/image.py rename to src/pygpt_net/ui/widget/dialog/image.py index f2c5cc124..dc8019de5 100644 --- a/src/pygpt_net/core/ui/widget/dialog/image.py +++ b/src/pygpt_net/ui/widget/dialog/image.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtWidgets import QDialog diff --git a/src/pygpt_net/core/ui/widget/dialog/info.py b/src/pygpt_net/ui/widget/dialog/info.py similarity index 96% rename from src/pygpt_net/core/ui/widget/dialog/info.py rename to src/pygpt_net/ui/widget/dialog/info.py index 3a3c330aa..c04ca4f96 100644 --- a/src/pygpt_net/core/ui/widget/dialog/info.py +++ b/src/pygpt_net/ui/widget/dialog/info.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtCore import Qt diff --git a/src/pygpt_net/core/ui/widget/dialog/logger.py b/src/pygpt_net/ui/widget/dialog/logger.py similarity index 96% rename from src/pygpt_net/core/ui/widget/dialog/logger.py rename to src/pygpt_net/ui/widget/dialog/logger.py index 3eacc5cb8..5e82e0be8 100644 --- a/src/pygpt_net/core/ui/widget/dialog/logger.py +++ b/src/pygpt_net/ui/widget/dialog/logger.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtCore import Qt diff --git a/src/pygpt_net/core/ui/widget/dialog/rename.py b/src/pygpt_net/ui/widget/dialog/rename.py similarity index 92% rename from src/pygpt_net/core/ui/widget/dialog/rename.py rename to src/pygpt_net/ui/widget/dialog/rename.py index 2508b48af..4c9e8b2f6 100644 --- a/src/pygpt_net/core/ui/widget/dialog/rename.py +++ b/src/pygpt_net/ui/widget/dialog/rename.py @@ -6,13 +6,13 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtWidgets import QDialog, QLabel, QHBoxLayout, QVBoxLayout, QPushButton -from pygpt_net.core.utils import trans -from pygpt_net.core.ui.widget.textarea.rename import RenameInput +from pygpt_net.utils import trans +from pygpt_net.ui.widget.textarea.rename import RenameInput class RenameDialog(QDialog): diff --git a/src/pygpt_net/core/ui/widget/dialog/settings.py b/src/pygpt_net/ui/widget/dialog/settings.py similarity index 96% rename from src/pygpt_net/core/ui/widget/dialog/settings.py rename to src/pygpt_net/ui/widget/dialog/settings.py index c12ba4b37..dc23a35fb 100644 --- a/src/pygpt_net/core/ui/widget/dialog/settings.py +++ b/src/pygpt_net/ui/widget/dialog/settings.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 18:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtCore import Qt diff --git a/src/pygpt_net/core/ui/widget/dialog/settings_plugin.py b/src/pygpt_net/ui/widget/dialog/settings_plugin.py similarity index 96% rename from src/pygpt_net/core/ui/widget/dialog/settings_plugin.py rename to src/pygpt_net/ui/widget/dialog/settings_plugin.py index 520deb980..4158c39d4 100644 --- a/src/pygpt_net/core/ui/widget/dialog/settings_plugin.py +++ b/src/pygpt_net/ui/widget/dialog/settings_plugin.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 18:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtCore import Qt diff --git a/src/pygpt_net/core/ui/widget/dialog/update.py b/src/pygpt_net/ui/widget/dialog/update.py similarity index 96% rename from src/pygpt_net/core/ui/widget/dialog/update.py rename to src/pygpt_net/ui/widget/dialog/update.py index 23c562c30..9aab00ca9 100644 --- a/src/pygpt_net/core/ui/widget/dialog/update.py +++ b/src/pygpt_net/ui/widget/dialog/update.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import os @@ -15,7 +15,7 @@ from PySide6.QtGui import QPixmap from PySide6.QtWidgets import QDialog, QLabel, QVBoxLayout, QPushButton, QPlainTextEdit, QHBoxLayout -from pygpt_net.core.utils import trans +from pygpt_net.utils import trans class UpdateDialog(QDialog): diff --git a/src/pygpt_net/core/ui/widget/element/__init__.py b/src/pygpt_net/ui/widget/element/__init__.py similarity index 100% rename from src/pygpt_net/core/ui/widget/element/__init__.py rename to src/pygpt_net/ui/widget/element/__init__.py diff --git a/src/pygpt_net/core/ui/widget/element/group.py b/src/pygpt_net/ui/widget/element/group.py similarity index 97% rename from src/pygpt_net/core/ui/widget/element/group.py rename to src/pygpt_net/ui/widget/element/group.py index 4bb9f18f8..c974ef3f5 100644 --- a/src/pygpt_net/core/ui/widget/element/group.py +++ b/src/pygpt_net/ui/widget/element/group.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 18:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtWidgets import QCheckBox, QWidget, QVBoxLayout diff --git a/src/pygpt_net/core/ui/widget/element/url.py b/src/pygpt_net/ui/widget/element/url.py similarity index 96% rename from src/pygpt_net/core/ui/widget/element/url.py rename to src/pygpt_net/ui/widget/element/url.py index 8e3641c9e..2e14ca183 100644 --- a/src/pygpt_net/core/ui/widget/element/url.py +++ b/src/pygpt_net/ui/widget/element/url.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 18:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import webbrowser diff --git a/src/pygpt_net/core/ui/widget/filesystem/__init__.py b/src/pygpt_net/ui/widget/filesystem/__init__.py similarity index 100% rename from src/pygpt_net/core/ui/widget/filesystem/__init__.py rename to src/pygpt_net/ui/widget/filesystem/__init__.py diff --git a/src/pygpt_net/core/ui/widget/filesystem/explorer.py b/src/pygpt_net/ui/widget/filesystem/explorer.py similarity index 97% rename from src/pygpt_net/core/ui/widget/filesystem/explorer.py rename to src/pygpt_net/ui/widget/filesystem/explorer.py index bb2efa82d..fbe198453 100644 --- a/src/pygpt_net/core/ui/widget/filesystem/explorer.py +++ b/src/pygpt_net/ui/widget/filesystem/explorer.py @@ -6,14 +6,14 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtCore import Qt from PySide6.QtGui import QAction, QIcon, QCursor, QResizeEvent from PySide6.QtWidgets import QTreeView, QMenu, QWidget, QVBoxLayout, QFileSystemModel, QLabel -from pygpt_net.core.utils import trans +from pygpt_net.utils import trans class FileExplorer(QWidget): diff --git a/src/pygpt_net/core/ui/widget/image/__init__.py b/src/pygpt_net/ui/widget/image/__init__.py similarity index 100% rename from src/pygpt_net/core/ui/widget/image/__init__.py rename to src/pygpt_net/ui/widget/image/__init__.py diff --git a/src/pygpt_net/core/ui/widget/image/display.py b/src/pygpt_net/ui/widget/image/display.py similarity index 96% rename from src/pygpt_net/core/ui/widget/image/display.py rename to src/pygpt_net/ui/widget/image/display.py index cfc310ed5..16273c159 100644 --- a/src/pygpt_net/core/ui/widget/image/display.py +++ b/src/pygpt_net/ui/widget/image/display.py @@ -6,13 +6,13 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtGui import QAction, QIcon from PySide6.QtWidgets import QMenu, QLabel -from pygpt_net.core.utils import trans +from pygpt_net.utils import trans class ImageLabel(QLabel): diff --git a/src/pygpt_net/core/ui/widget/lists/__init__.py b/src/pygpt_net/ui/widget/lists/__init__.py similarity index 100% rename from src/pygpt_net/core/ui/widget/lists/__init__.py rename to src/pygpt_net/ui/widget/lists/__init__.py diff --git a/src/pygpt_net/core/ui/widget/lists/assistant.py b/src/pygpt_net/ui/widget/lists/assistant.py similarity index 94% rename from src/pygpt_net/core/ui/widget/lists/assistant.py rename to src/pygpt_net/ui/widget/lists/assistant.py index ecb242801..46076b313 100644 --- a/src/pygpt_net/core/ui/widget/lists/assistant.py +++ b/src/pygpt_net/ui/widget/lists/assistant.py @@ -6,14 +6,14 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 18:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtGui import QAction, QIcon from PySide6.QtWidgets import QMenu -from pygpt_net.core.ui.widget.lists.base import BaseList -from pygpt_net.core.utils import trans +from pygpt_net.ui.widget.lists.base import BaseList +from pygpt_net.utils import trans class AssistantList(BaseList): diff --git a/src/pygpt_net/core/ui/widget/lists/attachment.py b/src/pygpt_net/ui/widget/lists/attachment.py similarity index 96% rename from src/pygpt_net/core/ui/widget/lists/attachment.py rename to src/pygpt_net/ui/widget/lists/attachment.py index 7d333a73d..64d44c5ac 100644 --- a/src/pygpt_net/core/ui/widget/lists/attachment.py +++ b/src/pygpt_net/ui/widget/lists/attachment.py @@ -6,14 +6,14 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtGui import QAction, QIcon, QResizeEvent from PySide6.QtWidgets import QMenu -from pygpt_net.core.ui.widget.lists.base import BaseList -from pygpt_net.core.utils import trans +from pygpt_net.ui.widget.lists.base import BaseList +from pygpt_net.utils import trans class AttachmentList(BaseList): diff --git a/src/pygpt_net/core/ui/widget/lists/base.py b/src/pygpt_net/ui/widget/lists/base.py similarity index 97% rename from src/pygpt_net/core/ui/widget/lists/base.py rename to src/pygpt_net/ui/widget/lists/base.py index 2c975a77c..9abd87ba5 100644 --- a/src/pygpt_net/core/ui/widget/lists/base.py +++ b/src/pygpt_net/ui/widget/lists/base.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 18:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtCore import QItemSelectionModel diff --git a/src/pygpt_net/core/ui/widget/lists/context.py b/src/pygpt_net/ui/widget/lists/context.py similarity index 94% rename from src/pygpt_net/core/ui/widget/lists/context.py rename to src/pygpt_net/ui/widget/lists/context.py index 5efd359ea..53552246f 100644 --- a/src/pygpt_net/core/ui/widget/lists/context.py +++ b/src/pygpt_net/ui/widget/lists/context.py @@ -6,14 +6,14 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 18:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtGui import QAction, QIcon from PySide6.QtWidgets import QMenu -from pygpt_net.core.ui.widget.lists.base import BaseList -from pygpt_net.core.utils import trans +from pygpt_net.ui.widget.lists.base import BaseList +from pygpt_net.utils import trans class ContextList(BaseList): diff --git a/src/pygpt_net/core/ui/widget/lists/plugin.py b/src/pygpt_net/ui/widget/lists/plugin.py similarity index 91% rename from src/pygpt_net/core/ui/widget/lists/plugin.py rename to src/pygpt_net/ui/widget/lists/plugin.py index 291a6caec..ca32f68ee 100644 --- a/src/pygpt_net/core/ui/widget/lists/plugin.py +++ b/src/pygpt_net/ui/widget/lists/plugin.py @@ -6,10 +6,10 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # -from pygpt_net.core.ui.widget.lists.base import BaseList +from pygpt_net.ui.widget.lists.base import BaseList class PluginList(BaseList): diff --git a/src/pygpt_net/core/ui/widget/lists/preset.py b/src/pygpt_net/ui/widget/lists/preset.py similarity index 95% rename from src/pygpt_net/core/ui/widget/lists/preset.py rename to src/pygpt_net/ui/widget/lists/preset.py index a81d521c6..9d8193755 100644 --- a/src/pygpt_net/core/ui/widget/lists/preset.py +++ b/src/pygpt_net/ui/widget/lists/preset.py @@ -6,14 +6,14 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 18:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtGui import QAction, QIcon from PySide6.QtWidgets import QMenu -from pygpt_net.core.ui.widget.lists.base import BaseList -from pygpt_net.core.utils import trans +from pygpt_net.ui.widget.lists.base import BaseList +from pygpt_net.utils import trans class PresetList(BaseList): diff --git a/src/pygpt_net/core/ui/widget/lists/uploaded.py b/src/pygpt_net/ui/widget/lists/uploaded.py similarity index 96% rename from src/pygpt_net/core/ui/widget/lists/uploaded.py rename to src/pygpt_net/ui/widget/lists/uploaded.py index 99804f304..72b7e090b 100644 --- a/src/pygpt_net/core/ui/widget/lists/uploaded.py +++ b/src/pygpt_net/ui/widget/lists/uploaded.py @@ -6,14 +6,14 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 18:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtGui import QAction, QIcon, QResizeEvent from PySide6.QtWidgets import QMenu -from pygpt_net.core.ui.widget.lists.base import BaseList -from pygpt_net.core.utils import trans +from pygpt_net.ui.widget.lists.base import BaseList +from pygpt_net.utils import trans class UploadedFileList(BaseList): diff --git a/src/pygpt_net/core/ui/widget/option/__init__.py b/src/pygpt_net/ui/widget/option/__init__.py similarity index 100% rename from src/pygpt_net/core/ui/widget/option/__init__.py rename to src/pygpt_net/ui/widget/option/__init__.py diff --git a/src/pygpt_net/core/ui/widget/option/checkbox.py b/src/pygpt_net/ui/widget/option/checkbox.py similarity index 96% rename from src/pygpt_net/core/ui/widget/option/checkbox.py rename to src/pygpt_net/ui/widget/option/checkbox.py index b3f59b3df..0728e37de 100644 --- a/src/pygpt_net/core/ui/widget/option/checkbox.py +++ b/src/pygpt_net/ui/widget/option/checkbox.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtWidgets import QCheckBox, QHBoxLayout, QWidget diff --git a/src/pygpt_net/core/ui/widget/option/dictionary.py b/src/pygpt_net/ui/widget/option/dictionary.py similarity index 98% rename from src/pygpt_net/core/ui/widget/option/dictionary.py rename to src/pygpt_net/ui/widget/option/dictionary.py index cb0ea6ea9..35fc62bd1 100644 --- a/src/pygpt_net/core/ui/widget/option/dictionary.py +++ b/src/pygpt_net/ui/widget/option/dictionary.py @@ -6,14 +6,14 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtCore import Qt, QAbstractItemModel, QModelIndex from PySide6.QtGui import QAction, QIcon from PySide6.QtWidgets import QWidget, QVBoxLayout, QPushButton, QTreeView, QMenu -from pygpt_net.core.utils import trans +from pygpt_net.utils import trans class OptionDict(QWidget): diff --git a/src/pygpt_net/core/ui/widget/option/input.py b/src/pygpt_net/ui/widget/option/input.py similarity index 97% rename from src/pygpt_net/core/ui/widget/option/input.py rename to src/pygpt_net/ui/widget/option/input.py index 8ec996ccc..167f30b04 100644 --- a/src/pygpt_net/core/ui/widget/option/input.py +++ b/src/pygpt_net/ui/widget/option/input.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtWidgets import QLineEdit diff --git a/src/pygpt_net/core/ui/widget/option/slider.py b/src/pygpt_net/ui/widget/option/slider.py similarity index 94% rename from src/pygpt_net/core/ui/widget/option/slider.py rename to src/pygpt_net/ui/widget/option/slider.py index e5ea9b5f9..b5ce0efb9 100644 --- a/src/pygpt_net/core/ui/widget/option/slider.py +++ b/src/pygpt_net/ui/widget/option/slider.py @@ -6,13 +6,13 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtCore import Qt from PySide6.QtWidgets import QLabel, QHBoxLayout, QWidget, QSlider -from pygpt_net.core.ui.widget.option.input import OptionInputInline +from pygpt_net.ui.widget.option.input import OptionInputInline class NoScrollSlider(QSlider): diff --git a/src/pygpt_net/core/ui/widget/option/textarea.py b/src/pygpt_net/ui/widget/option/textarea.py similarity index 96% rename from src/pygpt_net/core/ui/widget/option/textarea.py rename to src/pygpt_net/ui/widget/option/textarea.py index 4501b1ca2..b57fed82c 100644 --- a/src/pygpt_net/core/ui/widget/option/textarea.py +++ b/src/pygpt_net/ui/widget/option/textarea.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtWidgets import QTextEdit diff --git a/src/pygpt_net/core/ui/widget/textarea/__init__.py b/src/pygpt_net/ui/widget/textarea/__init__.py similarity index 100% rename from src/pygpt_net/core/ui/widget/textarea/__init__.py rename to src/pygpt_net/ui/widget/textarea/__init__.py diff --git a/src/pygpt_net/core/ui/widget/textarea/input.py b/src/pygpt_net/ui/widget/textarea/input.py similarity index 97% rename from src/pygpt_net/core/ui/widget/textarea/input.py rename to src/pygpt_net/ui/widget/textarea/input.py index 30d41ba24..fc8942e93 100644 --- a/src/pygpt_net/core/ui/widget/textarea/input.py +++ b/src/pygpt_net/ui/widget/textarea/input.py @@ -6,14 +6,14 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6 import QtCore from PySide6.QtCore import Qt from PySide6.QtWidgets import QTextEdit, QApplication, QMenu -from pygpt_net.core.utils import trans +from pygpt_net.utils import trans class ChatInput(QTextEdit): diff --git a/src/pygpt_net/core/ui/widget/textarea/name.py b/src/pygpt_net/ui/widget/textarea/name.py similarity index 95% rename from src/pygpt_net/core/ui/widget/textarea/name.py rename to src/pygpt_net/ui/widget/textarea/name.py index bef6adc91..508fe5699 100644 --- a/src/pygpt_net/core/ui/widget/textarea/name.py +++ b/src/pygpt_net/ui/widget/textarea/name.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtWidgets import QLineEdit diff --git a/src/pygpt_net/core/ui/widget/textarea/notepad.py b/src/pygpt_net/ui/widget/textarea/notepad.py similarity index 97% rename from src/pygpt_net/core/ui/widget/textarea/notepad.py rename to src/pygpt_net/ui/widget/textarea/notepad.py index 7faa11d4c..0e4994666 100644 --- a/src/pygpt_net/core/ui/widget/textarea/notepad.py +++ b/src/pygpt_net/ui/widget/textarea/notepad.py @@ -6,13 +6,13 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtCore import Qt from PySide6.QtWidgets import QTextEdit, QMenu -from pygpt_net.core.utils import trans +from pygpt_net.utils import trans class NotepadOutput(QTextEdit): diff --git a/src/pygpt_net/core/ui/widget/textarea/output.py b/src/pygpt_net/ui/widget/textarea/output.py similarity index 97% rename from src/pygpt_net/core/ui/widget/textarea/output.py rename to src/pygpt_net/ui/widget/textarea/output.py index 09cc18944..50b771330 100644 --- a/src/pygpt_net/core/ui/widget/textarea/output.py +++ b/src/pygpt_net/ui/widget/textarea/output.py @@ -6,13 +6,13 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtCore import Qt from PySide6.QtWidgets import QTextBrowser, QMenu -from pygpt_net.core.utils import trans +from pygpt_net.utils import trans class ChatOutput(QTextBrowser): diff --git a/src/pygpt_net/core/ui/widget/textarea/rename.py b/src/pygpt_net/ui/widget/textarea/rename.py similarity index 96% rename from src/pygpt_net/core/ui/widget/textarea/rename.py rename to src/pygpt_net/ui/widget/textarea/rename.py index b6918f711..213c9bbf1 100644 --- a/src/pygpt_net/core/ui/widget/textarea/rename.py +++ b/src/pygpt_net/ui/widget/textarea/rename.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 18:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6 import QtCore diff --git a/src/pygpt_net/core/ui/widget/vision/__init__.py b/src/pygpt_net/ui/widget/vision/__init__.py similarity index 100% rename from src/pygpt_net/core/ui/widget/vision/__init__.py rename to src/pygpt_net/ui/widget/vision/__init__.py diff --git a/src/pygpt_net/core/ui/widget/vision/camera.py b/src/pygpt_net/ui/widget/vision/camera.py similarity index 96% rename from src/pygpt_net/core/ui/widget/vision/camera.py rename to src/pygpt_net/ui/widget/vision/camera.py index b2619d810..0868c3f87 100644 --- a/src/pygpt_net/core/ui/widget/vision/camera.py +++ b/src/pygpt_net/ui/widget/vision/camera.py @@ -6,13 +6,13 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.22 19:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # from PySide6.QtCore import Qt from PySide6.QtWidgets import QLabel, QWidget, QVBoxLayout -from pygpt_net.core.utils import trans +from pygpt_net.utils import trans class VideoContainer(QWidget): diff --git a/src/pygpt_net/core/updater.py b/src/pygpt_net/updater.py similarity index 98% rename from src/pygpt_net/core/updater.py rename to src/pygpt_net/updater.py index 2bfe431c0..5efb43d91 100755 --- a/src/pygpt_net/core/updater.py +++ b/src/pygpt_net/updater.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.23 22:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import copy @@ -18,7 +18,7 @@ from urllib.request import urlopen, Request from packaging.version import parse as parse_version -from pygpt_net.core.utils import trans +from pygpt_net.utils import trans class Updater: diff --git a/src/pygpt_net/core/utils.py b/src/pygpt_net/utils.py similarity index 95% rename from src/pygpt_net/core/utils.py rename to src/pygpt_net/utils.py index 047974351..024c8476d 100755 --- a/src/pygpt_net/core/utils.py +++ b/src/pygpt_net/utils.py @@ -6,7 +6,7 @@ # GitHub: https://github.com/szczyglis-dev/py-gpt # # MIT License # # Created By : Marcin Szczygliński # -# Updated Date: 2023.12.18 14:00:00 # +# Updated Date: 2023.12.25 21:00:00 # # ================================================== # import os @@ -61,7 +61,7 @@ def get_init_value(key="__version__"): if __file__.endswith('.pyc'): # if compiled with pyinstaller root = '.' else: - root = os.path.join(os.path.dirname(__file__), os.pardir) + root = os.path.dirname(__file__) path = os.path.abspath(os.path.join(root, '__init__.py')) try: if init_file_meta is None: