pygpt-net 2.4.34__py3-none-any.whl → 2.4.35__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.
- CHANGELOG.md +8 -0
- README.md +2066 -1894
- pygpt_net/CHANGELOG.txt +8 -0
- pygpt_net/__init__.py +3 -3
- pygpt_net/controller/attachment.py +1 -0
- pygpt_net/controller/chat/attachment.py +24 -1
- pygpt_net/controller/painter/capture.py +2 -2
- pygpt_net/controller/presets/editor.py +4 -0
- pygpt_net/controller/ui/__init__.py +4 -1
- pygpt_net/core/attachments/__init__.py +3 -2
- pygpt_net/data/config/config.json +5 -5
- pygpt_net/data/config/models.json +3 -3
- pygpt_net/data/config/modes.json +3 -3
- pygpt_net/data/locale/locale.de.ini +1 -1
- pygpt_net/data/locale/locale.en.ini +2 -1
- pygpt_net/data/locale/locale.es.ini +1 -1
- pygpt_net/data/locale/locale.fr.ini +1 -1
- pygpt_net/data/locale/locale.it.ini +1 -1
- pygpt_net/data/locale/locale.pl.ini +1 -1
- pygpt_net/data/locale/locale.uk.ini +1 -1
- pygpt_net/data/locale/locale.zh.ini +1 -1
- pygpt_net/data/win32/USER-LICENSE.rtf +0 -0
- pygpt_net/data/win32/banner.bmp +0 -0
- pygpt_net/data/win32/banner_welcome.bmp +0 -0
- pygpt_net/provider/core/config/patch.py +6 -0
- pygpt_net/ui/dialog/about.py +1 -1
- pygpt_net/ui/dialog/preset.py +1 -1
- pygpt_net/ui/widget/anims/toggles.py +2 -2
- pygpt_net/ui/widget/option/checkbox.py +1 -3
- pygpt_net/ui/widget/option/toggle.py +1 -0
- {pygpt_net-2.4.34.dist-info → pygpt_net-2.4.35.dist-info}/METADATA +2067 -1895
- {pygpt_net-2.4.34.dist-info → pygpt_net-2.4.35.dist-info}/RECORD +35 -33
- {pygpt_net-2.4.34.dist-info → pygpt_net-2.4.35.dist-info}/LICENSE +0 -0
- {pygpt_net-2.4.34.dist-info → pygpt_net-2.4.35.dist-info}/WHEEL +0 -0
- {pygpt_net-2.4.34.dist-info → pygpt_net-2.4.35.dist-info}/entry_points.txt +0 -0
pygpt_net/CHANGELOG.txt
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
2.4.35 (2024-11-28)
|
2
|
+
|
3
|
+
- Docker removed from dependencies in Snap version #82
|
4
|
+
- Refactored documentation.
|
5
|
+
- Fix: toggles real-time update hook.
|
6
|
+
- Fix: missing edit icons.
|
7
|
+
- Added tokens from attachments to counters if mode == Full context.
|
8
|
+
|
1
9
|
2.4.34 (2024-11-26)
|
2
10
|
|
3
11
|
- Added a new mode: Chat with Audio, with built-in multimodal support for audio input/output. Currently in beta, the execution of commands and tools in this mode is temporarily unavailable.
|
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.11.
|
9
|
+
# Updated Date: 2024.11.28 01: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.
|
17
|
-
__build__ = "2024.11.
|
16
|
+
__version__ = "2.4.35"
|
17
|
+
__build__ = "2024.11.28"
|
18
18
|
__maintainer__ = "Marcin Szczygliński"
|
19
19
|
__github__ = "https://github.com/szczyglis-dev/py-gpt"
|
20
20
|
__website__ = "https://pygpt.net"
|
@@ -564,6 +564,28 @@ class Attachment(QObject):
|
|
564
564
|
return os.path.exists(dir) and os.path.isdir(dir)
|
565
565
|
return False
|
566
566
|
|
567
|
+
def get_current_tokens(self) -> int:
|
568
|
+
"""
|
569
|
+
Get current tokens
|
570
|
+
|
571
|
+
:return: Current attachments tokens
|
572
|
+
"""
|
573
|
+
if self.mode != self.MODE_FULL_CONTEXT:
|
574
|
+
return 0
|
575
|
+
meta = self.window.core.ctx.get_current_meta()
|
576
|
+
if meta is None:
|
577
|
+
return 0
|
578
|
+
if meta.additional_ctx is None:
|
579
|
+
return 0
|
580
|
+
tokens = 0
|
581
|
+
for item in meta.additional_ctx:
|
582
|
+
if "tokens" in item:
|
583
|
+
try:
|
584
|
+
tokens += int(item["tokens"])
|
585
|
+
except Exception as e:
|
586
|
+
pass
|
587
|
+
return tokens
|
588
|
+
|
567
589
|
@Slot(object)
|
568
590
|
def handle_upload_error(self, error: Exception):
|
569
591
|
"""
|
@@ -599,4 +621,5 @@ class Attachment(QObject):
|
|
599
621
|
"""
|
600
622
|
self.mode = mode
|
601
623
|
self.window.core.config.set("ctx.attachment.mode", mode)
|
602
|
-
self.window.core.config.save()
|
624
|
+
self.window.core.config.save()
|
625
|
+
self.window.controller.ui.update_tokens()
|
@@ -85,7 +85,7 @@ class Capture:
|
|
85
85
|
|
86
86
|
# clear attachments before capture if needed
|
87
87
|
if self.window.controller.attachment.is_capture_clear():
|
88
|
-
self.window.controller.attachment.clear(True, auto=True)
|
88
|
+
self.window.controller.attachment.clear(True, auto=True, force=True)
|
89
89
|
|
90
90
|
try:
|
91
91
|
# prepare filename
|
@@ -127,7 +127,7 @@ class Capture:
|
|
127
127
|
|
128
128
|
# clear attachments before capture if needed
|
129
129
|
if self.window.controller.attachment.is_capture_clear():
|
130
|
-
self.window.controller.attachment.clear(True, auto=True)
|
130
|
+
self.window.controller.attachment.clear(True, auto=True, force=True)
|
131
131
|
|
132
132
|
try:
|
133
133
|
# prepare filename
|
@@ -330,6 +330,10 @@ class Editor:
|
|
330
330
|
self.window.ui.config[self.id]['tool.function'].model.updateData([])
|
331
331
|
|
332
332
|
# set focus to name field
|
333
|
+
current_model = self.window.core.config.get('model')
|
334
|
+
# set current model in combo box as selected
|
335
|
+
if id is None:
|
336
|
+
self.window.ui.config[self.id]['model'].set_value(current_model)
|
333
337
|
self.window.ui.config[self.id]['name'].setFocus()
|
334
338
|
self.show_hide_by_mode()
|
335
339
|
|
@@ -102,6 +102,8 @@ class UI:
|
|
102
102
|
prompt = str(self.window.ui.nodes['input'].toPlainText().strip())
|
103
103
|
input_tokens, system_tokens, extra_tokens, ctx_tokens, ctx_len, ctx_len_all, \
|
104
104
|
sum_tokens, max_current, threshold = self.window.core.tokens.get_current(prompt)
|
105
|
+
attachments_tokens = self.window.controller.chat.attachment.get_current_tokens()
|
106
|
+
sum_tokens += attachments_tokens
|
105
107
|
|
106
108
|
# ctx tokens
|
107
109
|
ctx_string = "{} / {} - {} {}".format(
|
@@ -119,11 +121,12 @@ class UI:
|
|
119
121
|
parsed_max_current = str(int(max_current))
|
120
122
|
parsed_max_current = parsed_max_current.replace("000000", "M").replace("000", "k")
|
121
123
|
|
122
|
-
input_string = "{} + {} + {} + {} = {} / {}".format(
|
124
|
+
input_string = "{} + {} + {} + {} + {} = {} / {}".format(
|
123
125
|
input_tokens,
|
124
126
|
system_tokens,
|
125
127
|
ctx_tokens,
|
126
128
|
extra_tokens,
|
129
|
+
attachments_tokens,
|
127
130
|
parsed_sum,
|
128
131
|
parsed_max_current
|
129
132
|
)
|
@@ -280,19 +280,20 @@ class Attachments:
|
|
280
280
|
del self.items[mode][id]
|
281
281
|
self.save()
|
282
282
|
|
283
|
-
def delete_all(self, mode: str, remove_local: bool = False, auto: bool = False):
|
283
|
+
def delete_all(self, mode: str, remove_local: bool = False, auto: bool = False, force: bool = False):
|
284
284
|
"""
|
285
285
|
Delete all attachments
|
286
286
|
|
287
287
|
:param mode: mode
|
288
288
|
:param remove_local: remove local copy
|
289
289
|
:param auto: auto delete
|
290
|
+
:param force: force delete
|
290
291
|
"""
|
291
292
|
if mode not in self.items:
|
292
293
|
self.items[mode] = {}
|
293
294
|
|
294
295
|
for id in list(self.items[mode].keys()):
|
295
|
-
if not self.items[mode][id].consumed and auto:
|
296
|
+
if (not self.items[mode][id].consumed and auto) and not force:
|
296
297
|
continue
|
297
298
|
if remove_local:
|
298
299
|
self.window.core.filesystem.remove_upload(
|
@@ -1,8 +1,8 @@
|
|
1
1
|
{
|
2
2
|
"__meta__": {
|
3
|
-
"version": "2.4.
|
4
|
-
"app.version": "2.4.
|
5
|
-
"updated_at": "2024-11-
|
3
|
+
"version": "2.4.35",
|
4
|
+
"app.version": "2.4.35",
|
5
|
+
"updated_at": "2024-11-28T00:00:00"
|
6
6
|
},
|
7
7
|
"access.audio.event.speech": false,
|
8
8
|
"access.audio.event.speech.disabled": [],
|
@@ -81,7 +81,7 @@
|
|
81
81
|
"ctx.auto_summary.model": "gpt-4o-mini",
|
82
82
|
"ctx.convert_lists": false,
|
83
83
|
"ctx.counters.all": false,
|
84
|
-
"ctx.edit_icons":
|
84
|
+
"ctx.edit_icons": true,
|
85
85
|
"ctx.code_interpreter": true,
|
86
86
|
"ctx.list.expanded": [],
|
87
87
|
"ctx.records.filter": "all",
|
@@ -234,7 +234,7 @@
|
|
234
234
|
"painter.brush.color": "Black",
|
235
235
|
"painter.brush.mode": "brush",
|
236
236
|
"painter.brush.size": 3,
|
237
|
-
"painter.canvas.size": "
|
237
|
+
"painter.canvas.size": "1280x720",
|
238
238
|
"plugins": {},
|
239
239
|
"plugins_enabled": {
|
240
240
|
"agent": false,
|
pygpt_net/data/config/modes.json
CHANGED
@@ -923,7 +923,7 @@ tip.output.tab.draw = Sie können das Zeichenwerkzeug für schnelle Skizzen oder
|
|
923
923
|
tip.output.tab.files = Dieses Verzeichnis mit Arbeitsdateien befindet sich auf Ihrer Festplatte. Die Dateien hier sind für KI zum Lesen zugänglich. KI kann Dateien lesen und schreiben sowie Code aus diesem Verzeichnis ausführen. Sie können dieses Verzeichnis lokal auf Ihrem System öffnen und beliebige Dateien hierhin verschieben. Sie können auch die Dateien mit Llama-Index indizieren, damit sie als zusätzliche Wissens Quelle dienen.
|
924
924
|
tip.output.tab.notepad = Das Notizbuch kann als Werkzeug zum Notieren und Speichern von Informationen dienen. Sie können hier jeden Text aufbewahren, Text aus dem Chat-Fenster kopieren, und alle Informationen werden automatisch gespeichert. Sie können weitere Notizbücher mit der Konfigurationsoption in den Einstellungen erstellen.
|
925
925
|
tip.tokens.ctx = Kontext (Erinnerung): in Gebrauch / alle - Token
|
926
|
-
tip.tokens.input = Token:
|
926
|
+
tip.tokens.input = Token: Benutzereingabeaufforderung + Systemaufforderung + Kontext + extra + Anhänge = Summe / Maximum
|
927
927
|
tip.toolbox.assistants = Die Liste der Assistenten zeigt die erstellten Assistenten, die auf dem entfernten Server arbeiten. Alle Änderungen werden mit dem entfernten Assistenten synchronisiert.
|
928
928
|
tip.toolbox.ctx = Erstellen Sie so viele Gesprächskontexte, wie Sie benötigen; Sie können jederzeit zu ihnen zurückkehren.
|
929
929
|
tip.toolbox.indexes = Durch das Indizieren von Gesprächen und Dateien können Sie das verfügbare Wissen mit Ihren eigenen Daten und Gesprächsverläufen erweitern.
|
@@ -844,6 +844,7 @@ preset.agent = Agent (Legacy)
|
|
844
844
|
preset.agent_llama = Agent (LlamaIndex)
|
845
845
|
preset.agent_provider = Agent Provider
|
846
846
|
preset.agent_provider.desc = Select the agent type for the current preset
|
847
|
+
preset.audio = Chat with Audio
|
847
848
|
preset.ai_name = AI name
|
848
849
|
preset.assistant = Assistant
|
849
850
|
preset.assistant_id = OpenAI Assistant ID
|
@@ -1156,7 +1157,7 @@ tip.output.tab.draw = You can use the drawing tool for quick sketching or captur
|
|
1156
1157
|
tip.output.tab.files = This working files directory is on your disk. The files here are accessible for AI. AI can write and read files, as well as run code from this directory. You can open this directory locally on your system and place any files here. You can also index the files from here with LlamaIndex, so they serve as an additional knowledge source.
|
1157
1158
|
tip.output.tab.notepad = The notepad can serve as a tool for taking notes and storing information. You can keep any text here, copy text from the chat window, and all information will be automatically saved. You can create more notepads using the configuration option in the settings.
|
1158
1159
|
tip.tokens.ctx = Context (memory): in use / all - tokens
|
1159
|
-
tip.tokens.input = Tokens: input prompt + system prompt + context + extra = sum / max
|
1160
|
+
tip.tokens.input = Tokens: input prompt + system prompt + context + extra + attachments = sum / max
|
1160
1161
|
tip.toolbox.assistants = The list of assistants shows the assistants created and operating on the remote server. Any changes will be synchronized with the remote assistant.
|
1161
1162
|
tip.toolbox.ctx = Create as many conversation contexts as you need; you can return to them at any time.
|
1162
1163
|
tip.toolbox.indexes = By indexing conversations and files, you can expand the available knowledge with your own data and conversation history.
|
@@ -923,7 +923,7 @@ tip.output.tab.draw = Puedes usar la herramienta de dibujo para hacer bocetos r
|
|
923
923
|
tip.output.tab.files = Este directorio de archivos de trabajo se encuentra en tu disco. Los archivos aquí son accesibles para que la IA los lea. La IA puede escribir y leer archivos, así como ejecutar código desde este directorio. Puedes abrir este directorio localmente en tu sistema y colocar cualquier archivo aquí. También puedes indexar los archivos con LlamaIndex, para que sirvan como una fuente de conocimiento adicional.
|
924
924
|
tip.output.tab.notepad = El bloc de notas puede servir como una herramienta para tomar notas y almacenar información. Puedes mantener cualquier texto aquí, copiar texto de la ventana de chat, y toda la información se guardará automáticamente. Puedes crear más blocs de notas utilizando la opción de configuración en los ajustes.
|
925
925
|
tip.tokens.ctx = Contexto (memoria): en uso / todos - tokens
|
926
|
-
tip.tokens.input =
|
926
|
+
tip.tokens.input = Fichas: indicación del usuario + indicación del sistema + contexto + adicional + adjuntos = suma / máximo
|
927
927
|
tip.toolbox.assistants = La lista de asistentes muestra los asistentes creados y operando en el servidor remoto. Cualquier cambio se sincronizará con el asistente remoto.
|
928
928
|
tip.toolbox.ctx = Crea tantos contextos de conversación como necesites; puedes volver a ellos en cualquier momento.
|
929
929
|
tip.toolbox.indexes = Al indexar conversaciones y archivos, puedes ampliar el conocimiento disponible con tus propios datos e historial de conversaciones.
|
@@ -923,7 +923,7 @@ tip.output.tab.draw = Vous pouvez utiliser l'outil de dessin pour esquisser rapi
|
|
923
923
|
tip.output.tab.files = Ce répertoire de fichiers de travail se trouve sur votre disque. Les fichiers ici sont accessibles pour l'IA à lire. L'IA peut lire et écrire des fichiers, ainsi qu'exécuter du code à partir de ce répertoire. Vous pouvez ouvrir ce répertoire localement sur votre système et placer n'importe quels fichiers ici. Vous pouvez également indexer les fichiers avec LlamaIndex, afin qu'ils servent de source de connaissances supplémentaire.
|
924
924
|
tip.output.tab.notepad = Le bloc-notes peut servir d'outil pour prendre des notes et stocker des informations. Vous pouvez conserver ici tout texte, copier du texte de la fenêtre de chat, et toutes les informations seront automatiquement sauvegardées. Vous pouvez créer plus de blocs-notes à l'aide de l'option de configuration dans les paramètres.
|
925
925
|
tip.tokens.ctx = Contexte (mémoire) : en utilisation / total - jetons
|
926
|
-
tip.tokens.input = Jetons
|
926
|
+
tip.tokens.input = Jetons: invite de l'utilisateur + invite système + contexte + extra + pièces jointes = somme / maximum
|
927
927
|
tip.toolbox.assistants = La liste des assistants montre les assistants créés et opérant sur le serveur distant. Tout changement sera synchronisé avec l'assistant distant.
|
928
928
|
tip.toolbox.ctx = Créez autant de contextes de conversation que vous en avez besoin ; vous pouvez y revenir à tout moment.
|
929
929
|
tip.toolbox.indexes = En indexant des conversations et des fichiers, vous pouvez étendre les connaissances disponibles avec vos propres données et historique de conversation.
|
@@ -923,7 +923,7 @@ tip.output.tab.draw = Puoi utilizzare lo strumento di disegno per fare rapidi sc
|
|
923
923
|
tip.output.tab.files = Questa directory di file di lavoro si trova sul tuo disco. I file qui sono accessibili per l'IA per la lettura. L'IA può scrivere e leggere file, così come eseguire codice da questa directory. Puoi aprire questa directory localmente sul tuo sistema e posizionare qui qualsiasi file. Puoi anche indicizzare i file con LlamaIndex, in modo che servano come fonte di conoscenza aggiuntiva.
|
924
924
|
tip.output.tab.notepad = Il blocco note può servire come strumento per prendere appunti e memorizzare informazioni. Puoi conservare qui qualsiasi testo, copiare il testo dalla finestra di chat, e tutte le informazioni verranno salvate automaticamente. Puoi creare più blocchi note utilizzando l'opzione di configurazione nelle impostazioni.
|
925
925
|
tip.tokens.ctx = Contesto (memoria): in uso / totale - token
|
926
|
-
tip.tokens.input =
|
926
|
+
tip.tokens.input = Gettoni: prompt dell'utente + prompt di sistema + contesto + extra + allegati = somma / massimo
|
927
927
|
tip.toolbox.assistants = L'elenco degli assistenti mostra gli assistenti creati e operanti sul сервер remoto. Tutte le modifiche saranno sincronizzate con l'assistente remoto.
|
928
928
|
tip.toolbox.ctx = Crea quanti contesti di conversazione hai bisogno; puoi ritornarci in qualsiasi momento.
|
929
929
|
tip.toolbox.indexes = Indicizzando conversazioni e файлы, puoi espandere le conoscenze disponibili con i tuoi propri dati e storico delle conversazioni.
|
@@ -924,7 +924,7 @@ tip.output.tab.draw = Możesz użyć narzędzia do rysowania do szybkiego szkico
|
|
924
924
|
tip.output.tab.files = Katalog z plikami roboczymi znajduje się na Twoim dysku. Pliki tutaj są dostępne dla AI. AI może czytać i zapisywać pliki, a także uruchamiać kod z tego katalogu. Możesz otworzyć ten katalog lokalnie w swoim systemie i umieścić tutaj dowolne pliki. Możesz także zindeksować pliki tutaj przy użyciu LlamaIndex, aby służyły jako dodatkowe źródło wiedzy.
|
925
925
|
tip.output.tab.notepad = Notatnik może służyć jako narzędzie do robienia notatek i przechowywania informacji. Możesz tutaj przechowywać dowolny tekst, kopiować tekst z okna czatu, a wszystkie informacje zostaną automatycznie zapisane. Możesz utworzyć więcej notatników, korzystając z opcji konfiguracji w ustawieniach.
|
926
926
|
tip.tokens.ctx = Kontekst (pamięć): w użyciu / całość - l.tokenów
|
927
|
-
tip.tokens.input = Tokeny: prompt
|
927
|
+
tip.tokens.input = Tokeny: prompt użytkownika + systemowy prompt + kontekst + dodatkowe + załączniki = suma / max
|
928
928
|
tip.toolbox.assistants = Lista asystentów pokazuje asystentów stworzonych i działających na zdalnym serwerze. Wszelkie zmiany zostaną zsynchronizowane ze zdalnym asystentem.
|
929
929
|
tip.toolbox.ctx = Twórz tyle kontekstów rozmów, ile potrzebujesz; możesz do nich wrócić w dowolnym momencie.
|
930
930
|
tip.toolbox.indexes = Indeksując rozmowy i pliki, możesz rozszerzyć dostępną wiedzę o własne dane i historię rozmów.
|
@@ -923,7 +923,7 @@ tip.output.tab.draw = Ви можете використовувати інст
|
|
923
923
|
tip.output.tab.files = Ця директорія робочих файлів знаходиться на вашому диску. Файли тут доступні для ШІ для читання. ШІ може читати і записувати файли, а також виконувати код з цієї директорії. Ви можете відкрити цю директорію локально на вашій системі та розмістити будь-які файли тут. Ви також можете індексувати файли за допомогою LlamaIndex, щоб вони служили додатковим джерелом знань.
|
924
924
|
tip.output.tab.notepad = Блокнот може слугувати інструментом для роблення нотаток та зберігання інформації. Ви можете зберігати тут будь-який текст, копіювати текст з вікна чату, і всі інформація буде автоматично збережена. Ви можете створити більше блокнотів за допомогою опції конфігурації в налаштуваннях.
|
925
925
|
tip.tokens.ctx = Контекст (пам'ять): використано / всього - токени
|
926
|
-
tip.tokens.input = Токени:
|
926
|
+
tip.tokens.input = Токени: запит користувача + системний запит + контекст + додаткові + вкладення = сума / макс
|
927
927
|
tip.toolbox.assistants = Список асистентів показує асистентів, створених і що працюють на віддаленому сервері. Будь-які зміни будуть синхронізовані з віддаленим асистентом.
|
928
928
|
tip.toolbox.ctx = Створіть стільки контекстів розмов, як вам потрібно; ви можете повернутися до них у будь-який час.
|
929
929
|
tip.toolbox.indexes = Індексуючи розмови та файли, ви можете розширити доступні знання зі своїми власними даними та історією розмов.
|
@@ -1039,7 +1039,7 @@ tip.output.tab.draw = 您可以使用繪圖工具進行快速素描或從相機
|
|
1039
1039
|
tip.output.tab.files = 此工作文件目錄位於您的磁盤上。這裡的文件可供AI訪問。AI可以寫入和讀取文件,也可以從此目錄運行代碼。您可以在本地系統上打開此目錄並放置任何文件。您還可以使用LlamaIndex對這裡的文件進行索引,以便它們作為額外的知識來源。
|
1040
1040
|
tip.output.tab.notepad = 記事本可以作為記錄筆記和存儲信息的工具。您可以在這裡保留任何文本,從聊天窗口複製文本,所有信息都會自動保存。您可以使用設置中的配置選項創建更多記事本。
|
1041
1041
|
tip.tokens.ctx = 上下文(記憶):使用中 / 全部 - 令牌
|
1042
|
-
tip.tokens.input =
|
1042
|
+
tip.tokens.input = 代币:用户输入提示 + 系统提示 + 上下文 + 额外 + 附件 = 总和 / 最大值
|
1043
1043
|
tip.toolbox.assistants = 助手列表顯示在遠程服務器上創建和運行的助手。任何更改都將與遠程助手同步。
|
1044
1044
|
tip.toolbox.ctx = 創建所需數量的對話上下文;您隨時可以返回它們。
|
1045
1045
|
tip.toolbox.indexes = 通過索引對話和文件,您可以用自己的數據和對話歷史擴展可用知識。
|
Binary file
|
Binary file
|
Binary file
|
@@ -1717,6 +1717,12 @@ class Patch:
|
|
1717
1717
|
'ctx.attachment.query.model')
|
1718
1718
|
updated = True
|
1719
1719
|
|
1720
|
+
# < 2.4.35
|
1721
|
+
if old < parse_version("2.4.35"):
|
1722
|
+
print("Migrating config from < 2.4.35...")
|
1723
|
+
data["ctx.edit_icons"] = True
|
1724
|
+
updated = True
|
1725
|
+
|
1720
1726
|
# update file
|
1721
1727
|
migrated = False
|
1722
1728
|
if updated:
|
pygpt_net/ui/dialog/about.py
CHANGED
@@ -59,7 +59,7 @@ class About:
|
|
59
59
|
versions = False
|
60
60
|
|
61
61
|
if versions:
|
62
|
-
lib_versions = "OpenAI API: {},
|
62
|
+
lib_versions = "OpenAI API: {}, LangChain: {}, LlamaIndex: {}\n\n".format(
|
63
63
|
openai_version,
|
64
64
|
langchain_version,
|
65
65
|
llama_index_version,
|
pygpt_net/ui/dialog/preset.py
CHANGED
@@ -102,6 +102,7 @@ class Preset(BaseConfigDialog):
|
|
102
102
|
# modes
|
103
103
|
mode_keys = [
|
104
104
|
MODE_CHAT,
|
105
|
+
MODE_AUDIO,
|
105
106
|
MODE_COMPLETION,
|
106
107
|
MODE_IMAGE,
|
107
108
|
MODE_VISION,
|
@@ -109,7 +110,6 @@ class Preset(BaseConfigDialog):
|
|
109
110
|
MODE_LLAMA_INDEX,
|
110
111
|
MODE_AGENT_LLAMA,
|
111
112
|
MODE_AGENT,
|
112
|
-
MODE_AUDIO,
|
113
113
|
MODE_EXPERT,
|
114
114
|
]
|
115
115
|
rows_mode = QVBoxLayout()
|
@@ -26,8 +26,9 @@ class AnimToggle(QCheckBox):
|
|
26
26
|
_light_grey_pen = QPen(Qt.lightGray)
|
27
27
|
|
28
28
|
def __init__(self, title="", parent=None):
|
29
|
-
super().__init__(
|
29
|
+
super().__init__()
|
30
30
|
self.setText(title)
|
31
|
+
self.option = None
|
31
32
|
|
32
33
|
# Initialize the colors based on the current palette
|
33
34
|
self.updateColors()
|
@@ -103,7 +104,6 @@ class AnimToggle(QCheckBox):
|
|
103
104
|
self.animations_group.start()
|
104
105
|
|
105
106
|
def paintEvent(self, e: QPaintEvent):
|
106
|
-
|
107
107
|
contRect = self.contentsRect()
|
108
108
|
handleRadius = round(0.24 * contRect.height())
|
109
109
|
|
@@ -8,6 +8,7 @@
|
|
8
8
|
# Created By : Marcin Szczygliński #
|
9
9
|
# Updated Date: 2024.11.24 22:00:00 #
|
10
10
|
# ================================================== #
|
11
|
+
|
11
12
|
from PySide6.QtGui import QIcon
|
12
13
|
from PySide6.QtWidgets import QCheckBox, QHBoxLayout, QWidget, QLabel
|
13
14
|
|
@@ -67,10 +68,7 @@ class OptionCheckbox(QWidget):
|
|
67
68
|
self.box.isChecked()
|
68
69
|
)
|
69
70
|
)
|
70
|
-
|
71
71
|
self.label = QLabel(self.title)
|
72
|
-
self.box = AnimToggle()
|
73
|
-
|
74
72
|
self.layout = QHBoxLayout()
|
75
73
|
self.layout.addWidget(self.box)
|
76
74
|
|
@@ -47,6 +47,7 @@ class OptionCheckbox(QWidget):
|
|
47
47
|
self.box = AnimToggle(self.title, self.window)
|
48
48
|
if self.value is not None:
|
49
49
|
self.box.setChecked(self.value)
|
50
|
+
|
50
51
|
self.box.stateChanged.connect(
|
51
52
|
lambda: self.window.controller.config.checkbox.on_update(
|
52
53
|
self.parent_id,
|