Skip to content

Commit

Permalink
Improved material theme support
Browse files Browse the repository at this point in the history
  • Loading branch information
szczyglis-dev committed Dec 8, 2023
1 parent 2750482 commit fa2917a
Show file tree
Hide file tree
Showing 58 changed files with 476 additions and 342 deletions.
187 changes: 100 additions & 87 deletions README.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions build.bat
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
venv\Scripts\activate
pyinstaller windows.spec
call venv\Scripts\activate
call pyinstaller windows.spec
Empty file modified build.sh
100644 → 100755
Empty file.
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 = '2023, pygpt.net'
author = 'szczyglis-dev, Marcin Szczygliński'
release = '2.0.4'
release = '2.0.5'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Expand Down
7 changes: 6 additions & 1 deletion docs/source/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,19 @@ The following basic options can be modified directly within the application:
* ``Frequency Penalty`` Decreases the likelihood of repetition in the model's responses.
* ``Presence Penalty`` Discourages the model from mentioning topics that have already been brought up in the conversation.
* ``Use Context`` Toggles the use of conversation context (memory of previous inputs). When turned off, the context won't be saved or factored into conversation responses.
* ``Context Auto-summary`` Toggles context auto-summarization on contexts list. (GPT-3.5 is used for this)
* ``Store History`` Dictates whether the conversation history and context are saved. When turned off, history won't be written to the disk upon closing the application.
* ``Store Time in History`` Chooses whether timestamps are added to the .txt files. These files are stored in the *history* directory within the user's work directory.
* ``Context Threshold`` Sets the number of tokens reserved for the model to respond to the next prompt. This helps accommodate responses without exceeding the model's limit, such as 4096 tokens.
* ``Max Output Tokens`` Determines the maximum number of tokens the model can generate for a single response.
* ``Max Total Tokens`` Defines the maximum token count that the application can send to the model, including the conversation context. To prevent reaching the model capacity, this setting helps manage the size of the context included in messages.
* ``Font Size`` Adjusts the font size in the chat window for better readability.
* ``Font Size (chat window)`` Adjusts the font size in the chat window for better readability.
* ``Font Size (input)`` Adjusts the font size in the input window for better readability.
* ``Font Size (ctx list)`` Adjusts the font size in contexts list.
* ``OpenAI API KEY`` The personal API key you'll need to enter into the application for it to function.
* ``OpenAI ORGANIZATION KEY`` The organization's API key, which is optional for use within the application.
* ``Auto-summary system prompt`` System prompt for context auto-summary (GPT-3.5 is used for this)
* ``Auto-summary instruction`` Summary prompt for context auto-summary (GPT-3.5 is used for this)


JSON files
Expand Down
1 change: 1 addition & 0 deletions docs/source/credits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Marcin Szczygliński (Poland, UE)

**Contact:**
[email protected]
[email protected]

**License:**
MIT License
Expand Down
Binary file modified docs/source/images/v2_azure.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/images/v2_code_execute.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/images/v2_context_list.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/images/v2_dalle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/images/v2_file_input.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/images/v2_file_output.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/images/v2_main.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/images/v2_mode_assistant.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/images/v2_mode_chat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/images/v2_mode_completion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/images/v2_mode_langchain.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/images/v2_mode_vision.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/images/v2_mode_vision_upload.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/images/v2_notepad.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/images/v2_plugin_google.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/images/v2_preset.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/images/v2_settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/images/v2_tokens1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/images/v2_tokens2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
PYGPT v2 - pygpt.net
====================

| **Last update:** 2023-12-08 11:00
| **Last update:** 2023-12-08 16:00
| **Project website:** https://pygpt.net
| **GitHub:** https://github.com/szczyglis-dev/py-gpt
| **PyPI:** https://pypi.org/project/pygpt-net
| **Release:** 2.0.4 (2023-12-08)
| **Release:** 2.0.5 (2023-12-08)
.. toctree::
:maxdepth: 3
Expand Down
113 changes: 62 additions & 51 deletions docs/source/plugins_list.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,36 @@ Plugin capabilities include:

If a file being created (with the same name) already exists, a prefix including the date and time is added to the file name.

**Options:**

- ``Enable: Read file`` *cmd_read_file*

Allow `read_file` command. *Default:* `True`

- ``Enable: Append to file`` *cmd_append_file*

Allow `append_file` command. *Default:* `True`

