pygpt-net 2.4.42__py3-none-any.whl → 2.4.44__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 (67) hide show
  1. CHANGELOG.md +11 -0
  2. README.md +17 -2
  3. pygpt_net/CHANGELOG.txt +11 -0
  4. pygpt_net/__init__.py +3 -3
  5. pygpt_net/controller/attachment.py +31 -3
  6. pygpt_net/controller/chat/attachment.py +37 -36
  7. pygpt_net/controller/config/placeholder.py +6 -4
  8. pygpt_net/controller/idx/common.py +7 -3
  9. pygpt_net/core/attachments/__init__.py +7 -2
  10. pygpt_net/core/attachments/context.py +52 -34
  11. pygpt_net/core/db/__init__.py +2 -1
  12. pygpt_net/core/debug/attachments.py +1 -0
  13. pygpt_net/core/idx/__init__.py +8 -3
  14. pygpt_net/core/idx/indexing.py +24 -7
  15. pygpt_net/core/idx/ui/__init__.py +22 -0
  16. pygpt_net/core/idx/ui/loaders.py +217 -0
  17. pygpt_net/data/config/config.json +4 -4
  18. pygpt_net/data/config/models.json +3 -3
  19. pygpt_net/data/config/modes.json +3 -3
  20. pygpt_net/data/config/settings.json +5 -5
  21. pygpt_net/data/locale/locale.de.ini +3 -3
  22. pygpt_net/data/locale/locale.en.ini +11 -9
  23. pygpt_net/data/locale/locale.es.ini +3 -3
  24. pygpt_net/data/locale/locale.fr.ini +3 -3
  25. pygpt_net/data/locale/locale.it.ini +3 -3
  26. pygpt_net/data/locale/locale.pl.ini +3 -3
  27. pygpt_net/data/locale/locale.uk.ini +3 -3
  28. pygpt_net/data/locale/locale.zh.ini +3 -3
  29. pygpt_net/data/locale/plugin.mailer.en.ini +5 -5
  30. pygpt_net/item/attachment.py +5 -1
  31. pygpt_net/item/ctx.py +99 -2
  32. pygpt_net/migrations/Version20241215110000.py +25 -0
  33. pygpt_net/migrations/__init__.py +3 -1
  34. pygpt_net/plugin/cmd_files/__init__.py +3 -2
  35. pygpt_net/provider/core/attachment/json_file.py +4 -1
  36. pygpt_net/provider/core/config/patch.py +6 -0
  37. pygpt_net/provider/core/ctx/db_sqlite/storage.py +50 -7
  38. pygpt_net/provider/core/ctx/db_sqlite/utils.py +29 -5
  39. pygpt_net/provider/loaders/base.py +14 -0
  40. pygpt_net/provider/loaders/hub/yt/base.py +5 -0
  41. pygpt_net/provider/loaders/web_database.py +13 -5
  42. pygpt_net/provider/loaders/web_github_issues.py +5 -1
  43. pygpt_net/provider/loaders/web_google_calendar.py +9 -1
  44. pygpt_net/provider/loaders/web_google_docs.py +6 -1
  45. pygpt_net/provider/loaders/web_google_drive.py +10 -1
  46. pygpt_net/provider/loaders/web_google_gmail.py +2 -1
  47. pygpt_net/provider/loaders/web_google_keep.py +5 -1
  48. pygpt_net/provider/loaders/web_google_sheets.py +5 -1
  49. pygpt_net/provider/loaders/web_microsoft_onedrive.py +15 -1
  50. pygpt_net/provider/loaders/web_page.py +4 -2
  51. pygpt_net/provider/loaders/web_rss.py +2 -1
  52. pygpt_net/provider/loaders/web_sitemap.py +2 -1
  53. pygpt_net/provider/loaders/web_twitter.py +4 -2
  54. pygpt_net/provider/loaders/web_yt.py +17 -2
  55. pygpt_net/provider/vector_stores/ctx_attachment.py +1 -1
  56. pygpt_net/tools/indexer/__init__.py +8 -40
  57. pygpt_net/tools/indexer/ui/web.py +20 -78
  58. pygpt_net/ui/layout/ctx/ctx_list.py +86 -18
  59. pygpt_net/ui/widget/dialog/url.py +151 -14
  60. pygpt_net/ui/widget/element/group.py +15 -2
  61. pygpt_net/ui/widget/lists/context.py +23 -9
  62. pygpt_net/utils.py +1 -1
  63. {pygpt_net-2.4.42.dist-info → pygpt_net-2.4.44.dist-info}/METADATA +18 -3
  64. {pygpt_net-2.4.42.dist-info → pygpt_net-2.4.44.dist-info}/RECORD +67 -64
  65. {pygpt_net-2.4.42.dist-info → pygpt_net-2.4.44.dist-info}/LICENSE +0 -0
  66. {pygpt_net-2.4.42.dist-info → pygpt_net-2.4.44.dist-info}/WHEEL +0 -0
  67. {pygpt_net-2.4.42.dist-info → pygpt_net-2.4.44.dist-info}/entry_points.txt +0 -0
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "__meta__": {
3
- "version": "2.4.42",
4
- "app.version": "2.4.42",
5
- "updated_at": "2024-12-15T00:00:00"
3
+ "version": "2.4.44",
4
+ "app.version": "2.4.44",
5
+ "updated_at": "2024-12-16T00:00:00"
6
6
  },
