Commit Graph

665 Commits

Author SHA1 Message Date
12718dbe24 Try long-polling first, then try websocket
This makes it so that SocketIO uses long polling to set up the
connection before switching to websocket, instead of immediately using
websocket.

This seems to resolve issues where the browser sometimes can't connect
to the websocket server until the window has been open for a minute.
2021-12-17 13:18:47 -05:00
769333738d Fix behaviour of kobold.outputs with read-only and no prompt gen 2021-12-17 12:59:01 -05:00
d15b43e20e Not always a list of strings
kobold.outputs must be a 1D list of strings, but sometimes its still blank. In those cases rather than throwing an error and crashing the scripting its better if it does nothing.
2021-12-16 12:54:10 +01:00
6d9063fb8b No Prompt Gen
Allow people to enter a prompt without generating anything by the AI. Combined with the always add prompt this is a very useful feature that allows people to write world information first, and then do a specific action. This mimics the behavior previously seen in AI Dungeon forks where it prompts for world information and then asks an action and can be particularly useful for people who want the prompt to always be part of the generation.
2021-12-16 12:47:44 +01:00
f3b4ecabca Merge pull request #44 from VE-FORBRYDERNE/patch
Fix an error that occurs when all layers are on second GPU
2021-12-16 01:43:03 +01:00
e3d9c2d690 New download machanism
Automatically converts Huggingface cache models to full models on (down)load.
WARNING: Does wipe old cache/ dir inside the KoboldAI folder, make a backup before you run these models if you are bandwith constraint.
2021-12-16 01:40:04 +01:00
19d2356253 Fix an error that occurs when all layers are on second GPU 2021-12-15 19:03:49 -05:00
5e3e3f3578 Fix float16 models
Forcefully convert float16 models to work on the CPU
2021-12-16 00:31:51 +01:00
46b0473229 Merge pull request #43 from VE-FORBRYDERNE/dynamic-scan-patch
Dynamic scan patch
2021-12-15 09:45:07 +01:00
9097aac4a8 Show full stack trace for generator errors to help in diagnosing errors 2021-12-15 02:03:08 -05:00
2687135e05 Fix a strange bug where max tokens was capped at 1024
This seems to be related to the model config files, because only certain
models have this problem, and replacing ALL configuration files of a
"bad" model with those of a "good" model of the same type would fix the
problem.

Shouldn't be required anymore.
2021-12-15 00:45:41 -05:00
1551c45ba4 Prevent dynamic scanning from generating too many tokens 2021-12-14 23:39:04 -05:00
629988ce13 Fix a problem with the Lua regeneration API
It was an egregious typo that caused tokens to be rearranged on
regeneration.
2021-12-14 23:04:03 -05:00
56679d775f Update update-kobold.bat
Improved reliability
2021-12-14 18:53:52 +01:00
6670168a47 Update aiserver.py 2021-12-14 16:26:23 +01:00
cb98462b02 Replace update with switch
My idea to checkout the used branch failed making the updater obsolete, rebranded the switcher to the updater.
2021-12-14 16:00:35 +01:00
c701fdce1d Update update-kobold.bat 2021-12-14 15:55:44 +01:00
2d1561aa55 Version Switcher
Allows people to easily switch between different versions of KoboldAI. The stable one, United or their own. Compatible with my earlier update script.
2021-12-14 15:24:56 +01:00
b824ce0b33 Update Script
Updates KoboldAI to the latest official version, if you want to use United you first manually need to be on that git branch otherwise it gets overwritten with the old one.
2021-12-14 14:26:04 +01:00
c5dec67f13 Fix Netbase on Colab
Apparently Colab does not properly have netbase which we now use for the proper websocket support, now the installer forces it to be correctly installed so we don't crash on launch.
2021-12-14 04:02:33 +01:00
0f06cee272 Don't upload developer userscripts
We may want to bundle these at some point, but in that case you should make an exception like we do for the sample story. The same applies to Softprompts.
2021-12-14 02:55:16 +01:00
c5ade0333a Userscript support on GDrive
Make the Colab's create and map a userscripts folder.
2021-12-14 02:51:39 +01:00
18ddd77337 Apply VE's changes to colab 2021-12-14 02:13:43 +01:00
a0ccbda6b1 Merge pull request #42 from VE-FORBRYDERNE/scripting
Lua scripting
2021-12-14 02:12:09 +01:00
6e6e0b2b4d Allow Lua to stop generation from input modifier 2021-12-13 19:32:01 -05:00
e9ed8602b2 Add a "corescript" setting 2021-12-13 19:28:33 -05:00
e5bb20cc8f Fix Lua regeneration system 2021-12-13 19:17:18 -05:00
462040ed6f Restore missing loadsettings() call 2021-12-13 18:39:33 -05:00
661cca63e8 Make sure stopping criteria still work with dynamic scan off 2021-12-13 18:10:51 -05:00
338d437ea3 Use eventlet instead of gevent-websocket 2021-12-13 17:19:04 -05:00
fb6762bc1a Add "AVAILABLE" and "ACTIVE" headings to userscript menu 2021-12-13 12:45:52 -05:00
ed9c2a4d52 Fix a bug that occurs when userscript doesn't have all 3 modifiers 2021-12-13 11:50:10 -05:00
34c52a1a23 Remove escape characters from all error messages 2021-12-13 11:47:34 -05:00
11f9866dbe Enable more of the IO library in Lua sandbox
Also changes the Lua warning color to red.
2021-12-13 11:22:58 -05:00
28e86563b8 Change self.scores to scores in aiserver.py 2021-12-13 11:18:01 -05:00
a06cc3d37b Make sure the "Lua error" GUI message is always visible 2021-12-13 03:21:08 -05:00
d870f193b2 Create userscripts folder if it doesn't exist 2021-12-13 02:33:36 -05:00
82e149ee02 Catch Lua errors properly 2021-12-13 02:32:09 -05:00
5f06d20085 Format Lua printed messages and warnings 2021-12-13 01:59:53 -05:00
b99e9f1292 Don't wrap koboldbridge in bridge.lua 2021-12-13 01:06:05 -05:00
d2f5544468 Add Userscripts menu into GUI 2021-12-13 01:03:26 -05:00
5d13339a52 Allow the retry button to call the Lua scripts properly 2021-12-12 20:48:10 -05:00
39bfb0862a Allow user input to be modified from Lua
Also adds some handlers in the Lua code for when the game is not started
yet
2021-12-12 20:44:03 -05:00
fbf3e7615b Add API for generated tokens and output text 2021-12-12 19:27:20 -05:00
ceabd2ef7b Add Lua API for editing logits during generation
TPU backend not supported yet.
2021-12-12 16:18:45 -05:00
e2c3ac041b Complete the Lua generation halting API 2021-12-12 12:52:03 -05:00
e06861bb0b Rename v to wrapped_func in metawrapper.__newindex() 2021-12-12 12:20:01 -05:00
d76dd35791 Add Lua API for reading model information 2021-12-12 12:09:59 -05:00
09df371d99 Handle nested wrapped functions in bridge.lua properly 2021-12-12 11:30:04 -05:00
00eb125ad0 Allow Lua API to toggle dynamic scan 2021-12-12 01:55:46 -05:00