- ``Enable: Save file`` *cmd_save_file*

Allow `save_file` command. *Default:* `True`

- ``Enable: Delete file`` *cmd_delete_file*

Allow `delete_file` command. *Default:* `True`

- ``Enable: List files (ls)`` *cmd_list_files*

Allow `list_files` command. *Default:* `True`

- ``Enable: List directories (ls)`` *cmd_list_dirs*

Allow `list_dirs` command. *Default:* `True`

- ``Enable: Directory creation (mkdir)`` *cmd_mkdir*

Allow `mkdir` command. *Default:* `True`


Command: Code Interpreter
-------------------------
Expand All @@ -30,11 +60,22 @@ Another feature is the ability to execute system commands and return their resul

**Options:**

``Python command template`` *python_cmd_tpl*
- ``Python command template`` *python_cmd_tpl*

Python command template (use {filename} as path to file placeholder). *Default:* `python3 {filename}`

- ``Enable: Python Code Generate and Execute`` *cmd_code_execute*

*Default:* `python3 {filename}`
Allow Python code execution (generate and execute from file). *Default:* `True`

- ``Enable: Python Code Execute (File)`` *cmd_code_execute_file*

Allow Python code execution from existing file. *Default:* `True`

- ``Enable: System Command Execute`` *cmd_sys_exec*

Allow system commands execution. *Default:* `True`

Python command template.

Command: Google Web Search
--------------------------
Expand Down Expand Up @@ -91,23 +132,16 @@ Here, you should enter the API key, which can be obtained by registering for fre

``Azure Region`` *azure_region*

*Default:* `eastus`

You must also provide the appropriate region for Azure here.

You must also provide the appropriate region for Azure here. *Default:* `eastus`

``Voice (EN)`` *voice_en*

*Default:* `en-US-AriaNeural`

Here you can specify the name of the voice used for speech synthesis for English.
Here you can specify the name of the voice used for speech synthesis for English. *Default:* `en-US-AriaNeural`


``Voice (PL)`` *voice_pl*

*Default:* `pl-PL-AgnieszkaNeural`

Here you can specify the name of the voice used for speech synthesis for the Polish language.
Here you can specify the name of the voice used for speech synthesis for the Polish language. *Default:* `pl-PL-AgnieszkaNeural`

If speech synthesis is enabled, a voice will be additionally generated in the background while generating a response via GPT.

Expand All @@ -121,16 +155,14 @@ The plugin enables voice synthesis using the TTS model developed by OpenAI. Usin

``Model`` *model*

*Default:* `tts-1`

Choose the model. Available options:

* tts-1
* tts-1-hd

``Voice`` *voice*
*Default:* `tts-1`

*Default:* `alloy`
``Voice`` *voice*

Choose the voice. Available voices to choose from:

Expand All @@ -141,6 +173,8 @@ Choose the voice. Available voices to choose from:
* nova
* shimmer

*Default:* `alloy`

Audio Input (OpenAI Whisper)
----------------------------

Expand All @@ -150,39 +184,27 @@ Configuration options:

``Model`` *model*

*Default:* `whisper-1`

Choose the model.
Choose the model. *Default:* `whisper-1`

``Timeout`` *timeout*

*Default:* `2`

The number of seconds the application waits for voice input from the microphone.
The number of seconds the application waits for voice input from the microphone. *Default:* `2`

``Phrase max length`` *phrase_length*

*Default:* `2`

Maximum duration for a voice sample (in seconds).
Maximum duration for a voice sample (in seconds). *Default:* `2`

``Min energy`` *min_energy*

*Default:* `4000`

The minimum volume level for the microphone to trigger voice detection. If the microphone is too sensitive, increase this value.
The minimum volume level for the microphone to trigger voice detection. If the microphone is too sensitive, increase this value. *Default:* `4000`

``Adjust for ambient noise`` *adjust_noise*

*Default:* `True`

Enables adjustment to ambient noise levels.
Enables adjustment to ambient noise levels. *Default:* `True`

``Continuous listen`` *continuous_listen*

*Default:* `True`

Enables continuous microphone listening. If the option is enabled, the microphone will be listening at all times. If disabled, listening must be started manually by enabling the ``Speak`` option.
Enables continuous microphone listening. If the option is enabled, the microphone will be listening at all times. If disabled, listening must be started manually by enabling the ``Speak`` option. *Default:* `True`


