pygpt-net 2.6.31__py3-none-any.whl → 2.6.32__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.
- pygpt_net/CHANGELOG.txt +7 -0
- pygpt_net/__init__.py +3 -3
- pygpt_net/app.py +3 -1
- pygpt_net/app_core.py +3 -1
- pygpt_net/config.py +3 -1
- pygpt_net/controller/__init__.py +5 -1
- pygpt_net/controller/audio/audio.py +13 -0
- pygpt_net/controller/chat/common.py +18 -83
- pygpt_net/controller/lang/custom.py +2 -2
- pygpt_net/controller/media/__init__.py +12 -0
- pygpt_net/controller/media/media.py +115 -0
- pygpt_net/controller/realtime/realtime.py +27 -2
- pygpt_net/controller/ui/mode.py +16 -2
- pygpt_net/core/audio/backend/pyaudio/realtime.py +51 -14
- pygpt_net/core/audio/output.py +3 -2
- pygpt_net/core/image/image.py +6 -5
- pygpt_net/core/realtime/worker.py +1 -5
- pygpt_net/core/render/web/body.py +24 -3
- pygpt_net/core/text/utils.py +54 -2
- pygpt_net/core/types/image.py +7 -1
- pygpt_net/core/video/__init__.py +12 -0
- pygpt_net/core/video/video.py +290 -0
- pygpt_net/data/config/config.json +19 -4
- pygpt_net/data/config/models.json +75 -3
- pygpt_net/data/config/settings.json +194 -6
- pygpt_net/data/css/web-blocks.css +6 -0
- pygpt_net/data/css/web-chatgpt.css +6 -0
- pygpt_net/data/css/web-chatgpt_wide.css +6 -0
- pygpt_net/data/locale/locale.de.ini +30 -2
- pygpt_net/data/locale/locale.en.ini +40 -7
- pygpt_net/data/locale/locale.es.ini +30 -2
- pygpt_net/data/locale/locale.fr.ini +30 -2
- pygpt_net/data/locale/locale.it.ini +30 -2
- pygpt_net/data/locale/locale.pl.ini +33 -2
- pygpt_net/data/locale/locale.uk.ini +30 -2
- pygpt_net/data/locale/locale.zh.ini +30 -2
- pygpt_net/data/locale/plugin.cmd_web.en.ini +8 -0
- pygpt_net/item/model.py +22 -1
- pygpt_net/provider/api/google/__init__.py +38 -2
- pygpt_net/provider/api/google/video.py +364 -0
- pygpt_net/provider/api/openai/realtime/realtime.py +1 -2
- pygpt_net/provider/core/config/patch.py +226 -178
- pygpt_net/provider/core/model/patch.py +17 -2
- pygpt_net/provider/web/duckduck_search.py +212 -0
- pygpt_net/ui/layout/toolbox/audio.py +55 -0
- pygpt_net/ui/layout/toolbox/footer.py +14 -58
- pygpt_net/ui/layout/toolbox/image.py +3 -14
- pygpt_net/ui/layout/toolbox/raw.py +52 -0
- pygpt_net/ui/layout/toolbox/split.py +48 -0
- pygpt_net/ui/layout/toolbox/toolbox.py +8 -8
- pygpt_net/ui/layout/toolbox/video.py +49 -0
- {pygpt_net-2.6.31.dist-info → pygpt_net-2.6.32.dist-info}/METADATA +23 -11
- {pygpt_net-2.6.31.dist-info → pygpt_net-2.6.32.dist-info}/RECORD +56 -46
- {pygpt_net-2.6.31.dist-info → pygpt_net-2.6.32.dist-info}/LICENSE +0 -0
- {pygpt_net-2.6.31.dist-info → pygpt_net-2.6.32.dist-info}/WHEEL +0 -0
- {pygpt_net-2.6.31.dist-info → pygpt_net-2.6.32.dist-info}/entry_points.txt +0 -0
|
@@ -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: 2025.
|
|
9
|
+
# Updated Date: 2025.09.01 23:00:00 #
|
|
10
10
|
# ================================================== #
|
|
11
11
|
|
|
12
12
|
import copy
|
|
@@ -27,6 +27,8 @@ class Patch:
|
|
|
27
27
|
:return: True if migrated
|
|
28
28
|
"""
|
|
29
29
|
data = self.window.core.config.all()
|
|
30
|
+
cfg_get_base = self.window.core.config.get_base
|
|
31
|
+
patch_css = self.window.core.updater.patch_css
|
|
30
32
|
current = "0.0.0"
|
|
31
33
|
updated = False
|
|
32
34
|
is_old = False
|
|
@@ -196,9 +198,9 @@ class Patch:
|
|
|
196
198
|
if old < parse_version("2.0.25"):
|
|
197
199
|
print("Migrating config from < 2.0.25...")
|
|
198
200
|
if 'cmd.prompt' not in data:
|
|
199
|
-
data['cmd.prompt'] =
|
|
201
|
+
data['cmd.prompt'] = cfg_get_base('cmd.prompt')
|
|
200
202
|
if 'img_prompt' not in data:
|
|
201
|
-
data['img_prompt'] =
|
|
203
|
+
data['img_prompt'] = cfg_get_base('img_prompt')
|
|
202
204
|
if 'vision.capture.quality' not in data:
|
|
203
205
|
data['vision.capture.quality'] = 85
|
|
204
206
|
if 'attachments_capture_clear' not in data:
|
|
@@ -232,7 +234,7 @@ class Patch:
|
|
|
232
234
|
"paragraphs, trying to find the most " \
|
|
233
235
|
"important content that can help answer the " \
|
|
234
236
|
"following question: {query}"
|
|
235
|
-
data['cmd.prompt'] =
|
|
237
|
+
data['cmd.prompt'] = cfg_get_base('cmd.prompt') # fix
|
|
236
238
|
updated = True
|
|
237
239
|
|
|
238
240
|
# < 2.0.30
|
|
@@ -404,7 +406,7 @@ class Patch:
|
|
|
404
406
|
# < 2.0.81
|
|
405
407
|
if old < parse_version("2.0.81"):
|
|
406
408
|
print("Migrating config from < 2.0.81...")
|
|
407
|
-
|
|
409
|
+
patch_css('markdown.light.css', True) # force replace file
|
|
408
410
|
updated = True
|
|
409
411
|
|
|
410
412
|
# < 2.0.85
|
|
@@ -495,7 +497,7 @@ class Patch:
|
|
|
495
497
|
# < 2.0.91
|
|
496
498
|
if old < parse_version("2.0.91"):
|
|
497
499
|
print("Migrating config from < 2.0.91...")
|
|
498
|
-
|
|
500
|
+
patch_css('style.dark.css', True) # force replace file
|
|
499
501
|
updated = True
|
|
500
502
|
|
|
501
503
|
# < 2.0.96
|
|
@@ -509,9 +511,9 @@ class Patch:
|
|
|
509
511
|
if old < parse_version("2.0.98"):
|
|
510
512
|
print("Migrating config from < 2.0.98...")
|
|
511
513
|
data['img_resolution'] = "1792x1024" # char fix
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
514
|
+
patch_css('style.css', True) # force replace file
|
|
515
|
+
patch_css('style.light.css', True) # force replace file
|
|
516
|
+
patch_css('style.dark.css', True) # force replace file
|
|
515
517
|
updated = True
|
|
516
518
|
|
|
517
519
|
# < 2.0.99
|
|
@@ -775,7 +777,7 @@ class Patch:
|
|
|
775
777
|
# < 2.0.152
|
|
776
778
|
if old < parse_version("2.0.152"):
|
|
777
779
|
print("Migrating config from < 2.0.152...")
|
|
778
|
-
data['cmd.prompt'] =
|
|
780
|
+
data['cmd.prompt'] = cfg_get_base('cmd.prompt') # bg run fix
|
|
779
781
|
updated = True
|
|
780
782
|
|
|
781
783
|
# < 2.0.153
|
|
@@ -1116,7 +1118,7 @@ class Patch:
|
|
|
1116
1118
|
# < 2.1.20
|
|
1117
1119
|
if old < parse_version("2.1.20"):
|
|
1118
1120
|
print("Migrating config from < 2.1.20...")
|
|
1119
|
-
data['cmd.prompt'] =
|
|
1121
|
+
data['cmd.prompt'] = cfg_get_base('cmd.prompt') # moved to json schema
|
|
1120
1122
|
updated = True
|
|
1121
1123
|
|
|
1122
1124
|
# < 2.1.22
|
|
@@ -1225,12 +1227,12 @@ class Patch:
|
|
|
1225
1227
|
])
|
|
1226
1228
|
|
|
1227
1229
|
# old keys first
|
|
1228
|
-
data['cmd.prompt'] =
|
|
1229
|
-
data['cmd.prompt.extra'] =
|
|
1230
|
-
data['cmd.prompt.extra.assistants'] =
|
|
1230
|
+
data['cmd.prompt'] = cfg_get_base('prompt.cmd') # new format
|
|
1231
|
+
data['cmd.prompt.extra'] = cfg_get_base('prompt.cmd.extra') # new format
|
|
1232
|
+
data['cmd.prompt.extra.assistants'] = cfg_get_base('prompt.cmd.extra.assistants') # new format
|
|
1231
1233
|
|
|
1232
1234
|
# new keys
|
|
1233
|
-
data['prompt.agent.goal'] =
|
|
1235
|
+
data['prompt.agent.goal'] = cfg_get_base('prompt.agent.goal') # new format
|
|
1234
1236
|
|
|
1235
1237
|
# replace to new keys
|
|
1236
1238
|
self.window.core.config.replace_key(data, "img_prompt", "prompt.img")
|
|
@@ -1309,48 +1311,48 @@ class Patch:
|
|
|
1309
1311
|
# data["render.engine"] = "legacy"
|
|
1310
1312
|
|
|
1311
1313
|
# css upgrade
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1314
|
+
patch_css('web.css', True) # NEW
|
|
1315
|
+
patch_css('web.light.css', True) # NEW
|
|
1316
|
+
patch_css('web.dark.css', True) # NEW
|
|
1315
1317
|
updated = True
|
|
1316
1318
|
|
|
1317
1319
|
# < 2.1.60
|
|
1318
1320
|
if old < parse_version("2.1.60"):
|
|
1319
1321
|
print("Migrating config from < 2.1.60...")
|
|
1320
1322
|
# css upgrade
|
|
1321
|
-
|
|
1323
|
+
patch_css('web.css', True) # force update
|
|
1322
1324
|
updated = True
|
|
1323
1325
|
|
|
1324
1326
|
# < 2.1.61
|
|
1325
1327
|
if old < parse_version("2.1.61"):
|
|
1326
1328
|
print("Migrating config from < 2.1.61...")
|
|
1327
1329
|
# css upgrade
|
|
1328
|
-
|
|
1330
|
+
patch_css('web.css', True) # force update
|
|
1329
1331
|
updated = True
|
|
1330
1332
|
|
|
1331
1333
|
# < 2.1.63
|
|
1332
1334
|
if old < parse_version("2.1.63"):
|
|
1333
1335
|
print("Migrating config from < 2.1.63...")
|
|
1334
1336
|
# css upgrade
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1337
|
+
patch_css('web.css', True) # force update
|
|
1338
|
+
patch_css('web.light.css', True) # force update
|
|
1339
|
+
patch_css('web.dark.css', True) # force update
|
|
1338
1340
|
updated = True
|
|
1339
1341
|
|
|
1340
1342
|
# < 2.1.70
|
|
1341
1343
|
if old < parse_version("2.1.70"):
|
|
1342
1344
|
print("Migrating config from < 2.1.70...")
|
|
1343
1345
|
# css upgrade
|
|
1344
|
-
|
|
1346
|
+
patch_css('web.css', True) # force update
|
|
1345
1347
|
updated = True
|
|
1346
1348
|
|
|
1347
1349
|
# < 2.1.72
|
|
1348
1350
|
if old < parse_version("2.1.72"):
|
|
1349
1351
|
print("Migrating config from < 2.1.72...")
|
|
1350
1352
|
# css upgrade
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1353
|
+
patch_css('web.css', True) # force update
|
|
1354
|
+
patch_css('web.light.css', True) # force update
|
|
1355
|
+
patch_css('web.dark.css', True) # force update
|
|
1354
1356
|
updated = True
|
|
1355
1357
|
|
|
1356
1358
|
# < 2.1.73
|
|
@@ -1367,18 +1369,18 @@ class Patch:
|
|
|
1367
1369
|
if old < parse_version("2.1.74"):
|
|
1368
1370
|
print("Migrating config from < 2.1.74...")
|
|
1369
1371
|
# css upgrade
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1372
|
+
patch_css('web.css', True) # force update
|
|
1373
|
+
patch_css('web.light.css', True) # force update
|
|
1374
|
+
patch_css('web.dark.css', True) # force update
|
|
1373
1375
|
updated = True
|
|
1374
1376
|
|
|
1375
1377
|
# < 2.1.75
|
|
1376
1378
|
if old < parse_version("2.1.75"):
|
|
1377
1379
|
print("Migrating config from < 2.1.75...")
|
|
1378
1380
|
# css upgrade
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1381
|
+
patch_css('web.css', True) # force update
|
|
1382
|
+
patch_css('web.light.css', True) # force update
|
|
1383
|
+
patch_css('web.dark.css', True) # force update
|
|
1382
1384
|
updated = True
|
|
1383
1385
|
|
|
1384
1386
|
# < 2.1.76
|
|
@@ -1387,18 +1389,18 @@ class Patch:
|
|
|
1387
1389
|
if 'render.blocks' not in data:
|
|
1388
1390
|
data["render.blocks"] = True
|
|
1389
1391
|
# css upgrade
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1392
|
+
patch_css('web.css', True) # force update
|
|
1393
|
+
patch_css('web.light.css', True) # force update
|
|
1394
|
+
patch_css('web.dark.css', True) # force update
|
|
1393
1395
|
updated = True
|
|
1394
1396
|
|
|
1395
1397
|
# < 2.1.78
|
|
1396
1398
|
if old < parse_version("2.1.78"):
|
|
1397
1399
|
print("Migrating config from < 2.1.78...")
|
|
1398
1400
|
# css upgrade, scroll bg
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1401
|
+
patch_css('web.css', True) # force update
|
|
1402
|
+
patch_css('web.light.css', True) # force update
|
|
1403
|
+
patch_css('web.dark.css', True) # force update
|
|
1402
1404
|
updated = True
|
|
1403
1405
|
|
|
1404
1406
|
# < 2.1.79
|
|
@@ -1425,11 +1427,11 @@ class Patch:
|
|
|
1425
1427
|
if 'experts.mode' not in data:
|
|
1426
1428
|
data["experts.mode"] = "chat"
|
|
1427
1429
|
# from base
|
|
1428
|
-
data["prompt.agent.instruction"] =
|
|
1429
|
-
data["prompt.agent.continue"] =
|
|
1430
|
-
data["prompt.agent.goal"] =
|
|
1431
|
-
data["prompt.expert"] =
|
|
1432
|
-
data["prompt.img"] =
|
|
1430
|
+
data["prompt.agent.instruction"] = cfg_get_base('prompt.agent.instruction')
|
|
1431
|
+
data["prompt.agent.continue"] = cfg_get_base('prompt.agent.continue')
|
|
1432
|
+
data["prompt.agent.goal"] = cfg_get_base('prompt.agent.goal')
|
|
1433
|
+
data["prompt.expert"] = cfg_get_base('prompt.expert')
|
|
1434
|
+
data["prompt.img"] = cfg_get_base('prompt.img')
|
|
1433
1435
|
updated = True
|
|
1434
1436
|
|
|
1435
1437
|
# < 2.2.8
|
|
@@ -1506,7 +1508,7 @@ class Patch:
|
|
|
1506
1508
|
print("Migrating config from < 2.2.20...")
|
|
1507
1509
|
if 'func_call.native' not in data:
|
|
1508
1510
|
data["func_call.native"] = True
|
|
1509
|
-
|
|
1511
|
+
patch_css('web.css', True) # force update
|
|
1510
1512
|
updated = True
|
|
1511
1513
|
|
|
1512
1514
|
# < 2.2.22
|
|
@@ -1519,7 +1521,7 @@ class Patch:
|
|
|
1519
1521
|
# < 2.2.25
|
|
1520
1522
|
if old < parse_version("2.2.25"):
|
|
1521
1523
|
print("Migrating config from < 2.2.25...")
|
|
1522
|
-
data["prompt.expert"] =
|
|
1524
|
+
data["prompt.expert"] = cfg_get_base('prompt.expert')
|
|
1523
1525
|
updated = True
|
|
1524
1526
|
|
|
1525
1527
|
# < 2.2.26
|
|
@@ -1577,15 +1579,15 @@ class Patch:
|
|
|
1577
1579
|
if old < parse_version("2.4.10"):
|
|
1578
1580
|
print("Migrating config from < 2.4.10...")
|
|
1579
1581
|
if 'prompt.agent.continue.llama' not in data:
|
|
1580
|
-
data["prompt.agent.continue.llama"] =
|
|
1582
|
+
data["prompt.agent.continue.llama"] = cfg_get_base('prompt.agent.continue.llama')
|
|
1581
1583
|
if 'agent.llama.idx' not in data:
|
|
1582
|
-
data["agent.llama.idx"] =
|
|
1584
|
+
data["agent.llama.idx"] = cfg_get_base('agent.llama.idx')
|
|
1583
1585
|
if 'agent.llama.steps' not in data:
|
|
1584
|
-
data["agent.llama.steps"] =
|
|
1586
|
+
data["agent.llama.steps"] = cfg_get_base('agent.llama.steps')
|
|
1585
1587
|
if 'agent.llama.provider' not in data:
|
|
1586
|
-
data["agent.llama.provider"] =
|
|
1588
|
+
data["agent.llama.provider"] = cfg_get_base('agent.llama.provider')
|
|
1587
1589
|
if 'agent.llama.verbose' not in data:
|
|
1588
|
-
data["agent.llama.verbose"] =
|
|
1590
|
+
data["agent.llama.verbose"] = cfg_get_base('agent.llama.verbose')
|
|
1589
1591
|
data["agent.goal.notify"] = False # disable by default
|
|
1590
1592
|
updated = True
|
|
1591
1593
|
|
|
@@ -1618,13 +1620,13 @@ class Patch:
|
|
|
1618
1620
|
if old < parse_version("2.4.14"):
|
|
1619
1621
|
print("Migrating config from < 2.4.14...")
|
|
1620
1622
|
if 'prompt.agent.llama.max_eval' not in data:
|
|
1621
|
-
data["prompt.agent.llama.max_eval"] =
|
|
1623
|
+
data["prompt.agent.llama.max_eval"] = cfg_get_base('prompt.agent.llama.max_eval')
|
|
1622
1624
|
if 'prompt.agent.llama.append_eval' not in data:
|
|
1623
|
-
data["prompt.agent.llama.append_eval"] =
|
|
1625
|
+
data["prompt.agent.llama.append_eval"] = cfg_get_base('prompt.agent.llama.append_eval')
|
|
1624
1626
|
if 'agent.llama.loop.enabled' not in data:
|
|
1625
|
-
data["agent.llama.loop.enabled"] =
|
|
1627
|
+
data["agent.llama.loop.enabled"] = cfg_get_base('agent.llama.loop.enabled')
|
|
1626
1628
|
if 'agent.llama.loop.score' not in data:
|
|
1627
|
-
data["agent.llama.loop.score"] =
|
|
1629
|
+
data["agent.llama.loop.score"] = cfg_get_base('agent.llama.loop.score')
|
|
1628
1630
|
updated = True
|
|
1629
1631
|
|
|
1630
1632
|
# < 2.4.15
|
|
@@ -1665,7 +1667,7 @@ class Patch:
|
|
|
1665
1667
|
if old < parse_version("2.4.19"):
|
|
1666
1668
|
print("Migrating config from < 2.4.19...")
|
|
1667
1669
|
if 'layout.animation.disable' not in data:
|
|
1668
|
-
data["layout.animation.disable"] =
|
|
1670
|
+
data["layout.animation.disable"] = cfg_get_base('layout.animation.disable')
|
|
1669
1671
|
if 'cmd_code_interpreter' in data['plugins'] \
|
|
1670
1672
|
and 'cmd.ipython_execute' in data['plugins']['cmd_code_interpreter']:
|
|
1671
1673
|
# remove
|
|
@@ -1676,19 +1678,19 @@ class Patch:
|
|
|
1676
1678
|
if old < parse_version("2.4.21"):
|
|
1677
1679
|
print("Migrating config from < 2.4.21...")
|
|
1678
1680
|
if 'ctx.attachment.mode' not in data:
|
|
1679
|
-
data["ctx.attachment.mode"] =
|
|
1681
|
+
data["ctx.attachment.mode"] = cfg_get_base('ctx.attachment.mode')
|
|
1680
1682
|
if 'ctx.attachment.summary.model' not in data:
|
|
1681
|
-
data["ctx.attachment.summary.model"] =
|
|
1683
|
+
data["ctx.attachment.summary.model"] = cfg_get_base('ctx.attachment.summary.model')
|
|
1682
1684
|
if 'ctx.attachment.verbose' not in data:
|
|
1683
|
-
data["ctx.attachment.verbose"] =
|
|
1685
|
+
data["ctx.attachment.verbose"] = cfg_get_base('ctx.attachment.verbose')
|
|
1684
1686
|
updated = True
|
|
1685
1687
|
|
|
1686
1688
|
# < 2.4.22
|
|
1687
1689
|
if old < parse_version("2.4.22"):
|
|
1688
1690
|
print("Migrating config from < 2.4.22...")
|
|
1689
|
-
data["ctx.attachment.mode"] =
|
|
1691
|
+
data["ctx.attachment.mode"] = cfg_get_base('ctx.attachment.mode')
|
|
1690
1692
|
if 'ctx.attachment.img' not in data:
|
|
1691
|
-
data["ctx.attachment.img"] =
|
|
1693
|
+
data["ctx.attachment.img"] = cfg_get_base(
|
|
1692
1694
|
'ctx.attachment.img')
|
|
1693
1695
|
updated = True
|
|
1694
1696
|
|
|
@@ -1705,7 +1707,7 @@ class Patch:
|
|
|
1705
1707
|
if old < parse_version("2.4.31"):
|
|
1706
1708
|
print("Migrating config from < 2.4.31...")
|
|
1707
1709
|
if 'attachments_auto_index' not in data:
|
|
1708
|
-
data["attachments_auto_index"] =
|
|
1710
|
+
data["attachments_auto_index"] = cfg_get_base(
|
|
1709
1711
|
'attachments_auto_index')
|
|
1710
1712
|
updated = True
|
|
1711
1713
|
|
|
@@ -1713,7 +1715,7 @@ class Patch:
|
|
|
1713
1715
|
if old < parse_version("2.4.34"):
|
|
1714
1716
|
print("Migrating config from < 2.4.34...")
|
|
1715
1717
|
if 'ctx.attachment.query.model' not in data:
|
|
1716
|
-
data["ctx.attachment.query.model"] =
|
|
1718
|
+
data["ctx.attachment.query.model"] = cfg_get_base(
|
|
1717
1719
|
'ctx.attachment.query.model')
|
|
1718
1720
|
updated = True
|
|
1719
1721
|
|
|
@@ -1727,10 +1729,10 @@ class Patch:
|
|
|
1727
1729
|
if old < parse_version("2.4.37"):
|
|
1728
1730
|
print("Migrating config from < 2.4.37...")
|
|
1729
1731
|
if 'ctx.attachment.rag.history' not in data:
|
|
1730
|
-
data["ctx.attachment.rag.history"] =
|
|
1732
|
+
data["ctx.attachment.rag.history"] = cfg_get_base(
|
|
1731
1733
|
'ctx.attachment.rag.history')
|
|
1732
1734
|
if 'ctx.attachment.rag.history.max_items' not in data:
|
|
1733
|
-
data["ctx.attachment.rag.history.max_items"] =
|
|
1735
|
+
data["ctx.attachment.rag.history.max_items"] = cfg_get_base(
|
|
1734
1736
|
'ctx.attachment.rag.history.max_items')
|
|
1735
1737
|
updated = True
|
|
1736
1738
|
|
|
@@ -1745,7 +1747,7 @@ class Patch:
|
|
|
1745
1747
|
data["audio.input.channels"] = 1
|
|
1746
1748
|
if 'audio.input.rate' not in data:
|
|
1747
1749
|
data["audio.input.rate"] = 44100
|
|
1748
|
-
|
|
1750
|
+
patch_css('style.light.css', True) # force update
|
|
1749
1751
|
updated = True
|
|
1750
1752
|
|
|
1751
1753
|
# < 2.4.39
|
|
@@ -1770,10 +1772,10 @@ class Patch:
|
|
|
1770
1772
|
if 'cmd_web' in data['plugins'] \
|
|
1771
1773
|
and 'cmd.web_url_raw' in data['plugins']['cmd_web']:
|
|
1772
1774
|
del data['plugins']['cmd_web']['cmd.web_url_raw']
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1775
|
+
patch_css('web-blocks.css', True) # force update
|
|
1776
|
+
patch_css('web-blocks.light.css', True) # force update
|
|
1777
|
+
patch_css('web-chatgpt.css', True) # force update
|
|
1778
|
+
patch_css('web-chatgpt_wide.css', True) # force update
|
|
1777
1779
|
updated = True
|
|
1778
1780
|
|
|
1779
1781
|
# < 2.4.44
|
|
@@ -1785,7 +1787,7 @@ class Patch:
|
|
|
1785
1787
|
# < 2.4.45
|
|
1786
1788
|
if old < parse_version("2.4.45"):
|
|
1787
1789
|
print("Migrating config from < 2.4.45...")
|
|
1788
|
-
|
|
1790
|
+
patch_css('style.css', True) # force update
|
|
1789
1791
|
updated = True
|
|
1790
1792
|
|
|
1791
1793
|
# < 2.4.46
|
|
@@ -1841,9 +1843,9 @@ class Patch:
|
|
|
1841
1843
|
# < 2.5.7
|
|
1842
1844
|
if old < parse_version("2.5.7"):
|
|
1843
1845
|
print("Migrating config from < 2.5.7...")
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1846
|
+
patch_css('web-blocks.css', True) # force update
|
|
1847
|
+
patch_css('web-chatgpt.css', True) # force update
|
|
1848
|
+
patch_css('web-chatgpt_wide.css', True) # force update
|
|
1847
1849
|
updated = True
|
|
1848
1850
|
|
|
1849
1851
|
# < 2.5.8
|
|
@@ -1894,13 +1896,13 @@ class Patch:
|
|
|
1894
1896
|
# < 2.5.21
|
|
1895
1897
|
if old < parse_version("2.5.21"):
|
|
1896
1898
|
print("Migrating config from < 2.5.21...")
|
|
1897
|
-
|
|
1899
|
+
patch_css('web-chatgpt.css', True) # force replace file
|
|
1898
1900
|
updated = True
|
|
1899
1901
|
|
|
1900
1902
|
# < 2.5.24
|
|
1901
1903
|
if old < parse_version("2.5.24"):
|
|
1902
1904
|
print("Migrating config from < 2.5.24...")
|
|
1903
|
-
|
|
1905
|
+
patch_css('web-chatgpt.css', True) # force replace file
|
|
1904
1906
|
updated = True
|
|
1905
1907
|
|
|
1906
1908
|
# < 2.5.25
|
|
@@ -1946,29 +1948,29 @@ class Patch:
|
|
|
1946
1948
|
# < 2.5.36
|
|
1947
1949
|
if old < parse_version("2.5.36"):
|
|
1948
1950
|
print("Migrating config from < 2.5.36...")
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1951
|
+
patch_css('style.css', True) # force replace file
|
|
1952
|
+
patch_css('style.dark.css', True) # force replace file
|
|
1953
|
+
patch_css('style.light.css', True) # force replace file
|
|
1954
|
+
patch_css('web-chatgpt.css', True) # force replace file
|
|
1955
|
+
patch_css('web-chatgpt.light.css', True) # force replace file
|
|
1956
|
+
patch_css('web-chatgpt.dark.css', True) # force replace file
|
|
1957
|
+
patch_css('web-chatgpt_wide.css', True) # force replace file
|
|
1958
|
+
patch_css('web-chatgpt_wide.light.css', True) # force replace file
|
|
1959
|
+
patch_css('web-chatgpt_wide.dark.css', True) # force replace file
|
|
1958
1960
|
updated = True
|
|
1959
1961
|
|
|
1960
1962
|
# < 2.5.37
|
|
1961
1963
|
if old < parse_version("2.5.37"):
|
|
1962
1964
|
print("Migrating config from < 2.5.37...")
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1965
|
+
patch_css('style.css', True) # force replace file
|
|
1966
|
+
patch_css('style.dark.css', True) # force replace file
|
|
1967
|
+
patch_css('style.light.css', True) # force replace file
|
|
1968
|
+
patch_css('web-chatgpt.css', True) # force replace file
|
|
1969
|
+
patch_css('web-chatgpt.light.css', True) # force replace file
|
|
1970
|
+
patch_css('web-chatgpt.dark.css', True) # force replace file
|
|
1971
|
+
patch_css('web-chatgpt_wide.css', True) # force replace file
|
|
1972
|
+
patch_css('web-chatgpt_wide.light.css', True) # force replace file
|
|
1973
|
+
patch_css('web-chatgpt_wide.dark.css', True) # force replace file
|
|
1972
1974
|
updated = True
|
|
1973
1975
|
|
|
1974
1976
|
# < 2.5.40 - update tool prompts
|
|
@@ -1976,13 +1978,13 @@ class Patch:
|
|
|
1976
1978
|
print("Migrating config from < 2.5.40...")
|
|
1977
1979
|
|
|
1978
1980
|
# config
|
|
1979
|
-
data['prompt.agent.goal'] =
|
|
1980
|
-
data['prompt.agent.instruction'] =
|
|
1981
|
-
data['prompt.ctx.auto_summary.user'] =
|
|
1982
|
-
data['prompt.cmd'] =
|
|
1983
|
-
data['prompt.cmd.extra'] =
|
|
1984
|
-
data['prompt.cmd.extra.assistants'] =
|
|
1985
|
-
data['prompt.expert'] =
|
|
1981
|
+
data['prompt.agent.goal'] = cfg_get_base('prompt.agent.goal')
|
|
1982
|
+
data['prompt.agent.instruction'] = cfg_get_base('prompt.agent.instruction')
|
|
1983
|
+
data['prompt.ctx.auto_summary.user'] = cfg_get_base('prompt.ctx.auto_summary.user')
|
|
1984
|
+
data['prompt.cmd'] = cfg_get_base('prompt.cmd')
|
|
1985
|
+
data['prompt.cmd.extra'] = cfg_get_base('prompt.cmd.extra')
|
|
1986
|
+
data['prompt.cmd.extra.assistants'] = cfg_get_base('prompt.cmd.extra.assistants')
|
|
1987
|
+
data['prompt.expert'] = cfg_get_base('prompt.expert')
|
|
1986
1988
|
|
|
1987
1989
|
# plugins
|
|
1988
1990
|
if 'openai_dalle' in data['plugins'] \
|
|
@@ -2002,8 +2004,8 @@ class Patch:
|
|
|
2002
2004
|
# < 2.5.42 - action img padding
|
|
2003
2005
|
if old < parse_version("2.5.42"):
|
|
2004
2006
|
print("Migrating config from < 2.5.42...")
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
+
patch_css('web-chatgpt.css', True) # force replace file
|
|
2008
|
+
patch_css('web-chatgpt_wide.css', True) # force replace file
|
|
2007
2009
|
updated = True
|
|
2008
2010
|
|
|
2009
2011
|
# < 2.5.43 - remove cmd_code_interpreter fresh_kernel option
|
|
@@ -2017,35 +2019,35 @@ class Patch:
|
|
|
2017
2019
|
# < 2.5.51
|
|
2018
2020
|
if old < parse_version("2.5.51"):
|
|
2019
2021
|
print("Migrating config from < 2.5.51...")
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2022
|
+
patch_css('style.css', True) # force replace file
|
|
2023
|
+
patch_css('style.dark.css', True) # force replace file
|
|
2024
|
+
patch_css('style.light.css', True) # force replace file
|
|
2023
2025
|
updated = True
|
|
2024
2026
|
|
|
2025
2027
|
# < 2.5.54
|
|
2026
2028
|
if old < parse_version("2.5.54"):
|
|
2027
2029
|
print("Migrating config from < 2.5.54...")
|
|
2028
|
-
|
|
2030
|
+
patch_css('web-chatgpt.css', True) # force replace file
|
|
2029
2031
|
updated = True
|
|
2030
2032
|
|
|
2031
2033
|
# < 2.5.55
|
|
2032
2034
|
if old < parse_version("2.5.55"):
|
|
2033
2035
|
print("Migrating config from < 2.5.55...")
|
|
2034
|
-
|
|
2036
|
+
patch_css('web-chatgpt.css', True) # force replace file
|
|
2035
2037
|
updated = True
|
|
2036
2038
|
|
|
2037
2039
|
# < 2.5.60
|
|
2038
2040
|
if old < parse_version("2.5.60"):
|
|
2039
2041
|
print("Migrating config from < 2.5.60...")
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2042
|
+
patch_css('style.css', True) # force replace file
|
|
2043
|
+
patch_css('style.dark.css', True) # force replace file
|
|
2044
|
+
patch_css('style.light.css', True) # force replace file
|
|
2045
|
+
patch_css('web-chatgpt.css', True) # force replace file
|
|
2046
|
+
patch_css('web-chatgpt.light.css', True) # force replace file
|
|
2047
|
+
patch_css('web-chatgpt.dark.css', True) # force replace file
|
|
2048
|
+
patch_css('web-chatgpt_wide.css', True) # force replace file
|
|
2049
|
+
patch_css('web-chatgpt_wide.light.css', True) # force replace file
|
|
2050
|
+
patch_css('web-chatgpt_wide.dark.css', True) # force replace file
|
|
2049
2051
|
updated = True
|
|
2050
2052
|
|
|
2051
2053
|
# < 2.5.61
|
|
@@ -2053,7 +2055,7 @@ class Patch:
|
|
|
2053
2055
|
print("Migrating config from < 2.5.61..")
|
|
2054
2056
|
if "agent.output.render.all" not in data:
|
|
2055
2057
|
data["agent.output.render.all"] = False
|
|
2056
|
-
data["prompt.expert"] =
|
|
2058
|
+
data["prompt.expert"] = cfg_get_base(
|
|
2057
2059
|
'prompt.expert')
|
|
2058
2060
|
if "experts.use_agent" not in data:
|
|
2059
2061
|
data["experts.use_agent"] = True
|
|
@@ -2070,11 +2072,11 @@ class Patch:
|
|
|
2070
2072
|
# < 2.5.64
|
|
2071
2073
|
if old < parse_version("2.5.64"):
|
|
2072
2074
|
print("Migrating config from < 2.5.64..")
|
|
2073
|
-
data["prompt.cmd"] =
|
|
2075
|
+
data["prompt.cmd"] = cfg_get_base(
|
|
2074
2076
|
'prompt.cmd')
|
|
2075
|
-
data["prompt.cmd.extra"] =
|
|
2077
|
+
data["prompt.cmd.extra"] = cfg_get_base(
|
|
2076
2078
|
'prompt.cmd.extra')
|
|
2077
|
-
data["prompt.expert"] =
|
|
2079
|
+
data["prompt.expert"] = cfg_get_base(
|
|
2078
2080
|
'prompt.expert')
|
|
2079
2081
|
data["experts.use_agent"] = False
|
|
2080
2082
|
updated = True
|
|
@@ -2082,7 +2084,7 @@ class Patch:
|
|
|
2082
2084
|
# < 2.5.65
|
|
2083
2085
|
if old < parse_version("2.5.65"):
|
|
2084
2086
|
print("Migrating config from < 2.5.65..")
|
|
2085
|
-
data["prompt.expert"] =
|
|
2087
|
+
data["prompt.expert"] = cfg_get_base(
|
|
2086
2088
|
'prompt.expert')
|
|
2087
2089
|
updated = True
|
|
2088
2090
|
|
|
@@ -2098,11 +2100,11 @@ class Patch:
|
|
|
2098
2100
|
# < 2.5.69
|
|
2099
2101
|
if old < parse_version("2.5.69"):
|
|
2100
2102
|
print("Migrating config from < 2.5.69.")
|
|
2101
|
-
data["prompt.agent.continue"] =
|
|
2103
|
+
data["prompt.agent.continue"] = cfg_get_base(
|
|
2102
2104
|
'prompt.agent.continue')
|
|
2103
|
-
data["prompt.agent.goal"] =
|
|
2105
|
+
data["prompt.agent.goal"] = cfg_get_base(
|
|
2104
2106
|
'prompt.agent.goal')
|
|
2105
|
-
data["prompt.expert"] =
|
|
2107
|
+
data["prompt.expert"] = cfg_get_base(
|
|
2106
2108
|
'prompt.expert')
|
|
2107
2109
|
if "agent.api_use_responses" not in data:
|
|
2108
2110
|
data["agent.api_use_responses"] = False
|
|
@@ -2123,7 +2125,7 @@ class Patch:
|
|
|
2123
2125
|
if "remote_tools.mcp" not in data:
|
|
2124
2126
|
data["remote_tools.mcp"] = False
|
|
2125
2127
|
if "remote_tools.mcp.args" not in data:
|
|
2126
|
-
data["remote_tools.mcp.args"] =
|
|
2128
|
+
data["remote_tools.mcp.args"] = cfg_get_base(
|
|
2127
2129
|
'remote_tools.mcp.args')
|
|
2128
2130
|
if "remote_tools.file_search" not in data:
|
|
2129
2131
|
data["remote_tools.file_search"] = False
|
|
@@ -2143,23 +2145,23 @@ class Patch:
|
|
|
2143
2145
|
# < 2.5.73
|
|
2144
2146
|
if old < parse_version("2.5.73"):
|
|
2145
2147
|
print("Migrating config from < 2.5.73...")
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2148
|
+
patch_css('web-chatgpt.css', True) # force replace file
|
|
2149
|
+
patch_css('web-chatgpt.light.css', True) # force replace file
|
|
2150
|
+
patch_css('web-chatgpt_wide.css', True) # force replace file
|
|
2151
|
+
patch_css('web-chatgpt_wide.light.css', True) # force replace file
|
|
2152
|
+
patch_css('web-chatgpt_wide.dark.css', True) # force replace file
|
|
2151
2153
|
updated = True
|
|
2152
2154
|
|
|
2153
2155
|
# < 2.5.76
|
|
2154
2156
|
if old < parse_version("2.5.76"):
|
|
2155
2157
|
print("Migrating config from < 2.5.76.")
|
|
2156
2158
|
if "agent.llama.loop.mode" not in data:
|
|
2157
|
-
data["agent.llama.loop.mode"] =
|
|
2159
|
+
data["agent.llama.loop.mode"] = cfg_get_base(
|
|
2158
2160
|
'agent.llama.loop.mode')
|
|
2159
2161
|
if "prompt.agent.llama.eval.complete" not in data:
|
|
2160
|
-
data["prompt.agent.llama.eval.complete"] =
|
|
2162
|
+
data["prompt.agent.llama.eval.complete"] = cfg_get_base(
|
|
2161
2163
|
'prompt.agent.llama.eval.complete')
|
|
2162
|
-
data["prompt.agent.llama.eval"] =
|
|
2164
|
+
data["prompt.agent.llama.eval"] = cfg_get_base(
|
|
2163
2165
|
'prompt.agent.llama.eval')
|
|
2164
2166
|
|
|
2165
2167
|
# < 2.5.89
|
|
@@ -2177,11 +2179,11 @@ class Patch:
|
|
|
2177
2179
|
# < 2.5.90
|
|
2178
2180
|
if old < parse_version("2.5.90"):
|
|
2179
2181
|
print("Migrating config from < 2.5.90...")
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2182
|
+
patch_css('style.dark.css', True) # force replace file
|
|
2183
|
+
patch_css('style.light.css', True) # force replace file
|
|
2184
|
+
patch_css('web-blocks.css', True) # force replace file
|
|
2185
|
+
patch_css('web-blocks.dark.css', True) # force replace file
|
|
2186
|
+
patch_css('web-blocks.light.css', True) # force replace file
|
|
2185
2187
|
updated = True
|
|
2186
2188
|
|
|
2187
2189
|
# < 2.5.91
|
|
@@ -2205,15 +2207,15 @@ class Patch:
|
|
|
2205
2207
|
data["api_endpoint_hugging_face"] = "https://router.huggingface.co/v1"
|
|
2206
2208
|
|
|
2207
2209
|
# tips
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2210
|
+
patch_css('web-chatgpt.css', True) # force replace file
|
|
2211
|
+
patch_css('web-chatgpt.light.css', True) # force replace file
|
|
2212
|
+
patch_css('web-chatgpt.dark.css', True) # force replace file
|
|
2213
|
+
patch_css('web-chatgpt_wide.css', True) # force replace file
|
|
2214
|
+
patch_css('web-chatgpt_wide.light.css', True) # force replace file
|
|
2215
|
+
patch_css('web-chatgpt_wide.dark.css', True) # force replace file
|
|
2216
|
+
patch_css('web-blocks.css', True) # force replace file
|
|
2217
|
+
patch_css('web-blocks.light.css', True) # force replace file
|
|
2218
|
+
patch_css('web-blocks.dark.css', True) # force replace file
|
|
2217
2219
|
updated = True
|
|
2218
2220
|
|
|
2219
2221
|
# < 2.5.95
|
|
@@ -2225,15 +2227,15 @@ class Patch:
|
|
|
2225
2227
|
data["personalize.modes"] = "chat"
|
|
2226
2228
|
|
|
2227
2229
|
# avatars css
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2230
|
+
patch_css('web-chatgpt.css', True) # force replace file
|
|
2231
|
+
patch_css('web-chatgpt.light.css', True) # force replace file
|
|
2232
|
+
patch_css('web-chatgpt.dark.css', True) # force replace file
|
|
2233
|
+
patch_css('web-chatgpt_wide.css', True) # force replace file
|
|
2234
|
+
patch_css('web-chatgpt_wide.light.css', True) # force replace file
|
|
2235
|
+
patch_css('web-chatgpt_wide.dark.css', True) # force replace file
|
|
2236
|
+
patch_css('web-blocks.css', True) # force replace file
|
|
2237
|
+
patch_css('web-blocks.light.css', True) # force replace file
|
|
2238
|
+
patch_css('web-blocks.dark.css', True) # force replace file
|
|
2237
2239
|
updated = True
|
|
2238
2240
|
|
|
2239
2241
|
# < 2.5.98
|
|
@@ -2246,19 +2248,19 @@ class Patch:
|
|
|
2246
2248
|
# < 2.6.0
|
|
2247
2249
|
if old < parse_version("2.6.0"):
|
|
2248
2250
|
print("Migrating config from < 2.6.0...")
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
+
patch_css('style.light.css', True) # scrollbar, calendar fix
|
|
2252
|
+
patch_css('style.dark.css', True) # calendar fix
|
|
2251
2253
|
updated = True
|
|
2252
2254
|
|
|
2253
2255
|
# < 2.6.8
|
|
2254
2256
|
if old < parse_version("2.6.8"):
|
|
2255
2257
|
print("Migrating config from < 2.6.8...")
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2258
|
+
patch_css('web-chatgpt.light.css', True) # p color
|
|
2259
|
+
patch_css('web-chatgpt.dark.css', True) # p color
|
|
2260
|
+
patch_css('web-chatgpt_wide.light.css', True) # p color
|
|
2261
|
+
patch_css('web-chatgpt_wide.dark.css', True) # p color
|
|
2262
|
+
patch_css('style.light.css', True) # tree
|
|
2263
|
+
patch_css('style.dark.css', True) # tree
|
|
2262
2264
|
updated = True
|
|
2263
2265
|
|
|
2264
2266
|
# < 2.6.10
|
|
@@ -2283,19 +2285,19 @@ class Patch:
|
|
|
2283
2285
|
# < 2.6.23 -- fix: restore <p> color
|
|
2284
2286
|
if old < parse_version("2.6.23"):
|
|
2285
2287
|
print("Migrating config from < 2.6.23...")
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2288
|
+
patch_css('web-chatgpt.dark.css', True)
|
|
2289
|
+
patch_css('web-chatgpt_wide.dark.css', True)
|
|
2290
|
+
patch_css('web-chatgpt.light.css', True)
|
|
2291
|
+
patch_css('web-chatgpt_wide.light.css', True)
|
|
2292
|
+
patch_css('web-blocks.dark.css', True)
|
|
2293
|
+
patch_css('web-blocks.light.css', True)
|
|
2292
2294
|
updated = True
|
|
2293
2295
|
|
|
2294
2296
|
# < 2.6.24
|
|
2295
2297
|
if old < parse_version("2.6.24"):
|
|
2296
2298
|
print("Migrating config from < 2.6.24...")
|
|
2297
2299
|
if "llama.idx.embeddings.default" not in data:
|
|
2298
|
-
data["llama.idx.embeddings.default"] =
|
|
2300
|
+
data["llama.idx.embeddings.default"] = cfg_get_base(
|
|
2299
2301
|
'llama.idx.embeddings.default')
|
|
2300
2302
|
updated = True
|
|
2301
2303
|
|
|
@@ -2347,12 +2349,12 @@ class Patch:
|
|
|
2347
2349
|
# < 2.6.28 -- fix: cmd color
|
|
2348
2350
|
if old < parse_version("2.6.28"):
|
|
2349
2351
|
print("Migrating config from < 2.6.28...")
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2352
|
+
patch_css('web-chatgpt.css', True)
|
|
2353
|
+
patch_css('web-chatgpt_wide.css', True)
|
|
2354
|
+
patch_css('web-chatgpt.dark.css', True)
|
|
2355
|
+
patch_css('web-chatgpt_wide.dark.css', True)
|
|
2356
|
+
patch_css('web-chatgpt.light.css', True)
|
|
2357
|
+
patch_css('web-chatgpt_wide.light.css', True)
|
|
2356
2358
|
updated = True
|
|
2357
2359
|
|
|
2358
2360
|
# < 2.6.30
|
|
@@ -2381,6 +2383,52 @@ class Patch:
|
|
|
2381
2383
|
data["audio.input.vad.silence"] = 2000
|
|
2382
2384
|
updated = True
|
|
2383
2385
|
|
|
2386
|
+
# < 2.6.32
|
|
2387
|
+
if old < parse_version("2.6.32"):
|
|
2388
|
+
print("Migrating config from < 2.6.32...")
|
|
2389
|
+
|
|
2390
|
+
data["prompt.img"] = cfg_get_base(
|
|
2391
|
+
'prompt.img')
|
|
2392
|
+
|
|
2393
|
+
if "prompt.video" not in data:
|
|
2394
|
+
data["prompt.video"] = cfg_get_base('prompt.video')
|
|
2395
|
+
if "video.prompt_model" not in data:
|
|
2396
|
+
data["video.prompt_model"] = cfg_get_base( 'video.prompt_model')
|
|
2397
|
+
if "video.aspect_ratio" not in data:
|
|
2398
|
+
data["video.aspect_ratio"] = cfg_get_base( 'video.aspect_ratio')
|
|
2399
|
+
if "video.duration" not in data:
|
|
2400
|
+
data["video.duration"] = cfg_get_base('video.duration')
|
|
2401
|
+
if "video.fps" not in data:
|
|
2402
|
+
data["video.fps"] = cfg_get_base('video.fps')
|
|
2403
|
+
if "video.seed" not in data:
|
|
2404
|
+
data["video.seed"] = cfg_get_base('video.seed')
|
|
2405
|
+
if "video.negative_prompt" not in data:
|
|
2406
|
+
data["video.negative_prompt"] = cfg_get_base('video.negative_prompt')
|
|
2407
|
+
if "video.generate_audio" not in data:
|
|
2408
|
+
data["video.generate_audio"] = cfg_get_base('video.generate_audio')
|
|
2409
|
+
if "video.resolution" not in data:
|
|
2410
|
+
data["video.resolution"] = cfg_get_base('video.resolution')
|
|
2411
|
+
|
|
2412
|
+
# google vertex
|
|
2413
|
+
if "api_native_google.use_vertex" not in data:
|
|
2414
|
+
data["api_native_google.use_vertex"] = cfg_get_base('api_native_google.use_vertex')
|
|
2415
|
+
if "api_native_google.cloud_project" not in data:
|
|
2416
|
+
data["api_native_google.cloud_project"] = cfg_get_base('api_native_google.cloud_project')
|
|
2417
|
+
if "api_native_google.cloud_location" not in data:
|
|
2418
|
+
data["api_native_google.cloud_location"] = cfg_get_base('api_native_google.cloud_location')
|
|
2419
|
+
if "api_native_google.app_credentials" not in data:
|
|
2420
|
+
data["api_native_google.app_credentials"] = cfg_get_base('api_native_google.app_credentials')
|
|
2421
|
+
|
|
2422
|
+
# audio loop
|
|
2423
|
+
if "audio.input.loop" not in data:
|
|
2424
|
+
data["audio.input.loop"] = False
|
|
2425
|
+
|
|
2426
|
+
# add video player CSS
|
|
2427
|
+
patch_css('web-chatgpt.css', True)
|
|
2428
|
+
patch_css('web-chatgpt_wide.css', True)
|
|
2429
|
+
patch_css('web-blocks.css', True)
|
|
2430
|
+
updated = True
|
|
2431
|
+
|
|
2384
2432
|
# update file
|
|
2385
2433
|
migrated = False
|
|
2386
2434
|
if updated:
|