Skip to content

Commit

Permalink
Added model gpt-4 "omni"
Browse files Browse the repository at this point in the history
  • Loading branch information
szczyglis-dev committed May 16, 2024
1 parent f7ef06f commit 0477047
Show file tree
Hide file tree
Showing 31 changed files with 1,121 additions and 858 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

# 2.2.19 (2024-05-16)

- Added a newest multimodal model: GPT-4 "omni": https://openai.com/index/hello-gpt-4o

# 2.2.18 (2024-05-05)

- Fix: prevent crash if no audio to play.
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.2.18</Program_Version>
<Program_Version>2.2.19</Program_Version>
<Program_Release_Month>05</Program_Release_Month>
<Program_Release_Day>05</Program_Release_Day>
<Program_Release_Day>16</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.2.18/pygpt-2.2.18.tar.gz</Download_URL>
<Download_URL>https://pygpt.net/download/2.2.19/pygpt-2.2.19.tar.gz</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.2.18</Program_Version>
<Program_Version>2.2.19</Program_Version>
<Program_Release_Month>05</Program_Release_Month>
<Program_Release_Day>05</Program_Release_Day>
<Program_Release_Day>16</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.2.18/pygpt-2.2.18.msi</Download_URL>
<Download_URL>https://pygpt.net/download/2.2.19/pygpt-2.2.19.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
6 changes: 5 additions & 1 deletion 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.2.18** | build: **2024.05.05** | Python: **>=3.10, <3.12**
Release: **2.2.19** | build: **2024.05.16** | Python: **>=3.10, <3.12**

Official website: https://pygpt.net | Documentation: https://pygpt.readthedocs.io

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

## Recent changes:

**2.2.19 (2024-05-16)**

- Added a newest multimodal model: GPT-4 "omni": https://openai.com/index/hello-gpt-4o

**2.2.18 (2024-05-05)**

- Fix: prevent crash if no audio to play.
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.2.18'
release = '2.2.19'

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

| **Last update:** 2024-05-05 17:00
| **Last update:** 2024-05-16 02:00
| **Project website:** https://pygpt.net
| **GitHub:** https://github.com/szczyglis-dev/py-gpt
| **Snap Store:** https://snapcraft.io/pygpt
| **PyPI:** https://pypi.org/project/pygpt-net
| **Release:** 2.2.18 (2024-05-05)
| **Release:** 2.2.19 (2024-05-16)
.. toctree::
:maxdepth: 3
Expand Down
1,576 changes: 788 additions & 788 deletions pygpt.aip

Large diffs are not rendered by default.

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.2.18"
version = "2.2.19"
description = "Desktop AI Assistant powered by GPT-4, GPT-4V, GPT-3.5, DALL-E 3, Langchain LLMs, Llama-index, Whisper with chatbot, assistant, text completion, vision and image generation, internet access, chat with files, commands and code execution, file upload and download 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.2.18'
VERSION = '2.2.19'
DESCRIPTION = 'Desktop AI Assistant powered by GPT-4, GPT-4V, GPT-3.5, DALL-E 3, Langchain LLMs, Llama-index, ' \
'Whisper and more with chatbot, assistant, text completion, vision and image generation, ' \
'internet access, chat with files, commands and code execution, file upload and download and more'
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.2.18'
version: '2.2.19'
summary: Desktop AI Assistant - GPT-4, GPT-4V, GPT-3, DALL-E 3, 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, like those available on HuggingFace, by utilizing Langchain.
Expand Down
4 changes: 4 additions & 0 deletions src/pygpt_net/CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2.2.19 (2024-05-16)

- Added a newest multimodal model: GPT-4 "omni": https://openai.com/index/hello-gpt-4o

2.2.18 (2024-05-05)

- Fix: prevent crash if no audio to play.
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.05.05 16:00:00 #
# Updated Date: 2024.05.16 02:00:00 #
# ================================================== #