7
7
  "items": {
8
8
  "chat": {
@@ -1078,7 +1078,7 @@
1078
1078
  },
1079
1079
  "label": "settings.llama.idx.storage.args",
1080
1080
  "description": "settings.llama.idx.storage.args.desc",
1081
- "urls": "https://pygpt.readthedocs.io/en/latest/modes.html#chat-with-files-llama-index",
1081
+ "urls": "https://pygpt.readthedocs.io/en/latest/configuration.html#vector-stores",
1082
1082
  "value": [],
1083
1083
  "advanced": false,
1084
1084
  "tab": "store"
@@ -1261,7 +1261,7 @@
1261
1261
  "use": "var_types"
1262
1262
  }
1263
1263
  },
1264
- "urls": "https://pygpt.readthedocs.io/en/latest/modes.html#chat-with-files-llama-index",
1264
+ "urls": "https://pygpt.readthedocs.io/en/latest/configuration.html#data-loaders",
1265
1265
  "slider": false,
1266
1266
  "label": "settings.llama.hub.loaders.args",
1267
1267
  "description": "settings.llama.hub.loaders.args.desc",
@@ -1395,7 +1395,7 @@
1395
1395
  "multiplier": null,
1396
1396
  "step": null,
1397
1397
  "advanced": false,
1398
- "tab": "legacy"
1398
+ "tab": "autonomous"
1399
1399
  },
1400
1400
  "experts.mode": {
1401
1401
  "section": "agent",
@@ -1410,7 +1410,7 @@
1410
1410
  "multiplier": null,
1411
1411
  "step": null,
1412
1412
  "advanced": false,
1413
- "tab": "legacy"
1413
+ "tab": "experts"
1414
1414
  },
1415
1415
  "agent.idx": {
1416
1416
  "section": "agent",
@@ -1425,7 +1425,7 @@
1425
1425
  "multiplier": null,
1426
1426
  "step": null,
1427
1427
  "advanced": false,
1428
- "tab": "legacy"
1428
+ "tab": "autonomous"
1429
1429
  },