Self Loop
Expand All @@ -207,18 +229,15 @@ You can adjust the number of iterations for the self-conversation in the ``Plugi

``Clear context output`` *clear_output*

*Default:* `True`

The option clears the previous answer in the context, which is then used as input for the next iteration.
The option clears the previous answer in the context, which is then used as input for the next iteration. *Default:* `True`


``Reverse roles between iterations`` *reverse_roles*

*Default:* `True`

If enabled, this option reverses the roles (AI <> user) with each iteration. For example,
if in the previous iteration the response was generated for "Batman," the next iteration will use that
response to generate an input for "Joker."
response to generate an input for "Joker." *Default:* `True`


Real Time
Expand All @@ -233,24 +252,16 @@ When enabled, it quietly enhances each system prompt with current time informati

``Append time`` *hour*

*Default:* `True`

If enabled, it appends the current time to the system prompt.

If enabled, it appends the current time to the system prompt. *Default:* `True`

``Append date`` *date*

*Default:* `True`

If enabled, it appends the current date to the system prompt.

If enabled, it appends the current date to the system prompt. *Default:* `True`

``Template`` *tpl*

*Default:* `Current time is {time}.`

Template to append to the system prompt. The placeholder ``{time}`` will be replaced with the
current date and time in real-time.
current date and time in real-time. *Default:* `Current time is {time}.`

Creating Your Own Plugins
--------------------------
Expand Down
8 changes: 4 additions & 4 deletions install.bat
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
python src\pygpt_net\app.py
call python -m venv venv
call venv\Scripts\activate
call pip install -r requirements.txt
call python src\pygpt_net\app.py
2 changes: 2 additions & 0 deletions linux.spec
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ a = Analysis(
('src/pygpt_net/data/config/models.json', 'data/config'),
('src/pygpt_net/data/config/settings.json', 'data/config'),
('src/pygpt_net/data/locale/*', 'data/locale'),
('src/pygpt_net/data/css/*', 'data/css'),
('src/pygpt_net/data/fonts/Lato/*', 'data/fonts/Lato'),
('src/pygpt_net/data/logo.png', 'data'),
('src/pygpt_net/CHANGELOG.txt', '.'),
('README.md', '.'),
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "pygpt-net"
version = "2.0.4"
version = "2.0.5"
description = "AI Desktop Assistant powered by GPT-4, GPT-4V, GPT-3, Whisper, TTS and DALL-E 3 with chat, assistant, text completion, vision and image generation"
readme = "README.md"
authors = [{ name = "Marcin Szczygliński", email = "[email protected]" }]
Expand Down
4 changes: 2 additions & 2 deletions run.bat
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
venv\Scripts\activate
python src\pygpt_net\app.py
call venv\Scripts\activate
call python src\pygpt_net\app.py
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.0.4'
VERSION = '2.0.5'
DESCRIPTION = 'AI Desktop Assistant powered by GPT-4, GPT-4V, GPT-3, Whisper, TTS and DALL-E 3 with chat, assistant, text completion, ' \
'vision and image generation'
LONG_DESCRIPTION = 'A package containing a GPT-4, GPT-4V, GPT-3, Whisper, TTS and DALL-E 3 AI desktop assistant, chatbot, ' \
Expand Down
6 changes: 6 additions & 0 deletions src/pygpt_net/CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2.0.5 (2023-12-08)

- Added support for external CSS
- Added custom fonts support
- Improved material theme support

2.0.4 (2023-12-08)

- Added configuration options for plugins: Files I/O, Code Interpreter
Expand Down
4 changes: 2 additions & 2 deletions src/pygpt_net/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
# GitHub: https://github.com/szczyglis-dev/py-gpt #
# MIT License #
# Created By : Marcin Szczygliński #
# Updated Date: 2023.12.08 11:00:00 #
# Updated Date: 2023.12.08 16:00:00 #
# ================================================== #

__author__ = "Marcin Szczygliński"
__copyright__ = "Copyright 2023, Marcin Szczygliński"
__credits__ = ["Marcin Szczygliński"]
__license__ = "MIT"
__version__ = "2.0.4"
__version__ = "2.0.5"
__build__ = "2023.12.08"
__maintainer__ = "Marcin Szczygliński"
__github__ = "https://github.com/szczyglis-dev/py-gpt"
Expand Down
Loading

0 comments on commit fa2917a

Please sign in to comment.