__author__ = "Marcin Szczygliński"
__copyright__ = "Copyright 2024, Marcin Szczygliński"
__credits__ = ["Marcin Szczygliński"]
__license__ = "MIT"
__version__ = "2.2.18"
__build__ = "2024.05.05"
__version__ = "2.2.19"
__build__ = "2024.05.16"
__maintainer__ = "Marcin Szczygliński"
__github__ = "https://github.com/szczyglis-dev/py-gpt"
__website__ = "https://pygpt.net"
Expand Down
2 changes: 2 additions & 0 deletions src/pygpt_net/controller/dialogs/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ def toggle(self, id: str, width: int = 400, height: int = 400):
self.window.ui.dialogs.close('info.' + id)
self.active[id] = False
else:
if id == 'about':
self.window.ui.dialogs.about.prepare()
self.window.ui.dialogs.open(
'info.' + id,
width=width,
Expand Down
3 changes: 1 addition & 2 deletions src/pygpt_net/controller/lang/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# GitHub: https://github.com/szczyglis-dev/py-gpt #
# MIT License #
# Created By : Marcin Szczygliński #
# Updated Date: 2024.04.26 23:00:00 #
# Updated Date: 2024.05.16 02:00:00 #
# ================================================== #

from PySide6.QtCore import Qt
Expand Down Expand Up @@ -76,7 +76,6 @@ def apply(self):

# dialog: about
self.window.ui.nodes['dialog.about.content'].setText(trans(self.window.ui.dialogs.about.prepare_content()))
self.window.ui.nodes['dialog.about.thanks'].setText(trans('about.thanks') + ":")

# settings: llama-idx
self.window.controller.idx.settings.update_text_last_updated()
Expand Down
9 changes: 9 additions & 0 deletions src/pygpt_net/controller/lang/mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,15 @@ def get_mapping(self) -> dict:
nodes['dialog.license.label'] = 'dialog.license.label'
nodes['dialog.license.accept'] = 'dialog.license.accept'

# dialog: about
nodes['dialog.about.btn.website'] = 'about.btn.website'
nodes['dialog.about.btn.github'] = 'about.btn.github'
nodes['dialog.about.btn.support'] = 'about.btn.support'
nodes['dialog.about.thanks'] = 'about.thanks'
nodes['dialog.about.thanks.contributors'] = 'about.thanks.contributors'
nodes['dialog.about.thanks.supporters'] = 'about.thanks.supporters'
nodes['dialog.about.thanks.sponsors'] = 'about.thanks.sponsors'

# dialog: find
nodes['dialog.find.btn.clear'] = 'dialog.find.btn.clear'
nodes['dialog.find.btn.find_prev'] = 'dialog.find.btn.find_prev'
Expand Down
52 changes: 51 additions & 1 deletion src/pygpt_net/core/updater/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# GitHub: https://github.com/szczyglis-dev/py-gpt #
# MIT License #
# Created By : Marcin Szczygliński #
# Updated Date: 2024.02.16 16:00:00 #
# Updated Date: 2024.05.16 02:00:00 #
# ================================================== #

import copy
Expand All @@ -32,6 +32,9 @@ def __init__(self, window=None):
:param window: Window instance
"""
self.window = window
self.contributors = None # cache
self.donates = None # cache
self.sponsors = None # cache

def patch(self):
"""Patch config data to current version"""
Expand Down Expand Up @@ -211,6 +214,47 @@ def get_updater_url(self) -> str:
"""
return self.window.meta['website'] + "/api/version?v=" + str(self.window.meta['version'])

def get_support(self) -> (str, str, str):
"""
Get contributors, donates and sponsors
:return: (contributors, donates, sponsors)
"""
url = self.get_updater_url()
self.contributors = ""
self.donates = ""
self.sponsors = ""
try:
ctx = ssl.create_default_context()
ctx.check_hostname = True
req = Request(
url=url,
headers={'User-Agent': 'Mozilla/5.0'},
)
response = urlopen(req, context=ctx, timeout=5)
data_json = json.loads(response.read())
if "contributors" in data_json:
self.contributors = data_json["contributors"]
if "sponsors" in data_json:
self.sponsors = data_json["sponsors"]
if "donates" in data_json:
self.donates = data_json["donates"]
except Exception as e:
self.window.core.debug.log(e)
print("Failed to fetch data")

return self.contributors, self.donates, self.sponsors

def get_or_fetch_support(self) -> (str, str, str):
"""
Get contributors, donates and sponsors
:return: (contributors, donates, sponsors)
"""
if self.contributors is None or self.donates is None or self.sponsors is None:
return self.get_support()
return self.contributors, self.donates, self.sponsors

def check_silent(self) -> (bool, str, str, str, str, str):
"""
Check version in background
Expand Down Expand Up @@ -247,6 +291,12 @@ def check_silent(self) -> (bool, str, str, str, str, str):
download_windows = data_json["download_windows"]
if "download_linux" in data_json:
download_linux = data_json["download_linux"]
if "contributors" in data_json:
self.contributors = data_json["contributors"]
if "sponsors" in data_json:
self.sponsors = data_json["sponsors"]
if "donates" in data_json:
self.donates = data_json["donates"]

parsed_newest_version = parse_version(newest_version)
parsed_current_version = parse_version(self.window.meta['version'])
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.2.18",
"app.version": "2.2.18",
"updated_at": "2024-05-05T00:00:00"
"version": "2.2.19",
"app.version": "2.2.19",
"updated_at": "2024-05-16T00:00:00"
},
"access.audio.event.speech": false,
"access.audio.event.speech.disabled": [],
Expand Down
68 changes: 65 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.2.18",
"app.version": "2.2.18",
"updated_at": "2024-05-05T00:00:00"
"version": "2.2.19",
"app.version": "2.2.19",
"updated_at": "2024-05-16T00:00:00"
},
"items": {
"dall-e-2": {
Expand Down Expand Up @@ -582,6 +582,68 @@
"tokens": 4096,
"default": false
},
"gpt-4o": {
"id": "gpt-4o",
"name": "gpt-4o",
"mode": [
"chat",
"assistant",
"langchain",
"llama_index",
"vision",
"agent",
"expert"
],
"langchain": {
"provider": "openai",
"mode": [
"chat"
],
"args": [
{
"name": "model_name",
"value": "gpt-4o",
"type": "str"
}
],
"env": [
{
"name": "OPENAI_API_KEY",
"value": "{api_key}"
},
{
"name": "OPENAI_API_BASE",
"value": "{api_endpoint}"
}
]
},
"llama_index": {
"provider": "openai",
"mode": [
"chat"
],
"args": [
{
"name": "model",
"value": "gpt-4o",
"type": "str"
}
],
"env": [
{
"name": "OPENAI_API_KEY",
"value": "{api_key}"
},
{
"name": "OPENAI_API_BASE",
"value": "{api_endpoint}"
}
]
},
"ctx": 128000,
"tokens": 4096,
"default": false
},
"gpt-4-32k": {
"id": "gpt-4-32k",
"name": "gpt-4-32k",
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.2.18",
"app.version": "2.2.18",
"updated_at": "2024-05-05T00:00:00"
"version": "2.2.19",
"app.version": "2.2.19",
"updated_at": "2024-05-16T00:00:00"
},
"items": {
"chat": {
Expand Down
8 changes: 7 additions & 1 deletion src/pygpt_net/data/locale/locale.de.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
[LOCALE]
about.thanks = Besonderer Dank an die GitHub-Community
about.thanks = Besonderer Dank an:
about.thanks.contributors = GitHub-Gemeinschaft
about.thanks.sponsors = Sponsoren
about.thanks.supporters = Unterstützer
about.btn.github = GitHub
about.btn.support = Unterstützen
about.btn.website = WWW
action.add = Hinzufügen
action.clear = Löschen
action.copy = Kopieren
Expand Down
8 changes: 7 additions & 1 deletion src/pygpt_net/data/locale/locale.en.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
[LOCALE]
about.thanks = Special thanks to GitHub community
about.thanks = Special thanks to:
about.thanks.contributors = GitHub community
about.thanks.sponsors = Sponsors
about.thanks.supporters = Supporters
about.btn.github = GitHub
about.btn.support = Support
about.btn.website = WWW
action.add = Add
action.clear = Clear
action.copy = Copy
Expand Down
Loading

0 comments on commit 0477047

Please sign in to comment.