Skip to content

Commit

Permalink
Updated version to 2.4.42
Browse files Browse the repository at this point in the history
  • Loading branch information
szczyglis-dev committed Dec 15, 2024
1 parent 6e0010c commit 52ec7e3
Show file tree
Hide file tree
Showing 22 changed files with 79 additions and 44 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# CHANGELOG

## 2.4.42 (2024-12-15)

- Added Mailer plugin, which allows sending and retrieving emails from the server, and reading them. It currently supports only SMTP.
- 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.
- Improved audio output.
- Enhanced visibility of the Video menu.
- Other fixes.

## 2.4.41 (2024-12-14)

- Improved switching between columns on a split screen.
Expand Down
6 changes: 3 additions & 3 deletions PyGPT_Linux_PAD_File.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<PAD>
<PAD_Version>4.0</PAD_Version>
<Program_Name>PyGPT - Desktop AI Assistant</Program_Name>
<Program_Version>2.4.41</Program_Version>
<Program_Version>2.4.42</Program_Version>
<Program_Release_Month>12</Program_Release_Month>
<Program_Release_Day>14</Program_Release_Day>
<Program_Release_Day>15</Program_Release_Day>
<Program_Release_Year>2024</Program_Release_Year>
<Program_Cost_Dollars>0</Program_Cost_Dollars>
<Program_Type>Open Source</Program_Type>
<Download_URL>https://pygpt.net/download/2.4.41/pygpt-2.4.41.zip</Download_URL>
<Download_URL>https://pygpt.net/download/2.4.42/pygpt-2.4.42.zip</Download_URL>
<Application_OS_Support>Linux 64 bit</Application_OS_Support>
<Program_Specific_Category>Generative AI Tools</Program_Specific_Category>
<Program_Language>English, Polish</Program_Language>
Expand Down
6 changes: 3 additions & 3 deletions PyGPT_Windows_PAD_File.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<PAD>
<PAD_Version>4.0</PAD_Version>
<Program_Name>PyGPT - Desktop AI Assistant</Program_Name>
<Program_Version>2.4.41</Program_Version>
<Program_Version>2.4.42</Program_Version>
<Program_Release_Month>12</Program_Release_Month>
<Program_Release_Day>14</Program_Release_Day>
<Program_Release_Day>15</Program_Release_Day>
<Program_Release_Year>2024</Program_Release_Year>
<Program_Cost_Dollars>0</Program_Cost_Dollars>
<Program_Type>Open Source</Program_Type>
<Download_URL>https://pygpt.net/download/2.4.41/pygpt-2.4.41.msi</Download_URL>
<Download_URL>https://pygpt.net/download/2.4.42/pygpt-2.4.42.msi</Download_URL>
<Application_OS_Support>Windows 10 64 bit, Windows 11 64 bit</Application_OS_Support>
<Program_Specific_Category>Generative AI Tools</Program_Specific_Category>
<Program_Language>English, Polish</Program_Language>
Expand Down
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![pygpt](https://snapcraft.io/pygpt/badge.svg)](https://snapcraft.io/pygpt)

Release: **2.4.41** | build: **2024.12.14** | Python: **>=3.10, <3.12**
Release: **2.4.42** | build: **2024.12.15** | Python: **>=3.10, <3.12**

> Official website: https://pygpt.net | Documentation: https://pygpt.readthedocs.io
>
Expand Down Expand Up @@ -1067,7 +1067,7 @@ as well as list and create directories.

- `Voice Control (inline)` - provides voice control command execution within a conversation.

- `Mailer` - provides the ability to send emails.
- `Mailer` - Provides the ability to send, receive and read emails.

## Audio Input

Expand Down Expand Up @@ -3934,6 +3934,14 @@ may consume additional tokens that are not displayed in the main window.

## Recent changes:

**2.4.42 (2024-12-15)**

- Added Mailer plugin, which allows sending and retrieving emails from the server, and reading them. It currently supports only SMTP.
- 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.
- Improved audio output.
- Enhanced visibility of the Video menu.
- Other fixes.

**2.4.41 (2024-12-14)**

- Improved switching between columns on a split screen.
Expand Down
2 changes: 1 addition & 1 deletion bin/build.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
# This script is used to build the app using pyinstaller

VERSION="2.4.41"
VERSION="2.4.42"

cd "$(dirname "$0")"
DIR_CURRENT="$(pwd)"
Expand Down
2 changes: 1 addition & 1 deletion bin/build_installer.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ REM https://github.com/wixtoolset/wix3/releases/tag/wix3141rtm
REM Set variables
SET SourceDir=%CD%\..\dist\Windows
SET InstallerOutputFolder=%CD%\..\dist
SET ProductVersion=2.4.41
SET ProductVersion=2.4.42
SET ProductUpgradeCode=3FCD39F6-4965-4B51-A185-FC6E53CA431B
SET WIX=C:\Program Files (x86)\WiX Toolset v3.14
SET SIGNTOOL=C:\Program Files (x86)\Microsoft SDKs\ClickOnce\SignTool
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
project = 'PyGPT'
copyright = '2024, pygpt.net'
author = 'szczyglis-dev, Marcin Szczygliński'
release = '2.4.41'
release = '2.4.42'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
PyGPT - pygpt.net
====================

| **Release:** 2.4.41 (2024-12-14), Last update: 2024-12-14 08:00
| **Release:** 2.4.42 (2024-12-15), Last update: 2024-12-15 04:00
| **Project Website:** https://pygpt.net
| **GitHub:** https://github.com/szczyglis-dev/py-gpt
| **Snap Store:** https://snapcraft.io/pygpt
Expand Down
1 change: 1 addition & 0 deletions docs/source/plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ The following plugins are currently available, and model can use them instantly:
* ``Real Time`` - automatically appends the current date and time to the system prompt, informing the model about current time.
* ``System Prompt Extra`` - appends additional system prompts (extra data) from a list to every current system prompt. You can enhance every system prompt with extra instructions that will be automatically appended to the system prompt.
* ``Voice Control (inline)`` - provides voice control command execution within a conversation.
* ``Mailer`` - Provides the ability to send, receive and read emails.


Creating Your Own Plugins
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pygpt-net"
version = "2.4.41"
version = "2.4.42"
description = "Desktop AI Assistant powered by models: OpenAI o1, GPT-4o, GPT-4, GPT-4 Vision, GPT-3.5, DALL-E 3, Llama 3, Mistral, Gemini, Claude, Bielik, and other models supported by Langchain, Llama Index, and Ollama. Features include chatbot, text completion, image generation, vision analysis, speech-to-text, internet access, file handling, command execution and more."
authors = ["Marcin Szczyglinski <info@pygpt.net>"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from setuptools import setup, find_packages

VERSION = '2.4.41'
VERSION = '2.4.42'
DESCRIPTION = 'Desktop AI Assistant powered by models: OpenAI o1, GPT-4o, GPT-4, GPT-4 Vision, GPT-3.5, DALL-E 3, Llama 3, Mistral, Gemini, Claude, Bielik, and other models supported by Langchain, Llama Index, and Ollama. Features include chatbot, text completion, image generation, vision analysis, speech-to-text, internet access, file handling, command execution and more.'
LONG_DESCRIPTION = 'Package contains a gpt-4, gpt-4V, gpt-3.5, DALL-E 3, Langchain LLMs and Llama-index powered ' \
'Desktop AI Assistant with chatbot, text completion, vision and image generation, internet ' \
Expand Down
2 changes: 1 addition & 1 deletion snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: pygpt
base: core22 # Ubuntu 22.04
version: '2.4.41'
version: '2.4.42'
summary: Desktop AI Assistant - o1, gpt-4, gpt-4-vision, chat, assistant, vision.
description: |
**PyGPT** is **all-in-one** Desktop AI Assistant that provides direct interaction with OpenAI language models, including GPT-4, GPT-4 Vision, and GPT-3.5, through the OpenAI API. The application also integrates with alternative LLMs.
Expand Down
8 changes: 8 additions & 0 deletions src/pygpt_net/CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
2.4.42 (2024-12-15)

- Added Mailer plugin, which allows sending and retrieving emails from the server, and reading them. It currently supports only SMTP.
- 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.
- Improved audio output.
- Enhanced visibility of the Video menu.
- Other fixes.

2.4.41 (2024-12-14)

- Improved switching between columns on a split screen.
Expand Down
6 changes: 3 additions & 3 deletions src/pygpt_net/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
# GitHub: https://github.com/szczyglis-dev/py-gpt #
# MIT License #
# Created By : Marcin Szczygliński #
# Updated Date: 2024.12.14 08:00:00 #
# Updated Date: 2024.12.15 04:00:00 #
# ================================================== #

__author__ = "Marcin Szczygliński"
__copyright__ = "Copyright 2024, Marcin Szczygliński"
__credits__ = ["Marcin Szczygliński"]
__license__ = "MIT"
__version__ = "2.4.41"
__build__ = "2024.12.14"
__version__ = "2.4.42"
__build__ = "2024.12.15"
__maintainer__ = "Marcin Szczygliński"
__github__ = "https://github.com/szczyglis-dev/py-gpt"
__website__ = "https://pygpt.net"
Expand Down
6 changes: 3 additions & 3 deletions src/pygpt_net/data/config/config.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"__meta__": {
"version": "2.4.41",
"app.version": "2.4.41",
"updated_at": "2024-12-14T00:00:00"
"version": "2.4.42",
"app.version": "2.4.42",
"updated_at": "2024-12-15T00:00:00"
},
"access.audio.event.speech": false,
"access.audio.event.speech.disabled": [],
Expand Down
6 changes: 3 additions & 3 deletions src/pygpt_net/data/config/models.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"__meta__": {
"version": "2.4.41",
"app.version": "2.4.41",
"updated_at": "2024-12-14T00:00:00"
"version": "2.4.42",
"app.version": "2.4.42",
"updated_at": "2024-12-15T00:00:00"
},
"items": {
"claude-3-5-sonnet-20240620": {
Expand Down
6 changes: 3 additions & 3 deletions src/pygpt_net/data/config/modes.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"__meta__": {
"version": "2.4.41",
"app.version": "2.4.41",
"updated_at": "2024-12-13T00:00:00"
"version": "2.4.42",
"app.version": "2.4.42",
"updated_at": "2024-12-15T00:00:00"
},
"items": {
"chat": {
Expand Down
12 changes: 2 additions & 10 deletions src/pygpt_net/data/locale/plugin.mailer.en.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cmd.receive_emails.label = Enable: receive emails
cmd.receive_emails.description = Allows for receiving emails.
cmd.get_email_body.label = Enable: get email body
cmd.get_email_body.description = Allows for receive email body.
plugin.description = Provides the ability to send emails.
plugin.description = Provides the ability to send, receive and read emails.
plugin.name = Mailer
smtp_host.description = SMTP Host, e.g. smtp.domain.com
smtp_host.label = Host
Expand All @@ -15,15 +15,7 @@ smtp_port_outbox.description = SMTP Port (Outbox), default: 465
smtp_port_outbox.label = Port (Outbox)
smtp_user.description = SMTP User, e.g. user@domain.com
smtp_user.label = User
imap_host.description = IMAP Host, e.g. imap.domain.com
imap_host.label = Host
imap_port_inbox.description = IMAP Port (Inbox), default: 993
imap_port_inbox.label = Port (Inbox)
imap_port_outbox.description = IMAP Port (Outbox), default: 465
imap_port_outbox.label = Port (Outbox)
imap_user.description = IMAP User, e.g. user@domain.com
imap_user.label = User
smtp_password.description = IMAP Password
smtp_password.description = SMTP Password
smtp_password.label = Password
from_email.description = From (email), e.g. me@domain.com
from_email.label = From (email)
6 changes: 6 additions & 0 deletions src/pygpt_net/plugin/mailer/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@ def from_defaults(self, plugin: BasePlugin = None):
"description": "Email ID (index)",
"required": True,
},
{
"name": "format",
"type": "text",
"description": "Display format, default: text, options: text, html",
"required": False,
},
],
enabled=True,
description="Allows receiving email body",
Expand Down
16 changes: 14 additions & 2 deletions src/pygpt_net/plugin/mailer/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

from email.parser import BytesParser
from typing import Any
from bs4 import BeautifulSoup

from pygpt_net.item.ctx import CtxItem

Expand All @@ -37,14 +38,16 @@ def attach_signals(self, signals):
"""
self.signals = signals

def parse_email(self, msg) -> str:
def parse_email(self, msg, as_text: bool = True) -> str:
"""
Parse email message
:param msg: email message
:param as_text: return as text
:return: parsed email
"""
body = ""
is_html = False
if msg.is_multipart():
for part in msg.walk():
content_type = part.get_content_type()
Expand All @@ -53,8 +56,11 @@ def parse_email(self, msg) -> str:
body = part.get_payload(decode=True).decode(part.get_content_charset('utf-8'))
elif content_type == 'text/html' and 'attachment' not in content_disposition:
body = part.get_payload(decode=True).decode(part.get_content_charset('utf-8'))
is_html = True
else:
body = msg.get_payload(decode=True).decode(msg.get_content_charset('utf-8'))
if is_html and as_text:
body = BeautifulSoup(body, 'html.parser').get_text()
return body

def smtp_get_email_body(self, ctx: CtxItem, item: dict, request: dict) -> dict:
Expand All @@ -72,6 +78,12 @@ def smtp_get_email_body(self, ctx: CtxItem, item: dict, request: dict) -> dict:
username = self.plugin.get_option_value("smtp_user")
password = self.plugin.get_option_value("smtp_password")
msg = "Receiving email from: {}".format(server)
format = "text"
as_text = True
if "format" in item["params"]:
format = item["params"]["format"].lower()
if format == "html":
as_text = False
self.log(msg)
try:
if port in [995]:
Expand All @@ -91,7 +103,7 @@ def smtp_get_email_body(self, ctx: CtxItem, item: dict, request: dict) -> dict:
"From": msg["From"],
"Subject": msg["Subject"],
"Date": msg["Date"],
"Message": self.parse_email(msg)
"Message": self.parse_email(msg, as_text)
}
pop3.quit()
except Exception as e:
Expand Down
2 changes: 1 addition & 1 deletion tests/plugin/cmd_web/test_plugin_cmd_web.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def test_handle_cmd_syntax(mock_window):
}
event.ctx = ctx
plugin.handle(event)
assert len(event.data["cmd"]) == 7 # web_search, web_url_open
assert len(event.data["cmd"]) == 8 # web_search, web_url_open


def test_handle_cmd_execute_web_search(mock_window):
Expand Down
8 changes: 4 additions & 4 deletions version.rc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VSVersionInfo(
ffi=FixedFileInfo(
filevers=(2, 4, 41, 0),
prodvers=(2, 4, 41, 0),
filevers=(2, 4, 42, 0),
prodvers=(2, 4, 42, 0),
mask=0x3f,
flags=0x0,
OS=0x4,
Expand All @@ -16,12 +16,12 @@ StringFileInfo(
u'040904B0',
[StringStruct(u'CompanyName', u'pygpt.net'),
StringStruct(u'FileDescription', u'Desktop AI Assistant powered by o1, GPT-4, GPT-3 and DALL-E 3: assistant, chatbot, text completion, image generation, vision and more.'),
StringStruct(u'FileVersion', u'2.4.41'),
StringStruct(u'FileVersion', u'2.4.42'),
StringStruct(u'InternalName', u'pygpt'),
StringStruct(u'LegalCopyright', u'(c) 2024 pygpt.net, Marcin Szczygliński'),
StringStruct(u'OriginalFilename', u'pygpt.exe'),
StringStruct(u'ProductName', u'pygpt.net'),
StringStruct(u'ProductVersion', u'2.4.41')])
StringStruct(u'ProductVersion', u'2.4.42')])
]),
VarFileInfo([VarStruct(u'Translation', [1033, 1200])])
]
Expand Down

0 comments on commit 52ec7e3

Please sign in to comment.