1430
1430
  "llama.idx.chat.mode": {
1431
1431
  "section": "llama-index",
@@ -346,7 +346,7 @@ dialog.start.title = API-KEY ist noch nicht konfiguriert
346
346
  dialog.start.title.text = Ihr API-Schlüssel ist noch nicht konfiguriert...\nSie erhalten einen API-Schlüssel, indem Sie ein Konto auf der OpenAI-Website registrieren:
347
347
  dialog.url.dismiss = Abbrechen
348
348
  dialog.url.tip = Geben Sie die URL der Webseite an, die Sie als zusätzlichen Kontext anfügen möchten, z.B. https://de.wikipedia.org/wiki/Elon_Musk, oder ein YouTube-Video zur Transkription, z.B. https://www.youtube.com/watch?v=CRRlbK5w8AE.
349
- dialog.url.title = URL
349
+ dialog.url.title = Web
350
350
  dialog.url.update = Hinzufügen
351
351
  dialog.workdir.change.confirm = Sind Sie sicher, dass Sie das Arbeitsverzeichnis zu folgendem ändern/verschieben möchten:\n{path}?
352
352
  dialog.workdir.change.empty.alert = Verzeichnis ist nicht leer! Vorgang wird abgebrochen.
@@ -750,7 +750,7 @@ settings.agent.llama.steps = Maximale Schritte (pro Iteration)
750
750
  settings.agent.llama.steps.desc = Maximale Schritte in einer Iteration, bevor das Ziel erreicht wird
751
751
  settings.agent.llama.verbose = Ausführlich (Protokollausgabe in die Konsole)
752
752
  settings.agent.mode = Interner Modus für Agenten
753
- settings.agent.mode.desc = Interner Modus für die Verwendung im Agentenmodus (Chat, Vervollständigung, Langchain, Llama_Index usw.)
753
+ settings.agent.mode.desc = Interner Modus für die Verwendung im Agentenmodus
754
754
  settings.api_endpoint = API-Endpunkt
755
755
  settings.api_endpoint.desc = OpenAI API-Endpunkt-URL (oder kompatibel), standardmäßig: https://api.openai.com/v1
756
756
  settings.api_key = OpenAI API-KEY
@@ -793,7 +793,7 @@ settings.dict.delete.confirm = Eintrag aus der Liste entfernen?
793
793
  settings.download.dir = Verzeichnis für Dateidownloads
794
794
  settings.download.dir.desc = Unterordner für heruntergeladene Dateien, z.B. im Assistentenmodus, innerhalb von "data"
795
795
  settings.experts.mode = Untermodus für Experten
796
- settings.experts.mode.desc = Untermodus, der für Experten verwendet wird (Chat, Vervollständigung, Langkette, Llama_Index, usw.)
796
+ settings.experts.mode.desc = Untermodus, der für Experten verwendet wird
797
797
  settings.font_size = Schriftgröße (Chat-Text, Notizblöcke)
798
798
  settings.font_size.ctx = Schriftgröße (Kontextliste)
799
799
  settings.font_size.input = Schriftgröße (Eingabe)
@@ -110,7 +110,7 @@ assistant.tool.retrieval = Retrieval
110
110
  assistant.vector_store = Vector Store
111
111
  attachments.auto_index = Auto-index on upload
112
112
  attachments.btn.add = Add file
113
- attachments.btn.add_url = URL
113
+ attachments.btn.add_url = Web
114
114
  attachments.btn.clear = Clear
115
115
  attachments.capture_clear = Clear on capture
116
116
  attachments.clear.confirm = Clear list?
@@ -120,6 +120,7 @@ attachments.ctx.mode.full = Full context
120
120
  attachments.ctx.mode.off = Off (disable)
121
121
  attachments.ctx.mode.query = RAG
122
122
  attachments.ctx.mode.summary = Summary
123
+ attachments.ctx.tooltip.list = {num} attachments
123
124
  attachments.delete.confirm = Remove file from list?
124
125
  attachments.header.ctx = Ctx
125
126
  attachments.header.idx = Idx
@@ -377,7 +378,7 @@ dialog.start.title = Api Key is not configured yet
377
378
  dialog.start.title.text = Your API key is not configured yet...\nYou will obtain an API key by registering an account on the OpenAI website:
378
379
  dialog.url.dismiss = Cancel
379
380
  dialog.url.tip = Provide the URL of the web page you want to attach as additional context, e.g., https://pl.wikipedia.org/wiki/Elon_Musk, or a YouTube video to transcribe, e.g., https://www.youtube.com/watch?v=CRRlbK5w8AE.
380
- dialog.url.title = URL
381
+ dialog.url.title = Web
381
382
  dialog.url.update = Add
382
383
  dialog.workdir.change.confirm = Are you sure you want to change/move workdir to:\n{path}?
383
384
  dialog.workdir.change.empty.alert = Directory is not empty! Aborting.
@@ -768,7 +769,7 @@ mode.agent = Agent (Autonomous)
768
769
  mode.agent_llama = Agent (LlamaIndex)
769
770
  mode.agent_llama.tooltip = Advanced agents (LlamaIndex)
770
771
  mode.agent.tooltip = Simple agents (legacy)
771
- mode.assistant = Assistant
772
+ mode.assistant = Assistants
772
773
  mode.assistant.tooltip = Chat using Assistants API
773
774
  mode.audio = Chat with Audio
774
775
  mode.chat = Chat
@@ -907,7 +908,7 @@ settings.access.voice_control.model.desc = Model to use for command recognition
907
908
  settings.advanced.collapse = Show/hide advanced options
908
909
  settings.agent.goal.notify = Display a tray notification when the goal is achieved.
909
910
  settings.agent.idx = Index to use
910
- settings.agent.idx.desc = Only if sub-mode is llama_index (Chat with Files), choose the index to use in Agent and Expert modes
911
+ settings.agent.idx.desc = Only if sub-mode is Chat with Files, choose the index to use in Autonomous and Experts modes
911
912
  settings.agent.llama.append_eval = Append and compare previous evaluation prompt in next evaluation
912
913
  settings.agent.llama.append_eval.desc = If enabled, previous improvement prompt will be checked in next eval in loop
913
914
  settings.agent.llama.iterations = Max run iterations
@@ -918,7 +919,7 @@ settings.agent.llama.steps = Max steps (per iteration)
918
919
  settings.agent.llama.steps.desc = Max steps in one iteration before goal achieved
919
920
  settings.agent.llama.verbose = Verbose (log output to console)
920
921
  settings.agent.mode = Sub-mode for agents
921
- settings.agent.mode.desc = Sub-mode to use in Agent mode (chat, completion, langchain, llama_index, etc.)
922
+ settings.agent.mode.desc = Sub-mode to use in Agent (Autonomous) mode
922
923
  settings.api_endpoint = API Endpoint
923
924
  settings.api_endpoint.desc = OpenAI API (or compatible) endpoint URL, default: https://api.openai.com/v1
924
925
  settings.api_key = OpenAI API KEY
@@ -983,7 +984,7 @@ settings.dict.delete.confirm = Remove item from list?
983
984
  settings.download.dir = Directory for file downloads
984
985
  settings.download.dir.desc = Subdirectory for downloaded files, e.g. in Assistants mode, inside "data"
985
986
  settings.experts.mode = Sub-mode for experts
986
- settings.experts.mode.desc = Sub-mode to use for Experts (chat, completion, langchain, llama_index, etc.)
987
+ settings.experts.mode.desc = Sub-mode to use for Experts
987
988
  settings.font_size = Font size (chat plain-text, notepads)
988
989
  settings.font_size.ctx = Font size (ctx list)
989
990
  settings.font_size.input = Font size (input)
@@ -1090,8 +1091,9 @@ settings.render.web.only.desc = WebEngine / Chromium rendering engine only
1090
1091
  settings.restart.required = Restart of the application is required for this option to take effect.
1091
1092
  settings.section.access = Accessibility
1092
1093
  settings.section.agent = Agents and experts
1093
- settings.section.agent.legacy = Legacy
1094
- settings.section.agent.llama = LlamaIndex Agents
1094
+ settings.section.agent.autonomous = Autonomous
1095
+ settings.section.agent.experts = Experts
1096
+ settings.section.agent.llama = Agents
1095
1097
  settings.section.audio = Audio
1096
1098
  settings.section.ctx = Context
1097
1099
  settings.section.developer = Developer
@@ -1246,7 +1248,7 @@ tool.indexer.tab.files.tip = Select file(s) or directory to embed files into the
1246
1248
  tool.indexer.tab.web = Web
1247
1249
  tool.indexer.tab.web.cfg = Configuration (global settings) - Settings -> LlamaIndex -> Data loaders
1248
1250
  tool.indexer.tab.web.help = Help
1249
- tool.indexer.tab.web.loader = Loader
1251
+ tool.indexer.tab.web.loader = Data type
1250
1252
  tool.indexer.tab.web.source = Data source
1251
1253
  tool.indexer.tab.web.tip = Select a data loader and define the loader parameters to embed external data from the web.
1252
1254
  tool.indexer.title = Indexer
@@ -346,7 +346,7 @@ dialog.start.title = La API KEY aún no está configurada
346
346
  dialog.start.title.text = Su clave de API aún no está configurada...\nObtendrá una clave de API registrando una cuenta en el sitio web de OpenAI:
347
347
  dialog.url.dismiss = Cancelar
348
348
  dialog.url.tip = Proporcione la URL de la página web que desea adjuntar como contexto adicional, por ejemplo, https://es.wikipedia.org/wiki/Elon_Musk, o un video de YouTube para transcribir, por ejemplo, https://www.youtube.com/watch?v=CRRlbK5w8AE.
349
- dialog.url.title = URL
349
+ dialog.url.title = Web
350
350
  dialog.url.update = Agregar
351
351
  dialog.workdir.change.confirm = ¿Está seguro de querer cambiar/mover el directorio de trabajo a:\n{path}?
352
352
  dialog.workdir.change.empty.alert = ¡El directorio no está vacío! Cancelando la operación.
@@ -749,7 +749,7 @@ settings.agent.llama.steps = Pasos máximos (por iteración)
749
749
  settings.agent.llama.steps.desc = Pasos máximos en una iteración antes de que se logre el objetivo
750
750
  settings.agent.llama.verbose = Verboso (salida de registro a la consola)
751
751
  settings.agent.mode = Modo interno para agentes
752
- settings.agent.mode.desc = Modo interno para usar en modo Agente (chat, completado, langchain, llama_index, etc.)
752
+ settings.agent.mode.desc = Modo interno para usar en modo Agente
753
753
  settings.api_endpoint = Punto final de la API
754
754
  settings.api_endpoint.desc = URL del punto final de la API de OpenAI (o compatible), por defecto: https://api.openai.com/v1
755
755
  settings.api_key = Clave API de OpenAI
@@ -792,7 +792,7 @@ settings.dict.delete.confirm = ¿Eliminar elemento de la lista?
792
792
  settings.download.dir = Directorio para descargas de archivos
793
793
  settings.download.dir.desc = Subdirectorio para archivos descargados, por ejemplo, en modo Asistentes, dentro de "data"
794
794
  settings.experts.mode = Submodo para expertos
795
- settings.experts.mode.desc = Submodo a utilizar para Expertos (chat, completado, langchain, índice de llama, etc.)
795
+ settings.experts.mode.desc = Submodo a utilizar para Expertos
796
796
  settings.font_size = Tamaño de fuente (texto plano de chat, bloc de notas)
797
797
  settings.font_size.ctx = Tamaño de fuente (lista ctx)
798
798
  settings.font_size.input = Tamaño de fuente (entrada)
@@ -346,7 +346,7 @@ dialog.start.title = La CLÉ API n’est pas encore configurée
346
346
  dialog.start.title.text = Votre clé API n'est pas encore configurée...\nVous obtiendrez une clé API en vous inscrivant sur le site web d'OpenAI :
347
347
  dialog.url.dismiss = Annuler
348
348
  dialog.url.tip = Fournissez l'URL de la page Web que vous souhaitez joindre comme contexte supplémentaire, par exemple, https://fr.wikipedia.org/wiki/Elon_Musk, ou une vidéo YouTube à transcrire, par exemple, https://www.youtube.com/watch?v=CRRlbK5w8AE.
349
- dialog.url.title = URL
349
+ dialog.url.title = Web
350
350
  dialog.url.update = Ajouter
351
351
  dialog.workdir.change.confirm = Êtes-vous sûr de vouloir changer/déplacer le répertoire de travail vers :\n{path}?
352
352
  dialog.workdir.change.empty.alert = Le répertoire n'est pas vide ! Opération annulée.
@@ -749,7 +749,7 @@ settings.agent.llama.steps = Étapes maximales (par itération)
749
749
  settings.agent.llama.steps.desc = Étapes maximales dans une itération avant que l'objectif ne soit atteint
750
750
  settings.agent.llama.verbose = Verbeux (sortie du journal vers la console)
751
751
  settings.agent.mode = Mode interne pour les agents
752
- settings.agent.mode.desc = Mode interne à utiliser en mode Agent (chat, complétion, langchain, llama_index, etc.)
752
+ settings.agent.mode.desc = Mode interne à utiliser en mode Agent
753
753
  settings.api_endpoint = Point de terminaison API
754
754
  settings.api_endpoint.desc = URL du point de terminaison de l'API OpenAI (ou compatible), par défaut : https://api.openai.com/v1
755
755
  settings.api_key = Clé API OpenAI
@@ -792,7 +792,7 @@ settings.dict.delete.confirm = Supprimer l'élément de la liste ?
792
792
  settings.download.dir = Répertoire pour les téléchargements de fichiers
793
793
  settings.download.dir.desc = Sous-répertoire pour les fichiers téléchargés, par exemple en mode Assistants, à l'intérieur de "data"
794
794
  settings.experts.mode = Sous-mode pour les experts
795
- settings.experts.mode.desc = Sous-mode utilisé pour les Experts (chat, complétion, langchain, llama_index, etc.)
795
+ settings.experts.mode.desc = Sous-mode utilisé pour les Experts
796
796
  settings.font_size = Taille de police (texte brut de chat, blocs-notes)
797
797
  settings.font_size.ctx = Taille de police (liste ctx)
798
798
  settings.font_size.input = Taille de police (entrée)
@@ -346,7 +346,7 @@ dialog.start.title = API KEY non ancora configurata
346
346
  dialog.start.title.text = La tua API key non è ancora configurata...\nOtterrai una API key registrando un account sul sito web di OpenAI:
347
347
  dialog.url.dismiss = Annulla
348
348
  dialog.url.tip = Fornisci l'URL della pagina web che desideri allegare come contesto aggiuntivo, ad esempio, https://it.wikipedia.org/wiki/Elon_Musk, o un video YouTube da trascrivere, ad esempio, https://www.youtube.com/watch?v=CRRlbK5w8AE.
349
- dialog.url.title = URL
349
+ dialog.url.title = Web
350
350
  dialog.url.update = Aggiungi
351
351
  dialog.workdir.change.confirm = Sei sicuro di voler cambiare/spostare la workdir a:\n{path}?
352
352
  dialog.workdir.change.empty.alert = La cartella non è vuota! Annullamento dell'operazione.
@@ -750,7 +750,7 @@ settings.agent.llama.steps = Passi massimi (per iterazione)
750
750
  settings.agent.llama.steps.desc = Passi massimi in un'iterazione prima che l'obiettivo sia raggiunto
751
751
  settings.agent.llama.verbose = Verboso (output del log sulla console)
752
752
  settings.agent.mode = Modalità interna per agenti
753
- settings.agent.mode.desc = Modalità interna da utilizzare in modalità Agente (chat, completamento, langchain, llama_index, ecc.)
753
+ settings.agent.mode.desc = Modalità interna da utilizzare in modalità Agente
754
754
  settings.api_endpoint = Endpoint API
755
755
  settings.api_endpoint.desc = URL del punto di terminazione API OpenAI (o compatibile), di default: https://api.openai.com/v1
756
756
  settings.api_key = OpenAI API KEY
@@ -793,7 +793,7 @@ settings.dict.delete.confirm = Rimuovere l'elemento dall'elenco?
793
793
  settings.download.dir = Directory per il download dei file
794
794
  settings.download.dir.desc = Sottodirectory per i file scaricati, ad esempio in modalità Assistenti, all'interno di "data"
795
795
  settings.experts.mode = Sottomodalità per esperti
796
- settings.experts.mode.desc = Sottomodalità da utilizzare per gli Esperti (chat, completamento, langchain, indice di llama, ecc.)
796
+ settings.experts.mode.desc = Sottomodalità da utilizzare per gli Esperti
797
797
  settings.font_size = Dimensione del carattere (testo semplice della chat, blocchi appunti)
798
798
  settings.font_size.ctx = Dimensione del carattere (lista dei contesti)
799
799
  settings.font_size.input = Dimensione del carattere (input)
@@ -346,7 +346,7 @@ dialog.start.title = Klucz API nie jest zdefiniowany
346
346
  dialog.start.title.text = Nie skonfigurowałeś jeszcze klucza API...\nKlucz API uzyskasz rejestrując konto na stronie internetowej OpenAI:
347
347
  dialog.url.dismiss = Anuluj
348
348
  dialog.url.tip = Podaj URL strony internetowej, którą chcesz dołączyć jako dodatkowy kontekst, np. https://pl.wikipedia.org/wiki/Elon_Musk, lub film na YouTube do transkrypcji, np. https://www.youtube.com/watch?v=CRRlbK5w8AE.
349
- dialog.url.title = URL
349
+ dialog.url.title = Web
350
350
  dialog.url.update = Dodaj
351
351
  dialog.workdir.change.confirm = Czy jesteś pewny, że chcesz zmienić/przenieść katalog roboczy do:\n{path}?
352
352
  dialog.workdir.change.empty.alert = Katalog nie jest pusty! Anulowanie.
@@ -750,7 +750,7 @@ settings.agent.llama.steps = Maksymalna liczba kroków (na iterację)
750
750
  settings.agent.llama.steps.desc = Maksymalna liczba kroków w jednej iteracji przed osiągnięciem celu
751
751
  settings.agent.llama.verbose = Szczegółowy (logowanie do konsoli)
752
752
  settings.agent.mode = Tryb wewnętrzny dla agentów
753
- settings.agent.mode.desc = Tryb wewnętrzny do użycia w trybie Agenta (chat, completion, langchain, llama_index itp.)
753
+ settings.agent.mode.desc = Tryb wewnętrzny do użycia w trybie Agenta
754
754
  settings.api_endpoint = Punkt końcowy API
755
755
  settings.api_endpoint.desc = Adres URL punktu końcowego API OpenAI (lub kompatybilnego), domyślnie: https://api.openai.com/v1
756
756
  settings.api_key = Klucz API OpenAI
@@ -793,7 +793,7 @@ settings.dict.delete.confirm = Usunąć pozycję z listy?
793
793
  settings.download.dir = Katalog na pliki do pobrania
794
794
  settings.download.dir.desc = Podkatalog na pobrane pliki, np. w trybie Asystentów, wewnątrz "data"
795
795
  settings.experts.mode = Podtryb dla ekspertów
796
- settings.experts.mode.desc = Podtryb używany dla Ekspertów (czat, uzupełnianie, langchain, llama_index, itp.)
796
+ settings.experts.mode.desc = Podtryb używany dla Ekspertów
797
797
  settings.font_size = Rozmiar czcionki (czat plain-text, notatniki)
798
798
  settings.font_size.ctx = Rozmiar czcionki (lista rozmów)
799
799
  settings.font_size.input = Rozmiar czcionki (wejście)
@@ -346,7 +346,7 @@ dialog.start.title = API КЛЮЧ ще не налаштований
346
346
  dialog.start.title.text = Ваш API ключ ще не налаштований...\nВи отримаєте API ключ, зареєструвавшись на сайті OpenAI:
347
347
  dialog.url.dismiss = Скасувати
348
348
  dialog.url.tip = Вкажіть URL веб-сторінки, яку ви хочете прикріпити як додатковий контекст, наприклад, https://uk.wikipedia.org/wiki/Ілон_Маск, або відео на YouTube для транскрипції, наприклад, https://www.youtube.com/watch?v=CRRlbK5w8AE.
349
- dialog.url.title = URL
349
+ dialog.url.title = Web
350
350
  dialog.url.update = Додати
351
351
  dialog.workdir.change.confirm = Ви впевнені, що хочете змінити/перемістити робочий каталог до:\n{path}?
352
352
  dialog.workdir.change.empty.alert = Каталог не порожній! Операцію скасовано.
@@ -749,7 +749,7 @@ settings.agent.llama.steps = Максимальна кількість крок
749
749
  settings.agent.llama.steps.desc = Максимальна кількість кроків в одній ітерації перед досягненням мети
750
750
  settings.agent.llama.verbose = Докладно (вивід журналу в консоль)
751
751
  settings.agent.mode = Внутрішній режим для агентів
752
- settings.agent.mode.desc = Внутрішній режим для використання в режимі Агента (чат, завершення, langchain, llama_index тощо)
752
+ settings.agent.mode.desc = Внутрішній режим для використання в режимі Агента
753
753
  settings.api_endpoint = Кінцева точка API
754
754
  settings.api_endpoint.desc = URL кінцевої точки API OpenAI (або сумісного), за замовчуванням: https://api.openai.com/v1
755
755
  settings.api_key = OpenAI API КЛЮЧ
@@ -792,7 +792,7 @@ settings.dict.delete.confirm = Видалити елемент зі списку
792
792
  settings.download.dir = Директорія для завантаження файлів
793
793
  settings.download.dir.desc = Піддиректорія для завантажених файлів, наприклад, у режимі помічників, всередині "data"
794
794
  settings.experts.mode = Підпрограма для експертів
795
- settings.experts.mode.desc = Підпрограма для використання експертами (чат, завершення, langchain, llama_index тощо)
795
+ settings.experts.mode.desc = Підпрограма для використання експертами
796
796
  settings.font_size = Розмір шрифту (звичайний текст чату, блокноти)
797
797
  settings.font_size.ctx = Розмір шрифту (список ctx)
798
798
  settings.font_size.input = Розмір шрифту (введення)
@@ -356,7 +356,7 @@ dialog.start.title = API KEY尚未配置
356
356
  dialog.start.title.text = 您的API密鑰尚未配置...\n您將通過在OpenAI網站上註冊賬戶獲得API密鑰:
357
357
  dialog.url.dismiss = 取消
358
358
  dialog.url.tip = 提供您要附加为附加上下文的网页 URL,例如,https://zh.wikipedia.org/wiki/Elon_Musk,或一个要转录的 YouTube 视频,例如,https://www.youtube.com/watch?v=CRRlbK5w8AE。
359
- dialog.url.title = URL
359
+ dialog.url.title = Web
360
360
  dialog.url.update = 添加
361
361
  dialog.workdir.change.confirm = 您确定要更改/移动工作目录到:\n{path}吗?
362
362
  dialog.workdir.change.empty.alert = 目录不为空!操作取消。
@@ -851,7 +851,7 @@ settings.agent.llama.steps = 最大步骤数(每次迭代)
851
851
  settings.agent.llama.steps.desc = 在达到目标前每次迭代的最大步骤数
852
852
  settings.agent.llama.verbose = 详细(日志输出到控制台)
853
853
  settings.agent.mode = 代理的内部模式
854
- settings.agent.mode.desc = 在代理模式下使用的子模式(聊天、完成、langchain、llama_index等)
854
+ settings.agent.mode.desc = 在代理模式下使用的子模式
855
855
  settings.api_endpoint = API端点
856
856
  settings.api_endpoint.desc = OpenAI API(或兼容)终端URL,默认为:https://api.openai.com/v1
857
857
  settings.api_key = OpenAI API KEY
@@ -895,7 +895,7 @@ settings.dict.delete.confirm= 從列表中移除項目?
895
895
  settings.download.dir= 文件下載目錄
896
896
  settings.download.dir.desc= 下載文件的子目錄,例如在助手模式下,在"data"內部
897
897
  settings.experts.mode = 专家子模式
898
- settings.experts.mode.desc = 用于专家的子模式(聊天、完成、语言链、llama_index等)
898
+ settings.experts.mode.desc = 用于专家的子模式
899
899
  settings.font_size = 字号(聊天纯文本,记事本)
900
900
  settings.font_size.ctx= 上下文列表字體大小
901
901
  settings.font_size.input= 輸入字體大小
@@ -1,11 +1,11 @@
1
1
  [LOCALE]
2
- cmd.send_mail.label = Enable: send email
3
- cmd.send_mail.description = Allows for sending emails.
4
- cmd.receive_emails.label = Enable: receive emails
5
- cmd.receive_emails.description = Allows for receiving emails.
2
+ cmd.send_email.label = Enable: send email
3
+ cmd.send_email.description = Allows for sending emails.
4
+ cmd.get_emails.label = Enable: receive emails
5
+ cmd.get_emails.description = Allows for receiving emails.
6
6
  cmd.get_email_body.label = Enable: get email body
7
7
  cmd.get_email_body.description = Allows for receive email body.
8
- plugin.description = Provides the ability to send, receive and read emails.
8
+ plugin.description = Provides the ability to send, receive and read emails from SMTP server.
9
9
  plugin.name = Mailer
10
10
  smtp_host.description = SMTP Host, e.g. smtp.domain.com
11
11
  smtp_host.label = Host
@@ -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 02:00:00 #
9
+ # Updated Date: 2024.12.16 01:00:00 #
10
10
  # ================================================== #
11
11
 
12
12
  import json
@@ -33,6 +33,7 @@ class AttachmentItem:
33
33
  self.size = 0
34
34
  self.send = False
35
35
  self.type = self.TYPE_FILE
36
+ self.extra = {}
36
37
 
37
38
  def serialize(self) -> dict:
38
39
  """
@@ -50,6 +51,7 @@ class AttachmentItem:
50
51
  'ctx': self.ctx,
51
52
  'vector_store_ids': self.vector_store_ids,
52
53
  'type': self.type,
54
+ 'extra': self.extra,
53
55
  'meta_id': self.meta_id,
54
56
  'send': self.send
55
57
  }
@@ -78,6 +80,8 @@ class AttachmentItem:
78
80
  self.vector_store_ids = data['vector_store_ids']
79
81
  if 'type' in data:
80
82
  self.type = data['type']
83
+ if 'extra' in data:
84
+ self.extra = data['extra']
81
85
  if 'meta_id' in data:
82
86
  self.meta_id = data['meta_id']
83
87
  if 'send' in data:
pygpt_net/item/ctx.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.12.14 18:00:00 #
9
+ # Updated Date: 2024.12.16 01:00:00 #
10
10
  # ================================================== #
11
11
 
12
12
  import copy
@@ -362,18 +362,76 @@ class CtxMeta:
362
362
  self.label = 0 # label color
363
363
  self.indexes = {} # indexes data
364
364
  self.additional_ctx = [] # additional context data
365
+ self.group = None # parent group
365
366
  self.group_id = None
366
367
  self.root_id = None
367
368
  self.parent_id = None
368
369
  self.owner_uuid = None
369
370
 
371
+ def has_additional_ctx(self) -> bool:
372
+ """
373
+ Check if additional context data is attached
374
+
375
+ :return: True if additional context data is present
376
+ """
377
+ if self.additional_ctx is not None and len(self.additional_ctx) > 0:
378
+ return True
379
+ if self.group:
380
+ if self.group.additional_ctx is not None and len(self.group.additional_ctx) > 0:
381
+ return True
382
+ return False
383
+
384
+ def get_additional_ctx(self) -> list:
385
+ """
386
+ Get additional context data
387
+
388
+ :return: list
389
+ """
390
+ if self.group:
391
+ if self.group.additional_ctx:
392
+ return self.group.additional_ctx
393
+ if self.additional_ctx:
394
+ return self.additional_ctx
395
+ return []
396
+
397
+ def reset_additional_ctx(self):
398
+ """Delete additional context data"""
399
+ if self.group:
400
+ self.group.additional_ctx = []
401
+ else:
402
+ self.additional_ctx = []
403
+
404
+ def remove_additional_ctx(self, item: dict):
405
+ """
406
+ Remove additional context data item
407
+
408
+ :param item: dict
409
+ """
410
+ if self.group:
411
+ if item in self.group.additional_ctx:
412
+ self.group.additional_ctx.remove(item)
413
+ else:
414
+ if item in self.additional_ctx:
415
+ self.additional_ctx.remove(item)
416
+
417
+ def get_attachment_names(self) -> list:
418
+ """
419
+ Get attachment names
420
+
421
+ :return: list
422
+ """
423
+ if self.group:
424
+ if self.group.additional_ctx:
425
+ return self.group.get_attachment_names()
426
+ return [item['name'] for item in self.additional_ctx]
427
+
370
428
  def to_dict(self) -> dict:
371
429
  """
372
430
  Dump context meta to dict
373
431
 
374
432
  :return: dict
375
433
  """
376
- return {
434
+ data = {
377
435
  "id": self.id,
378
436
  "external_id": self.external_id,
379
437
  "uuid": self.uuid,
@@ -404,6 +462,9 @@ class CtxMeta:
404
462
  "parent_id": self.parent_id,
405
463
  "owner_uuid": self.owner_uuid,
406
464
  }
465
+ if self.group:
466
+ data["__group__"] = self.group.to_dict()
467
+ return data
407
468
 
408
469
  def from_dict(self, data: dict):
409
470
  """
@@ -458,8 +519,43 @@ class CtxGroup:
458
519
  self.items = []
459
520
  self.created = int(time.time())
460
521
  self.updated = int(time.time())
522
+ self.additional_ctx = []
461
523
  self.count = 0
462
524
 
525
+ def has_additional_ctx(self) -> bool:
526
+ """
527
+ Check if additional context data is attached
528
+
529
+ :return: True if additional context data is present
530
+ """
531
+ if self.additional_ctx is not None and len(self.additional_ctx) > 0:
532
+ return True
533
+ return False
534
+
535
+ def get_additional_ctx(self) -> list:
536
+ """
537
+ Get additional context data
538
+
539
+ :return: list
540
+ """
541
+ return self.additional_ctx
542
+
543
+ def get_attachments_count(self) -> int:
544
+ """
545
+ Get attachments count
546
+
547
+ :return: int
548
+ """
549
+ return len(self.additional_ctx)
550
+
551
+ def get_attachment_names(self) -> list:
552
+ """
553
+ Get attachment names
554
+
555
+ :return: list
556
+ """
557
+ return [item['name'] for item in self.additional_ctx]
558
+
463
559
  def to_dict(self) -> dict:
464
560
  """
465
561
  Dump context group to dict
@@ -471,6 +567,7 @@ class CtxGroup:
471
567
  "uuid": self.uuid,
472
568
  "name": self.name,
473
569
  "items": self.items,
570
+ "additional_ctx": self.additional_ctx,
474
571
  "created": self.created,
475
572
  "updated": self.updated,
476
573
  "count": self.count,
@@ -0,0 +1,25 @@
1
+ #!/usr/bin/env python3
2
+ # -*- coding: utf-8 -*-
3
+ # ================================================== #
4
+ # This file is a part of PYGPT package #
5
+ # Website: https://pygpt.net #
6
+ # GitHub: https://github.com/szczyglis-dev/py-gpt #
7
+ # MIT License #
8
+ # Created By : Marcin Szczygliński #
9
+ # Updated Date: 2024.11.23 00:00:00 #
10
+ # ================================================== #
11
+
12
+ from sqlalchemy import text
13
+
14
+ from .base import BaseMigration
15
+
16
+
17
+ class Version20241215110000(BaseMigration):
18
+ def __init__(self, window=None):
19
+ super(Version20241215110000, self).__init__(window)
20
+ self.window = window
21
+
22
+ def up(self, conn):
23
+ conn.execute(text("""
24
+ ALTER TABLE ctx_group ADD COLUMN additional_ctx_json TEXT;
25
+ """))
@@ -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.15 11:00:00 #
10
10
  # ================================================== #
11
11
 
12
12
  from .Version20231227152900 import Version20231227152900 # 2.0.59
@@ -22,6 +22,7 @@ from .Version20240426050000 import Version20240426050000 # 2.1.79
22
22
  from .Version20240501030000 import Version20240501030000 # 2.2.7
23
23
  from .Version20241122130000 import Version20241122130000 # 2.4.21
24
24
  from .Version20241126170000 import Version20241126170000 # 2.4.34
25
+ from .Version20241215110000 import Version20241215110000 # 2.4.43
25
26
 
26
27
  class Migrations:
27
28
  def __init__(self):
@@ -48,4 +49,5 @@ class Migrations:
48
49
  Version20240501030000(), # 2.2.7
49
50
  Version20241122130000(), # 2.4.21
50
51
  Version20241126170000(), # 2.4.34
52
+ Version20241215110000(), # 2.4.43
51
53
  ]
@@ -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.20 03:00:00 #
9
+ # Updated Date: 2024.12.16 01:00:00 #
10
10
  # ================================================== #
11
11
 
12
12
  import os
@@ -141,7 +141,8 @@ class Plugin(BasePlugin):
141
141
  """
142
142
  # use_loaders = False
143
143
  if use_loaders:
144
- return str(self.window.core.idx.indexing.read_text_content(path))
144
+ content, docs = str(self.window.core.idx.indexing.read_text_content(path))
145
+ return content
145
146
  else:
146
147
  data = ""
147
148
  if os.path.isfile(path):
@@ -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 22:00:00 #
9
+ # Updated Date: 2024.12.16 01:00:00 #
10
10
  # ================================================== #
11
11
 
12
12
  import json
@@ -145,6 +145,7 @@ class JsonFileProvider(BaseProvider):
145
145
  'send': attachment.send,
146
146
  'vector_store_ids': attachment.vector_store_ids,
147
147
  'type': attachment.type,
148
+ 'extra': attachment.extra,
148
149
  }
149
150
 
150
151
  @staticmethod
@@ -169,6 +170,8 @@ class JsonFileProvider(BaseProvider):
169
170
  attachment.vector_store_ids = data['vector_store_ids']
170
171
  if 'type' in data:
171
172
  attachment.type = data['type']
173
+ if 'extra' in data:
174
+ attachment.extra = data['extra']
172
175
 
173
176
  def dump(self, item: AttachmentItem) -> str:
174
177
  """
@@ -1776,6 +1776,12 @@ class Patch:
1776
1776
  self.window.core.updater.patch_css('web-chatgpt_wide.css', True) # force update
1777
1777
  updated = True
1778
1778
 
1779
+ # < 2.4.44
1780
+ if old < parse_version("2.4.44"):
1781
+ print("Migrating config from < 2.4.44...")
1782
+ data["ctx.records.folders.top"] = True
1783
+ updated = True
1784
+
1779
1785
  # update file
1780
1786
  migrated = False
1781
1787
  if updated: