pygpt-net 2.4.41__py3-none-any.whl → 2.4.42__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. CHANGELOG.md +8 -0
  2. README.md +135 -70
  3. pygpt_net/CHANGELOG.txt +8 -0
  4. pygpt_net/__init__.py +3 -3
  5. pygpt_net/app.py +3 -1
  6. pygpt_net/controller/audio/__init__.py +2 -2
  7. pygpt_net/controller/camera.py +1 -10
  8. pygpt_net/controller/chat/audio.py +2 -2
  9. pygpt_net/controller/config/placeholder.py +15 -1
  10. pygpt_net/controller/ui/mode.py +16 -21
  11. pygpt_net/core/audio/__init__.py +4 -1
  12. pygpt_net/core/audio/whisper.py +37 -0
  13. pygpt_net/core/bridge/worker.py +2 -2
  14. pygpt_net/core/debug/events.py +22 -10
  15. pygpt_net/core/debug/tabs.py +6 -3
  16. pygpt_net/core/history.py +3 -2
  17. pygpt_net/core/idx/__init__.py +16 -4
  18. pygpt_net/core/idx/chat.py +15 -5
  19. pygpt_net/core/idx/indexing.py +24 -8
  20. pygpt_net/core/installer.py +2 -4
  21. pygpt_net/core/models.py +62 -17
  22. pygpt_net/core/modes.py +11 -13
  23. pygpt_net/core/notepad.py +4 -4
  24. pygpt_net/core/plugins.py +27 -16
  25. pygpt_net/core/presets.py +20 -9
  26. pygpt_net/core/profile.py +11 -3
  27. pygpt_net/core/render/web/parser.py +3 -1
  28. pygpt_net/core/settings.py +5 -5
  29. pygpt_net/core/tabs/tab.py +10 -2
  30. pygpt_net/core/tokens.py +8 -6
  31. pygpt_net/core/web/__init__.py +105 -0
  32. pygpt_net/core/{web.py → web/helpers.py} +93 -67
  33. pygpt_net/data/config/config.json +3 -3
  34. pygpt_net/data/config/models.json +3 -3
  35. pygpt_net/data/config/modes.json +3 -3
  36. pygpt_net/data/locale/locale.en.ini +1 -0
  37. pygpt_net/data/locale/plugin.cmd_web.en.ini +2 -0
  38. pygpt_net/data/locale/plugin.mailer.en.ini +21 -0
  39. pygpt_net/item/ctx.py +13 -2
  40. pygpt_net/plugin/agent/__init__.py +7 -2
  41. pygpt_net/plugin/audio_output/__init__.py +6 -1
  42. pygpt_net/plugin/base/plugin.py +58 -26
  43. pygpt_net/plugin/base/worker.py +20 -17
  44. pygpt_net/plugin/cmd_history/config.py +2 -2
  45. pygpt_net/plugin/cmd_web/__init__.py +3 -4
  46. pygpt_net/plugin/cmd_web/config.py +71 -3
  47. pygpt_net/plugin/cmd_web/websearch.py +20 -12
  48. pygpt_net/plugin/cmd_web/worker.py +67 -4
  49. pygpt_net/plugin/idx_llama_index/config.py +3 -3
  50. pygpt_net/plugin/mailer/__init__.py +123 -0
  51. pygpt_net/plugin/mailer/config.py +149 -0
  52. pygpt_net/plugin/mailer/runner.py +285 -0
  53. pygpt_net/plugin/mailer/worker.py +123 -0
  54. pygpt_net/provider/agents/base.py +5 -2
  55. pygpt_net/provider/agents/openai.py +4 -2
  56. pygpt_net/provider/agents/openai_assistant.py +4 -2
  57. pygpt_net/provider/agents/planner.py +4 -2
  58. pygpt_net/provider/agents/react.py +4 -2
  59. pygpt_net/provider/audio_output/openai_tts.py +5 -11
  60. pygpt_net/provider/core/assistant/base.py +5 -3
  61. pygpt_net/provider/core/assistant/json_file.py +8 -5
  62. pygpt_net/provider/core/assistant_file/base.py +4 -3
  63. pygpt_net/provider/core/assistant_file/db_sqlite/__init__.py +4 -3
  64. pygpt_net/provider/core/assistant_file/db_sqlite/storage.py +3 -2
  65. pygpt_net/provider/core/assistant_store/base.py +6 -4
  66. pygpt_net/provider/core/assistant_store/db_sqlite/__init__.py +5 -4
  67. pygpt_net/provider/core/assistant_store/db_sqlite/storage.py +5 -3
  68. pygpt_net/provider/core/attachment/base.py +5 -3
  69. pygpt_net/provider/core/attachment/json_file.py +4 -3
  70. pygpt_net/provider/core/calendar/base.py +5 -3
  71. pygpt_net/provider/core/calendar/db_sqlite/__init__.py +6 -5
  72. pygpt_net/provider/core/calendar/db_sqlite/storage.py +5 -4
  73. pygpt_net/provider/core/config/base.py +8 -6
  74. pygpt_net/provider/core/config/json_file.py +9 -7
  75. pygpt_net/provider/core/ctx/base.py +27 -25
  76. pygpt_net/provider/core/ctx/db_sqlite/__init__.py +51 -35
  77. pygpt_net/provider/core/ctx/db_sqlite/storage.py +42 -31
  78. pygpt_net/provider/core/ctx/db_sqlite/utils.py +11 -9
  79. pygpt_net/provider/core/index/base.py +129 -23
  80. pygpt_net/provider/core/index/db_sqlite/__init__.py +130 -23
  81. pygpt_net/provider/core/index/db_sqlite/storage.py +130 -23
  82. pygpt_net/provider/core/index/db_sqlite/utils.py +4 -2
  83. pygpt_net/provider/core/mode/base.py +5 -3
  84. pygpt_net/provider/core/mode/json_file.py +7 -6
  85. pygpt_net/provider/core/model/base.py +6 -4
  86. pygpt_net/provider/core/model/json_file.py +9 -7
  87. pygpt_net/provider/core/notepad/base.py +5 -3
  88. pygpt_net/provider/core/notepad/db_sqlite/__init__.py +5 -4
  89. pygpt_net/provider/core/notepad/db_sqlite/storage.py +4 -3
  90. pygpt_net/provider/core/plugin_preset/base.py +4 -2
  91. pygpt_net/provider/core/plugin_preset/json_file.py +5 -3
  92. pygpt_net/provider/core/preset/base.py +6 -4
  93. pygpt_net/provider/core/preset/json_file.py +9 -9
  94. pygpt_net/provider/core/prompt/base.py +6 -3
  95. pygpt_net/provider/core/prompt/json_file.py +11 -6
  96. pygpt_net/provider/gpt/assistants.py +15 -6
  97. pygpt_net/provider/gpt/audio.py +5 -5
  98. pygpt_net/provider/gpt/chat.py +7 -5
  99. pygpt_net/provider/gpt/completion.py +8 -4
  100. pygpt_net/provider/gpt/image.py +3 -3
  101. pygpt_net/provider/gpt/store.py +46 -12
  102. pygpt_net/provider/gpt/vision.py +16 -11
  103. pygpt_net/provider/llms/anthropic.py +7 -2
  104. pygpt_net/provider/llms/azure_openai.py +26 -5
  105. pygpt_net/provider/llms/base.py +47 -9
  106. pygpt_net/provider/llms/google.py +7 -2
  107. pygpt_net/provider/llms/hugging_face.py +13 -3
  108. pygpt_net/provider/llms/hugging_face_api.py +18 -4
  109. pygpt_net/provider/llms/local.py +7 -2
  110. pygpt_net/provider/llms/ollama.py +30 -6
  111. pygpt_net/provider/llms/openai.py +32 -6
  112. pygpt_net/provider/vector_stores/__init__.py +45 -14
  113. pygpt_net/provider/vector_stores/base.py +35 -8
  114. pygpt_net/provider/vector_stores/chroma.py +13 -3
  115. pygpt_net/provider/vector_stores/ctx_attachment.py +31 -12
  116. pygpt_net/provider/vector_stores/elasticsearch.py +12 -3
  117. pygpt_net/provider/vector_stores/pinecode.py +12 -3
  118. pygpt_net/provider/vector_stores/redis.py +12 -3
  119. pygpt_net/provider/vector_stores/simple.py +12 -3
  120. pygpt_net/provider/vector_stores/temp.py +16 -4
  121. pygpt_net/provider/web/base.py +10 -3
  122. pygpt_net/provider/web/google_custom_search.py +9 -3
  123. pygpt_net/provider/web/microsoft_bing.py +9 -3
  124. pygpt_net/tools/__init__.py +13 -5
  125. pygpt_net/tools/audio_transcriber/__init__.py +4 -3
  126. pygpt_net/tools/base.py +15 -8
  127. pygpt_net/tools/code_interpreter/__init__.py +4 -3
  128. pygpt_net/tools/html_canvas/__init__.py +4 -3
  129. pygpt_net/tools/image_viewer/__init__.py +10 -4
  130. pygpt_net/tools/indexer/__init__.py +8 -7
  131. pygpt_net/tools/media_player/__init__.py +4 -3
  132. pygpt_net/tools/text_editor/__init__.py +36 -10
  133. pygpt_net/ui/layout/chat/output.py +2 -2
  134. pygpt_net/ui/menu/audio.py +12 -1
  135. {pygpt_net-2.4.41.dist-info → pygpt_net-2.4.42.dist-info}/METADATA +136 -71
  136. {pygpt_net-2.4.41.dist-info → pygpt_net-2.4.42.dist-info}/RECORD +139 -132
  137. {pygpt_net-2.4.41.dist-info → pygpt_net-2.4.42.dist-info}/LICENSE +0 -0
  138. {pygpt_net-2.4.41.dist-info → pygpt_net-2.4.42.dist-info}/WHEEL +0 -0
  139. {pygpt_net-2.4.41.dist-info → pygpt_net-2.4.42.dist-info}/entry_points.txt +0 -0
CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 2.4.42 (2024-12-15)
4
+
5
+ - Added Mailer plugin, which allows sending and retrieving emails from the server, and reading them. It currently supports only SMTP.
6
+ - Added 'web_request' command to the Web Search plugin, enabling GET/POST/PUT and other connections to any address and API endpoint. It also supports sending POST data, files, headers, cookies, and more.
7
+ - Improved audio output.
8
+ - Enhanced visibility of the Video menu.
9
+ - Other fixes.
10
+
3
11
  ## 2.4.41 (2024-12-14)
4
12
 
5
13
  - Improved switching between columns on a split screen.
README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![pygpt](https://snapcraft.io/pygpt/badge.svg)](https://snapcraft.io/pygpt)
4
4
 
5
- Release: **2.4.41** | build: **2024.12.14** | Python: **>=3.10, <3.12**
5
+ Release: **2.4.42** | build: **2024.12.15** | Python: **>=3.10, <3.12**
6
6
 
7
7
  > Official website: https://pygpt.net | Documentation: https://pygpt.readthedocs.io
8
8
  >
@@ -1067,6 +1067,8 @@ as well as list and create directories.
1067
1067
 
1068
1068
  - `Voice Control (inline)` - provides voice control command execution within a conversation.
1069
1069
 
1070
+ - `Mailer` - Provides the ability to send, receive and read emails.
1071
+
1070
1072
  ## Audio Input
1071
1073
 
1072
1074
  The plugin facilitates speech recognition (by default using the `Whisper` model from OpenAI, `Google` and `Bing` are also available). It allows for voice commands to be relayed to the AI using your own voice. Whisper doesn't require any extra API keys or additional configurations; it uses the main OpenAI key. In the plugin's configuration options, you should adjust the volume level (min energy) at which the plugin will respond to your microphone. Once the plugin is activated, a new `Speak` option will appear at the bottom near the `Send` button - when this is enabled, the application will respond to the voice received from the microphone.
@@ -1493,15 +1495,15 @@ sudo snap connect pygpt:docker docker:docker-daemon
1493
1495
 
1494
1496
  Automatically attach code input/output to the Python Code Interpreter window. *Default:* `True`
1495
1497
 
1496
- - `Enable: get_python_output` *cmd.get_python_output*
1498
+ - `Tool: get_python_output` *cmd.get_python_output*
1497
1499
 
1498
1500
  Allows `get_python_output` command execution. If enabled, it allows retrieval of the output from the Python Code Interpreter window. *Default:* `True`
1499
1501
 
1500
- - `Enable: get_python_input` *cmd.get_python_input*
1502
+ - `Tool: get_python_input` *cmd.get_python_input*
1501
1503
 
1502
1504
  Allows `get_python_input` command execution. If enabled, it allows retrieval all input code (from edit section) from the Python Code Interpreter window. *Default:* `True`
1503
1505
 
1504
- - `Enable: clear_python_output` *cmd.clear_python_output*
1506
+ - `Tool: clear_python_output` *cmd.clear_python_output*
1505
1507
 
1506
1508
  Allows `clear_python_output` command execution. If enabled, it allows clear the output of the Python Code Interpreter window. *Default:* `True`
1507
1509
 
@@ -1553,11 +1555,11 @@ Default: 5558
1553
1555
  Default: 5559
1554
1556
 
1555
1557
 
1556
- - `Enable: ipython_execute` *cmd.ipython_execute*
1558
+ - `Tool: ipython_execute` *cmd.ipython_execute*
1557
1559
 
1558
1560
  Allows Python code execution in IPython interpreter (in current kernel). *Default:* `True`
1559
1561
 
1560
- - `Enable: python_kernel_restart` *cmd.ipython_kernel_restart*
1562
+ - `Tool: python_kernel_restart` *cmd.ipython_kernel_restart*
1561
1563
 
1562
1564
  Allows to restart IPython kernel. *Default:* `True`
1563
1565
 
@@ -1584,26 +1586,26 @@ Custom Docker image name
1584
1586
 
1585
1587
  Custom Docker container name
1586
1588
 
1587
- - `Enable: code_execute` *cmd.code_execute*
1589
+ - `Tool: code_execute` *cmd.code_execute*
1588
1590
 
1589
1591
  Allows `code_execute` command execution. If enabled, provides Python code execution (generate and execute from file). *Default:* `True`
1590
1592
 
1591
- - `Enable: code_execute_all` *cmd.code_execute_all*
1593
+ - `Tool: code_execute_all` *cmd.code_execute_all*
1592
1594
 
1593
1595
  Allows `code_execute_all` command execution. If enabled, provides execution of all the Python code in interpreter window. *Default:* `True`
1594
1596
 
1595
- - `Enable: code_execute_file` *cmd.code_execute_file*
1597
+ - `Tool: code_execute_file` *cmd.code_execute_file*
1596
1598
 
1597
1599
  Allows `code_execute_file` command execution. If enabled, provides Python code execution from existing .py file. *Default:* `True`
1598
1600
 
1599
1601
 
1600
1602
  **HTML Canvas**
1601
1603
 
1602
- - `Enable: render_html_output` *cmd.render_html_output*
1604
+ - `Tool: render_html_output` *cmd.render_html_output*
1603
1605
 
1604
1606
  Allows `render_html_output` command execution. If enabled, it allows to render HTML/JS code in built-it HTML/JS browser (HTML Canvas). *Default:* `True`
1605
1607
 
1606
- - `Enable: get_html_output` *cmd.get_html_output*
1608
+ - `Tool: get_html_output` *cmd.get_html_output*
1607
1609
 
1608
1610
  Allows `get_html_output` command execution. If enabled, it allows retrieval current output from HTML Canvas. *Default:* `True`
1609
1611
 
@@ -1706,79 +1708,79 @@ If a file being created (with the same name) already exists, a prefix including
1706
1708
 
1707
1709
  **General**
1708
1710
 
1709
- - `Enable: send (upload) file as attachment` *cmd.send_file*
1711
+ - `Tool: send (upload) file as attachment` *cmd.send_file*
1710
1712
 
1711
1713
  Allows `cmd.send_file` command execution. *Default:* `True`
1712
1714
 
1713
- - `Enable: read file` *cmd.read_file*
1715
+ - `Tool: read file` *cmd.read_file*
1714
1716
 
1715
1717
  Allows `read_file` command execution. *Default:* `True`
1716
1718
 
1717
- - `Enable: append to file` *cmd.append_file*
1719
+ - `Tool: append to file` *cmd.append_file*
1718
1720
 
1719
1721
  Allows `append_file` command execution. Text-based files only (plain text, JSON, CSV, etc.) *Default:* `True`
1720
1722
 
1721
- - `Enable: save file` *cmd.save_file*
1723
+ - `Tool: save file` *cmd.save_file*
1722
1724
 
1723
1725
  Allows `save_file` command execution. Text-based files only (plain text, JSON, CSV, etc.) *Default:* `True`
1724
1726
 
1725
- - `Enable: delete file` *cmd.delete_file*
1727
+ - `Tool: delete file` *cmd.delete_file*
1726
1728
 
1727
1729
  Allows `delete_file` command execution. *Default:* `True`
1728
1730
 
1729
- - `Enable: list files (ls)` *cmd.list_files*
1731
+ - `Tool: list files (ls)` *cmd.list_files*
1730
1732
 
1731
1733
  Allows `list_dir` command execution. *Default:* `True`
1732
1734
 
1733
- - `Enable: list files in dirs in directory (ls)` *cmd.list_dir*
1735
+ - `Tool: list files in dirs in directory (ls)` *cmd.list_dir*
1734
1736
 
1735
1737
  Allows `mkdir` command execution. *Default:* `True`
1736
1738
 
1737
- - `Enable: downloading files` *cmd.download_file*
1739
+ - `Tool: downloading files` *cmd.download_file*
1738
1740
 
1739
1741
  Allows `download_file` command execution. *Default:* `True`
1740
1742
 
1741
- - `Enable: removing directories` *cmd.rmdir*
1743
+ - `Tool: removing directories` *cmd.rmdir*
1742
1744
 
1743
1745
  Allows `rmdir` command execution. *Default:* `True`
1744
1746
 
1745
- - `Enable: copying files` *cmd.copy_file*
1747
+ - `Tool: copying files` *cmd.copy_file*
1746
1748
 
1747
1749
  Allows `copy_file` command execution. *Default:* `True`
1748
1750
 
1749
- - `Enable: copying directories (recursive)` *cmd.copy_dir*
1751
+ - `Tool: copying directories (recursive)` *cmd.copy_dir*
1750
1752
 
1751
1753
  Allows `copy_dir` command execution. *Default:* `True`
1752
1754
 
1753
- - `Enable: move files and directories (rename)` *cmd.move*
1755
+ - `Tool: move files and directories (rename)` *cmd.move*
1754
1756
 
1755
1757
  Allows `move` command execution. *Default:* `True`
1756
1758
 
1757
- - `Enable: check if path is directory` *cmd.is_dir*
1759
+ - `Tool: check if path is directory` *cmd.is_dir*
1758
1760
 
1759
1761
  Allows `is_dir` command execution. *Default:* `True`
1760
1762
 
1761
- - `Enable: check if path is file` *cmd.is_file*
1763
+ - `Tool: check if path is file` *cmd.is_file*
1762
1764
 
1763
1765
  Allows `is_file` command execution. *Default:* `True`
1764
1766
 
1765
- - `Enable: check if file or directory exists` *cmd.file_exists*
1767
+ - `Tool: check if file or directory exists` *cmd.file_exists*
1766
1768
 
1767
1769
  Allows `file_exists` command execution. *Default:* `True`
1768
1770
 
1769
- - `Enable: get file size` *cmd.file_size*
1771
+ - `Tool: get file size` *cmd.file_size*
1770
1772
 
1771
1773
  Allows `file_size` command execution. *Default:* `True`
1772
1774
 
1773
- - `Enable: get file info` *cmd.file_info*
1775
+ - `Tool: get file info` *cmd.file_info*
1774
1776
 
1775
1777
  Allows `file_info` command execution. *Default:* `True`
1776
1778
 
1777
- - `Enable: find file or directory` *cmd.find*
1779
+ - `Tool: find file or directory` *cmd.find*
1778
1780
 
1779
1781
  Allows `find` command execution. *Default:* `True`
1780
1782
 
1781
- - `Enable: get current working directory` *cmd.cwd*
1783
+ - `Tool: get current working directory` *cmd.cwd*
1782
1784
 
1783
1785
  Allows `cwd` command execution. *Default:* `True`
1784
1786
 
@@ -1788,7 +1790,7 @@ Use data loaders from LlamaIndex for file reading (`read_file` command). *Defaul
1788
1790
 
1789
1791
  **Indexing**
1790
1792
 
1791
- - `Enable: quick query the file with LlamaIndex` *cmd.query_file*
1793
+ - `Tool: quick query the file with LlamaIndex` *cmd.query_file*
1792
1794
 
1793
1795
  Allows `query_file` command execution (in-memory index). If enabled, model will be able to quick index file into memory and query it for data (in-memory index) *Default:* `True`
1794
1796
 
@@ -1796,7 +1798,7 @@ Allows `query_file` command execution (in-memory index). If enabled, model will
1796
1798
 
1797
1799
  Model used for query temporary index for `query_file` command (in-memory index). *Default:* `gpt-3.5-turbo`
1798
1800
 
1799
- - `Enable: indexing files to persistent index` *cmd.file_index*
1801
+ - `Tool: indexing files to persistent index` *cmd.file_index*
1800
1802
 
1801
1803
  Allows `file_index` command execution. If enabled, model will be able to index file or directory using LlamaIndex (persistent index). *Default:* `True`
1802
1804
 
@@ -1824,7 +1826,7 @@ The plugin provides access to the operating system and executes system commands.
1824
1826
 
1825
1827
  Automatically append current working directory to `sys_exec` command. *Default:* `True`
1826
1828
 
1827
- - `Enable: sys_exec` *cmd.sys_exec*
1829
+ - `Tool: sys_exec` *cmd.sys_exec*
1828
1830
 
1829
1831
  Allows `sys_exec` command execution. If enabled, provides system commands execution. *Default:* `True`
1830
1832
 
@@ -1876,35 +1878,35 @@ Allows keyboard typing. *Default:* `True`
1876
1878
 
1877
1879
  Allows making screenshots. *Default:* `True`
1878
1880
 
1879
- - `Enable: mouse_get_pos` *cmd.mouse_get_pos*
1881
+ - `Tool: mouse_get_pos` *cmd.mouse_get_pos*
1880
1882
 
1881
1883
  Allows `mouse_get_pos` command execution. *Default:* `True`
1882
1884
 
1883
- - `Enable: mouse_set_pos` *cmd.mouse_set_pos*
1885
+ - `Tool: mouse_set_pos` *cmd.mouse_set_pos*
1884
1886
 
1885
1887
  Allows `mouse_set_pos` command execution. *Default:* `True`
1886
1888
 
1887
- - `Enable: make_screenshot` *cmd.make_screenshot*
1889
+ - `Tool: make_screenshot` *cmd.make_screenshot*
1888
1890
 
1889
1891
  Allows `make_screenshot` command execution. *Default:* `True`
1890
1892
 
1891
- - `Enable: mouse_click` *cmd.mouse_click*
1893
+ - `Tool: mouse_click` *cmd.mouse_click*
1892
1894
 
1893
1895
  Allows `mouse_click` command execution. *Default:* `True`
1894
1896
 
1895
- - `Enable: mouse_move` *cmd.mouse_move*
1897
+ - `Tool: mouse_move` *cmd.mouse_move*
1896
1898
 
1897
1899
  Allows `mouse_move` command execution. *Default:* `True`
1898
1900
 
1899
- - `Enable: mouse_scroll` *cmd.mouse_scroll*
1901
+ - `Tool: mouse_scroll` *cmd.mouse_scroll*
1900
1902
 
1901
1903
  Allows `mouse_scroll` command execution. *Default:* `True`
1902
1904
 
1903
- - `Enable: keyboard_key` *cmd.keyboard_key*
1905
+ - `Tool: keyboard_key` *cmd.keyboard_key*
1904
1906
 
1905
1907
  Allows `keyboard_key` command execution. *Default:* `True`
1906
1908
 
1907
- - `Enable: keyboard_type` *cmd.keyboard_type*
1909
+ - `Tool: keyboard_type` *cmd.keyboard_type*
1908
1910
 
1909
1911
  Allows `keyboard_type` command execution. *Default:* `True`
1910
1912
 
@@ -2004,41 +2006,35 @@ Max length of the summarized or raw result (characters). *Default:* `50000`
2004
2006
 
2005
2007
  Max tokens in output when generating summary. *Default:* `1500`
2006
2008
 
2007
- - `Enable: search the Web` *cmd.web_search*
2009
+ - `Tool: web_search` *cmd.web_search*
2008
2010
 
2009
2011
  Allows `web_search` command execution. If enabled, model will be able to search the Web. *Default:* `True`
2010
2012
 
2011
- - `Enable: opening URLs` *cmd.web_url_open*
2013
+ - `Tool: web_url_open` *cmd.web_url_open*
2012
2014
 
2013
2015
  Allows `web_url_open` command execution. If enabled, model will be able to open specified URL and summarize content. *Default:* `True`
2014
2016
 
2015
- - `Enable: reading the raw content from URLs` *cmd.web_url_raw*
2017
+ - `Tool: web_url_raw` *cmd.web_url_raw*
2016
2018
 
2017
2019
  Allows `web_url_raw` command execution. If enabled, model will be able to open specified URL and get the raw content. *Default:* `True`
2018
2020
 
2019
- - `Enable: getting a list of URLs from search results` *cmd.web_urls*
2021
+ - `Tool: web_request` *cmd.web_request*
2020
2022
 
2021
- Allows `web_urls` command execution. If enabled, model will be able to search the Web and get founded URLs list. *Default:* `True`
2023
+ Allows `web_request` command execution. If enabled, model will be able to send any HTTP request to specified URL or API endpoint. *Default:* `True`
2022
2024
 
2023
- - `Enable: indexing web and external content` *cmd.web_index*
2025
+ - `Tool: web_extract_links` *cmd.web_extract_links*
2024
2026
 
2025
- Allows `web_index` command execution. If enabled, model will be able to index pages and external content using LlamaIndex (persistent index). *Default:* `True`
2027
+ Allows `web_extract_links` command execution. If enabled, model will be able to open URL and get list of all links from it. *Default:* `True`
2026
2028
 
2027
- - `Enable: quick query the web and external content` *cmd.web_index_query*
2029
+ - `Tool: web_extract_images` *cmd.web_extract_images*
2028
2030
 
2029
- Allows `web_index_query` command execution. If enabled, model will be able to quick index and query web content using LlamaIndex (in-memory index). *Default:* `True`
2031
+ Allows `web_extract_images` command execution. If enabled, model will be able to open URL and get list of all images from it.. *Default:* `True`
2030
2032
 
2031
- - `Auto-index all used URLs using LlamaIndex` *auto_index*
2032
-
2033
- If enabled, every URL used by the model will be automatically indexed using LlamaIndex (persistent index). *Default:* `False`
2034
-
2035
- - `Index to use` *idx*
2036
-
2037
- ID of index to use for web page indexing (persistent index). *Default:* `base`
2033
+ **Advanced**
2038
2034
 
2039
2035
  - `Model used for web page summarize` *summary_model*
2040
2036
 
2041
- Model used for web page summarize. *Default:* `gpt-3.5-turbo-1106`
2037
+ Model used for web page summarize. *Default:* `gpt-4o-mini`
2042
2038
 
2043
2039
  - `Summarize prompt` *prompt_summarize*
2044
2040
 
@@ -2048,6 +2044,24 @@ Prompt used for web search results summarize, use {query} as a placeholder for s
2048
2044
 
2049
2045
  Prompt used for specified URL page summarize.
2050
2046
 
2047
+ **Indexing**
2048
+
2049
+ - `Tool: web_index` *cmd.web_index*
2050
+
2051
+ Allows `web_index` command execution. If enabled, model will be able to index pages and external content using LlamaIndex (persistent index). *Default:* `True`
2052
+
2053
+ - `Tool: web_index_query` *cmd.web_index_query*
2054
+
2055
+ Allows `web_index_query` command execution. If enabled, model will be able to quick index and query web content using LlamaIndex (in-memory index). *Default:* `True`
2056
+
2057
+ - `Auto-index all used URLs using LlamaIndex` *auto_index*
2058
+
2059
+ If enabled, every URL used by the model will be automatically indexed using LlamaIndex (persistent index). *Default:* `False`
2060
+
2061
+ - `Index to use` *idx*
2062
+
2063
+ ID of index to use for web page indexing (persistent index). *Default:* `base`
2064
+
2051
2065
  ## Serial port / USB
2052
2066
 
2053
2067
  Provides commands for reading and sending data to USB ports.
@@ -2095,15 +2109,15 @@ Timeout in seconds. *Default:* `1`
2095
2109
 
2096
2110
  Sleep in seconds after connection *Default:* `2`
2097
2111
 
2098
- - `Enable: Send text commands to USB port` *cmd.serial_send*
2112
+ - `Tool: Send text commands to USB port` *cmd.serial_send*
2099
2113
 
2100
2114
  Allows `serial_send` command execution. *Default:* `True`
2101
2115
 
2102
- - `Enable: Send raw bytes to USB port` *cmd.serial_send_bytes*
2116
+ - `Tool: Send raw bytes to USB port` *cmd.serial_send_bytes*
2103
2117
 
2104
2118
  Allows `serial_send_bytes` command execution. *Default:* `True`
2105
2119
 
2106
- - `Enable: Read data from USB port` *cmd.serial_read*
2120
+ - `Tool: Read data from USB port` *cmd.serial_read*
2107
2121
 
2108
2122
  Allows `serial_read` command execution. *Default:* `True`
2109
2123
 
@@ -2142,31 +2156,31 @@ Where `123` is the ID of previous context (conversation) in database, example of
2142
2156
 
2143
2157
  When enabled, it allows to automatically retrieve context history using @ tags, e.g. use @123 in question to use summary of context with ID 123 as additional context. *Default:* `False`
2144
2158
 
2145
- - `Enable: get date range context list` *cmd.get_ctx_list_in_date_range*
2159
+ - `Tool: get date range context list` *cmd.get_ctx_list_in_date_range*
2146
2160
 
2147
2161
  Allows `get_ctx_list_in_date_range` command execution. If enabled, it allows getting the list of context history (previous conversations). *Default:* `True
2148
2162
 
2149
- - `Enable: get context content by ID` *cmd.get_ctx_content_by_id*
2163
+ - `Tool: get context content by ID` *cmd.get_ctx_content_by_id*
2150
2164
 
2151
2165
  Allows `get_ctx_content_by_id` command execution. If enabled, it allows getting summarized content of context with defined ID. *Default:* `True`
2152
2166
 
2153
- - `Enable: count contexts in date range` *cmd.count_ctx_in_date*
2167
+ - `Tool: count contexts in date range` *cmd.count_ctx_in_date*
2154
2168
 
2155
2169
  Allows `count_ctx_in_date` command execution. If enabled, it allows counting contexts in date range. *Default:* `True`
2156
2170
 
2157
- - `Enable: get day note` *cmd.get_day_note*
2171
+ - `Tool: get day note` *cmd.get_day_note*
2158
2172
 
2159
2173
  Allows `get_day_note` command execution. If enabled, it allows retrieving day note for specific date. *Default:* `True`
2160
2174
 
2161
- - `Enable: add day note` *cmd.add_day_note*
2175
+ - `Tool: add day note` *cmd.add_day_note*
2162
2176
 
2163
2177
  Allows `add_day_note` command execution. If enabled, it allows adding day note for specific date. *Default:* `True`
2164
2178
 
2165
- - `Enable: update day note` *cmd.update_day_note*
2179
+ - `Tool: update day note` *cmd.update_day_note*
2166
2180
 
2167
2181
  Allows `update_day_note` command execution. If enabled, it allows updating day note for specific date. *Default:* `True`
2168
2182
 
2169
- - `Enable: remove day note` *cmd.remove_day_note*
2183
+ - `Tool: remove day note` *cmd.remove_day_note*
2170
2184
 
2171
2185
  Allows `remove_day_note` command execution. If enabled, it allows removing day note for specific date. *Default:* `True`
2172
2186
 
@@ -2258,14 +2272,57 @@ The prompt used for vision mode. It will append or replace current system prompt
2258
2272
 
2259
2273
  Replace whole system prompt with vision prompt against appending it to the current prompt. *Default:* `False`
2260
2274
 
2261
- - `Enable: capturing images from camera` *cmd.camera_capture*
2275
+ - `Tool: capturing images from camera` *cmd.camera_capture*
2262
2276
 
2263
2277
  Allows `capture` command execution. If enabled, model will be able to capture images from camera itself. The `+ Tools` option must be enabled. *Default:* `False`
2264
2278
 
2265
- - `Enable: making screenshots` *cmd.make_screenshot*
2279
+ - `Tool: making screenshots` *cmd.make_screenshot*
2266
2280
 
2267
2281
  Allows `screenshot` command execution. If enabled, model will be able to making screenshots itself. The `+ Tools` option must be enabled. *Default:* `False`
2268
2282
 
2283
+ ## Mailer
2284
+
2285
+ Enables the sending, receiving, and reading of emails from the inbox. Currently, only SMTP is supported. More options coming soon.
2286
+
2287
+ **Options**
2288
+
2289
+ - `From (email)` *from_email*
2290
+
2291
+ From (email), e.g. me@domain.com
2292
+
2293
+ - `Tool: send_mail` *cmd.send_mail*
2294
+
2295
+ Allows `send_mail` command execution. If enabled, model will be able to sending emails.
2296
+
2297
+ - `Tool: receive_emails` *cmd.receive_emails*
2298
+
2299
+ Allows `receive_emails` command execution. If enabled, model will be able to receive emails from the server.
2300
+
2301
+ - `Tool: get_email_body` *cmd.get_email_body*
2302
+
2303
+ Allows `get_email_body` command execution. If enabled, model will be able to receive message body from the server.
2304
+
2305
+ - `SMTP Host` *smtp_host*
2306
+
2307
+ SMTP Host, e.g. smtp.domain.com
2308
+
2309
+ - `SMTP Port (Inbox)` *smtp_port_inbox*
2310
+
2311
+ SMTP Port, default: 995
2312
+
2313
+ - `SMTP Port (Outbox)` *smtp_port_outbox*
2314
+
2315
+ SMTP Port, default: 465
2316
+
2317
+ - `SMTP User` *smtp_user*
2318
+
2319
+ SMTP User, e.g. user@domain.com
2320
+
2321
+ - `SMTP Password` *smtp_password*
2322
+
2323
+ SMTP Password.
2324
+
2325
+
2269
2326
  ## Real Time
2270
2327
 
2271
2328
  This plugin automatically adds the current date and time to each system prompt you send.
@@ -3877,6 +3934,14 @@ may consume additional tokens that are not displayed in the main window.
3877
3934
 
3878
3935
  ## Recent changes:
3879
3936
 
3937
+ **2.4.42 (2024-12-15)**
3938
+
3939
+ - Added Mailer plugin, which allows sending and retrieving emails from the server, and reading them. It currently supports only SMTP.
3940
+ - Added 'web_request' command to the Web Search plugin, enabling GET/POST/PUT and other connections to any address and API endpoint. It also supports sending POST data, files, headers, cookies, and more.
3941
+ - Improved audio output.
3942
+ - Enhanced visibility of the Video menu.
3943
+ - Other fixes.
3944
+
3880
3945
  **2.4.41 (2024-12-14)**
3881
3946
 
3882
3947
  - Improved switching between columns on a split screen.
pygpt_net/CHANGELOG.txt CHANGED
@@ -1,3 +1,11 @@
1
+ 2.4.42 (2024-12-15)
2
+
3
+ - Added Mailer plugin, which allows sending and retrieving emails from the server, and reading them. It currently supports only SMTP.
4
+ - Added 'web_request' command to the Web Search plugin, enabling GET/POST/PUT and other connections to any address and API endpoint. It also supports sending POST data, files, headers, cookies, and more.
5
+ - Improved audio output.
6
+ - Enhanced visibility of the Video menu.
7
+ - Other fixes.
8
+
1
9
  2.4.41 (2024-12-14)
2
10
 
3
11
  - Improved switching between columns on a split screen.
pygpt_net/__init__.py CHANGED
@@ -6,15 +6,15 @@
6
6
  # GitHub: https://github.com/szczyglis-dev/py-gpt #
7
7
  # MIT License #
8
8
  # Created By : Marcin Szczygliński #
9
- # Updated Date: 2024.12.14 08:00:00 #
9
+ # Updated Date: 2024.12.15 04:00:00 #
10
10
  # ================================================== #
11
11
 
12
12
  __author__ = "Marcin Szczygliński"
13
13
  __copyright__ = "Copyright 2024, Marcin Szczygliński"
14
14
  __credits__ = ["Marcin Szczygliński"]
15
15
  __license__ = "MIT"
16
- __version__ = "2.4.41"
17
- __build__ = "2024.12.14"
16
+ __version__ = "2.4.42"
17
+ __build__ = "2024.12.15"
18
18
  __maintainer__ = "Marcin Szczygliński"
19
19
  __github__ = "https://github.com/szczyglis-dev/py-gpt"
20
20
  __website__ = "https://pygpt.net"
pygpt_net/app.py CHANGED
@@ -6,7 +6,7 @@
6
6
  # GitHub: https://github.com/szczyglis-dev/py-gpt #
7
7
  # MIT License #
8
8
  # Created By : Marcin Szczygliński #
9
- # Updated Date: 2024.11.21 20:00:00 #
9
+ # Updated Date: 2024.12.15 04:00:00 #
10
10
  # ================================================== #
11
11
 
12
12
  from pygpt_net.launcher import Launcher
@@ -32,6 +32,7 @@ from pygpt_net.plugin.openai_dalle import Plugin as OpenAIDallePlugin
32
32
  from pygpt_net.plugin.openai_vision import Plugin as OpenAIVisionPlugin
33
33
  from pygpt_net.plugin.real_time import Plugin as RealTimePlugin
34
34
  from pygpt_net.plugin.agent import Plugin as AgentPlugin
35
+ from pygpt_net.plugin.mailer import Plugin as MailerPlugin
35
36
 
36
37
  # agents (Llama-index)
37
38
  from pygpt_net.provider.agents.openai import OpenAIAgent
@@ -320,6 +321,7 @@ def run(**kwargs):
320
321
  launcher.add_plugin(OpenAIDallePlugin())
321
322
  launcher.add_plugin(OpenAIVisionPlugin())
322
323
  launcher.add_plugin(IdxLlamaIndexPlugin())
324
+ launcher.add_plugin(MailerPlugin())
323
325
  launcher.add_plugin(CrontabPlugin())
324
326
 
325
327
  # register custom plugins
@@ -6,7 +6,7 @@
6
6
  # GitHub: https://github.com/szczyglis-dev/py-gpt #
7
7
  # MIT License #
8
8
  # Created By : Marcin Szczygliński #
9
- # Updated Date: 2024.12.14 08:00:00 #
9
+ # Updated Date: 2024.12.14 18:00:00 #
10
10
  # ================================================== #
11
11
 
12
12
  import os
@@ -221,7 +221,7 @@ class Audio:
221
221
  """
222
222
  Play sound
223
223
 
224
- :param filename
224
+ :param filename: sound file name
225
225
  """
226
226
  path = os.path.join(self.window.core.config.get_app_path(), "data", "audio", filename)
227
227
  if path:
@@ -19,9 +19,6 @@ import cv2
19
19
  from PySide6.QtCore import Slot, QObject
20
20
  from PySide6.QtGui import QImage, QPixmap, Qt
21
21
 
22
- from pygpt_net.core.types import (
23
- MODE_VISION,
24
- )
25
22
  from pygpt_net.core.events import AppEvent, KernelEvent
26
23
  from pygpt_net.core.camera import CaptureWorker
27
24
  from pygpt_net.utils import trans
@@ -508,15 +505,9 @@ class Camera(QObject):
508
505
 
509
506
  :return: True if capture is allowed
510
507
  """
511
- mode = self.window.core.config.get('mode')
512
508
  if self.window.controller.painter.is_active():
513
509
  return True
514
- if (mode != MODE_VISION
515
- and mode not in self.window.controller.chat.vision.allowed_modes):
516
- return False
517
- if self.window.controller.plugins.is_type_enabled('vision'):
518
- return True
519
- if self.window.controller.ui.vision.is_vision_model():
510
+ if self.window.controller.ui.vision.has_vision():
520
511
  return True
521
512
  return False
522
513
 
@@ -6,7 +6,7 @@
6
6
  # GitHub: https://github.com/szczyglis-dev/py-gpt #
7
7
  # MIT License #
8
8
  # Created By : Marcin Szczygliński #
9
- # Updated Date: 2024.11.26 19:00:00 #
9
+ # Updated Date: 2024.12.14 18:00:00 #
10
10
  # ================================================== #
11
11
 
12
12
  import base64
@@ -63,7 +63,7 @@ class Audio:
63
63
  :param ctx: Context item
64
64
  """
65
65
  wav_path = os.path.join(self.window.core.config.get_user_path(), self.audio_file)
66
- if ctx.is_audio and ctx.audio_output:
66
+ if ctx.is_audio and ctx.audio_output and ctx.audio_read_allowed():
67
67
  wav_bytes = base64.b64decode(ctx.audio_output)
68
68
  with open(wav_path, "wb") as f:
69
69
  f.write(wav_bytes)
@@ -6,7 +6,7 @@
6
6
  # GitHub: https://github.com/szczyglis-dev/py-gpt #
7
7
  # MIT License #
8
8
  # Created By : Marcin Szczygliński #
9
- # Updated Date: 2024.12.14 08:00:00 #
9
+ # Updated Date: 2024.12.14 18:00:00 #
10
10
  # ================================================== #
11
11
 
12
12
  from typing import Dict, Any, List
@@ -104,9 +104,23 @@ class Placeholder:
104
104
  return self.get_voice_control_actions()
105
105
  elif id == "audio_input_devices":
106
106
  return self.get_audio_input_devices()
107
+ elif id == "audio_tts_whisper_voices":
108
+ return self.get_audio_tts_whisper_voices()
107
109
  else:
108
110
  return []
109
111
 
112
+ def get_audio_tts_whisper_voices(self) -> List[Dict[str, str]]:
113
+ """
114
+ Get audio TTS whisper voices list
115
+
116
+ :return: placeholders list
117
+ """
118
+ voices = self.window.core.audio.whisper.get_voices()
119
+ data = []
120
+ for voice in voices:
121
+ data.append({voice: voice})
122
+ return data
123
+
110
124
  def get_audio_input_devices(self) -> List[Dict[str, str]]:
111
125
  """
112
126
  Get audio input devices list