Git Product home page Git Product logo

ebolam / koboldai Goto Github PK

View Code? Open in Web Editor NEW

This project forked from henk717/koboldai

32.0 32.0 11.0 97.09 MB

License: GNU Affero General Public License v3.0

Python 5.02% Batchfile 0.05% CSS 0.55% JavaScript 1.09% HTML 2.22% Dockerfile 0.01% Shell 0.12% Lua 0.40% Haxe 0.01% PowerShell 0.01% Jupyter Notebook 0.11% Less 0.11% SCSS 0.11% Stylus 0.10% CMake 0.10% Makefile 0.06% C 12.11% C++ 77.32% Swift 0.09% Objective-C 0.43%

koboldai's People

Contributors

0cc4m avatar alpindale avatar catboxanon avatar cohee1207 avatar db0 avatar disty0 avatar ebolam avatar funkengine2023 avatar guiaworld avatar henk717 avatar javalar avatar jojorne avatar koboldai avatar lightsaveus avatar lostruins avatar marcusllewellyn avatar mightyalex200 avatar mrseeker avatar nerodiafasciata avatar nkpz avatar one-some avatar pi6am avatar recoveredapparatus avatar scott-ca avatar uwuplus avatar vfbd avatar viningr avatar waffshappen avatar yellowrosecx avatar zurnaz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

koboldai's Issues

Palette UI changes

Enlisting your help with the Palette UI

  • Remove the ERROR Variables from the table
  • Add the Background colours on the table, with the header Background, and 5 columns named
    - Base
    - Layer 1
    - Layer 2
    - Layer 3
    - Layer 4
  • Hide the input when value is #000000

Buttons to hide the bars

It would be nice to make a button, when you click on which timer bar would be hidden, so that when you click on the same button it would be possible to unhide it (the screenshot shows the one-some version I like).
P.S. Also, since the token bar is now designed as a panel, it makes sense to make the same button for that too.
real

Rework model.settings files

The current code base saves settings to the model.settings file which is a different philosophy than the new UI. This will need to be reworked including the ability to load old settings files and converting them to the new system

Excluding the 6 from the presets

We'll dynamically add 6 to the top when the preset is imported, but the actual preset files will remain unchanged.
So the presets files will still contain this sampler_order: { 5, 4, 3, 2, 1, 0 } instead of this sampler_order: { 6, 5, 4, 3, 2, 1, 0 }. This way we won't affect the current presets effect, which was saved when I ported the presets from NAI where the rep pen sampler was absent.

one-some's example of how it could be:

if 6 not in sampling_order:
  sampling_order = [6] + sampling_order

Error when selecting model

When selecting Fairseq-Dense 125M it doesn't show the layers option, and produces an error

{'model': 'fsdlist', 'menu': 'mainmenu', 'display_name': 'Untuned Fairseq Dense'}
{'model': 'KoboldAI/fairseq-dense-125M', 'menu': 'fsdlist', 'display_name': 'Fairseq Dense 125M'}
Exception in thread Thread-24:
Traceback (most recent call last):
  File "D:\Games\KoboldAI\miniconda3\lib\threading.py", line 932, in _bootstrap_inner
    self.run()
  File "D:\Games\KoboldAI\miniconda3\lib\threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\socketio\server.py", line 720, in _handle_event_internal
    r = server._trigger_event(data[0], namespace, sid, *data[1:])
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\socketio\server.py", line 745, in _trigger_event
    return self.handlers[namespace][event](*args)
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\flask_socketio\__init__.py", line 282, in _handler
    return self._handle_event(handler, message, namespace, sid,
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\flask_socketio\__init__.py", line 766, in _handle_event
    ret = handler(*args)
  File "aiserver.py", line 271, in g
    return f(*a, **k)
  File "aiserver.py", line 7127, in UI_2_load_model_button
    get_model_info(data['model'])
  File "aiserver.py", line 1345, in get_model_info
    break_values = [int(x) for x in break_values]
  File "aiserver.py", line 1345, in <listcomp>
    break_values = [int(x) for x in break_values]
ValueError: invalid literal for int() with base 10: ''

Retry doesnt remove old text

The "retry" button does not remove text before generation. Perhaps this is only under certain circumstances, but I can't seem to get it to work at all.

Add chat support

Right now chat's are supported but it doesn't appear to work correctly.

Finish Palette System

  • Beautify the Palette Table
  • Add theme name to save
  • Fix loading into the Palette the current theme
  • Fix chrome color bug (not showing actual value)

Theme issue

When messing with palette or advanced theme vars changing the theme to another then back doesn't reset everything

Simplifying and Adjusting the Layout

[Enhancement]

I've been doing a lot of test with various styles of using Kobold and I noticed something

When you have both menus opened, (or pinned when #23 is added) the layout becomes too crammed.
And the biggest problem is when you open the menu and pin it, or uses the Gen per Action, the text shifts around A LOT.
With token streaming this problem is exacerbated.
This much shifting can cause confusion, and headaches. And it did, for me at least...

So, to solve this I propose we take the layout and proportions of Google Docs and MS Word.
So, instead of having a main window that compresses and expands as we use the features, we have a main page (just like Docs) and the sides remains empty. When the user wants to use the features, they can open the side menus, and if they uses it a lot, they can pin it.

In the case of the Gens per Action, it will live outside of the page, and it can pop to the other side easily.

This will stop the text from going everywhere, and will make the experience less disorientated.
And it also fix another annoyance, when you open a side menu, it will obstruct the text :D

Sequence area closing problem

Sequence area is not closed, no matter if there are multiple gens, or not. It appears by default after first load.
Ideally, it should be absent at one gen and open and close if there are multiple gens.
image

WI Cards deletion issue

The second, third and subsequent WI Cards do not close after pressing the X and confirming it.
image

UI Randomly Disconnects

umm, The ui just randomly disconnects, after a while without any inputs.

log

loading D:/Games/KoboldAI/stories/sample_story_v2.json
Exception in thread Thread-24:
Traceback (most recent call last):
  File "D:\Games\KoboldAI\miniconda3\lib\threading.py", line 932, in _bootstrap_inner
    self.run()
  File "D:\Games\KoboldAI\miniconda3\lib\threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\socketio\server.py", line 720, in _handle_event_internal
    r = server._trigger_event(data[0], namespace, sid, *data[1:])
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\socketio\server.py", line 745, in _trigger_event
    return self.handlers[namespace][event](*args)
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\flask_socketio\__init__.py", line 282, in _handler
    return self._handle_event(handler, message, namespace, sid,
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\flask_socketio\__init__.py", line 766, in _handle_event
    ret = handler(*args)
  File "aiserver.py", line 6507, in UI_2_load_story
    loadRequest(file)
  File "aiserver.py", line 5459, in loadRequest
    loadJSON(js)
  File "aiserver.py", line 5468, in loadJSON
    load_story_v2(json_data)
  File "aiserver.py", line 5570, in load_story_v2
    koboldai_vars.load_story(session['story'], js)
  File "D:\Games\KoboldAI\koboldai_settings.py", line 85, in load_story
    self._story_settings[story_name].from_json(json_data)
  File "D:\Games\KoboldAI\koboldai_settings.py", line 330, in from_json
    getattr(self, key).load_json(value)
  File "D:\Games\KoboldAI\koboldai_settings.py", line 786, in load_json
    self.recalc_token_length()
  File "D:\Games\KoboldAI\koboldai_settings.py", line 966, in recalc_token_length
    ignore = self.koboldai_vars.calc_ai_text()
  File "D:\Games\KoboldAI\koboldai_settings.py", line 194, in calc_ai_text
    if self.actions.actions[i]["Selected Text Length"]+used_tokens <= token_budget and not used_all_tokens:
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'
Exception in thread Thread-45:
Traceback (most recent call last):
  File "D:\Games\KoboldAI\miniconda3\lib\threading.py", line 932, in _bootstrap_inner
    self.run()
  File "D:\Games\KoboldAI\miniconda3\lib\threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\socketio\server.py", line 720, in _handle_event_internal
    r = server._trigger_event(data[0], namespace, sid, *data[1:])
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\socketio\server.py", line 745, in _trigger_event
    return self.handlers[namespace][event](*args)
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\flask_socketio\__init__.py", line 282, in _handler
    return self._handle_event(handler, message, namespace, sid,
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\flask_socketio\__init__.py", line 766, in _handle_event
    ret = handler(*args)
  File "aiserver.py", line 6577, in UI_2_delete_world_info
    koboldai_vars.worldinfo_v2.delete(int(uid))
  File "D:\Games\KoboldAI\koboldai_settings.py", line 1169, in delete
    del self.world_info[uid]
KeyError: -1
Joining Room UI_2
actions is of type <class 'koboldai_settings.KoboldStoryRegister'> and I can't transmit
message handler error
Traceback (most recent call last):
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\flask_socketio\__init__.py", line 762, in _handle_event
    ret = handler(auth)
TypeError: do_connect() takes 0 positional arguments but 1 was given

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\engineio\server.py", line 622, in _trigger_event
    return self.handlers[event](*args)
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\socketio\server.py", line 776, in _handle_eio_message
    self._handle_connect(eio_sid, pkt.namespace, pkt.data)
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\socketio\server.py", line 668, in _handle_connect
    success = self._trigger_event(
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\socketio\server.py", line 745, in _trigger_event
    return self.handlers[namespace][event](*args)
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\flask_socketio\__init__.py", line 282, in _handler
    return self._handle_event(handler, message, namespace, sid,
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\flask_socketio\__init__.py", line 764, in _handle_event
    ret = handler()
  File "aiserver.py", line 3013, in do_connect
    ui2_connect()
  File "aiserver.py", line 6005, in ui2_connect
    koboldai_vars.send_to_ui()
  File "D:\Games\KoboldAI\koboldai_settings.py", line 116, in send_to_ui
    self._story_settings['default'].send_to_ui()
  File "D:\Games\KoboldAI\koboldai_settings.py", line 340, in send_to_ui
    process_variable_changes(self.socketio, self.__class__.__name__.replace("_settings", ""), name, value, None)
  File "D:\Games\KoboldAI\koboldai_settings.py", line 41, in process_variable_changes
    socketio.emit("var_changed", {"classname": "actions", "name": "In AI Input", "old_value": None, "value": {"id": i, 'In AI Input': value.actions[i]['In AI Input']}}, include_self=True, broadcast=True, room="UI_2")
KeyError: 'In AI Input'
Joining Room UI_2
actions is of type <class 'koboldai_settings.KoboldStoryRegister'> and I can't transmit
message handler error
Traceback (most recent call last):
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\flask_socketio\__init__.py", line 762, in _handle_event
    ret = handler(auth)
TypeError: do_connect() takes 0 positional arguments but 1 was given

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\engineio\server.py", line 622, in _trigger_event
    return self.handlers[event](*args)
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\socketio\server.py", line 776, in _handle_eio_message
    self._handle_connect(eio_sid, pkt.namespace, pkt.data)
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\socketio\server.py", line 668, in _handle_connect
    success = self._trigger_event(
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\socketio\server.py", line 745, in _trigger_event
    return self.handlers[namespace][event](*args)
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\flask_socketio\__init__.py", line 282, in _handler
    return self._handle_event(handler, message, namespace, sid,
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\flask_socketio\__init__.py", line 764, in _handle_event
    ret = handler()
  File "aiserver.py", line 3013, in do_connect
    ui2_connect()
  File "aiserver.py", line 6005, in ui2_connect
    koboldai_vars.send_to_ui()
  File "D:\Games\KoboldAI\koboldai_settings.py", line 116, in send_to_ui
    self._story_settings['default'].send_to_ui()
  File "D:\Games\KoboldAI\koboldai_settings.py", line 340, in send_to_ui
    process_variable_changes(self.socketio, self.__class__.__name__.replace("_settings", ""), name, value, None)
  File "D:\Games\KoboldAI\koboldai_settings.py", line 41, in process_variable_changes
    socketio.emit("var_changed", {"classname": "actions", "name": "In AI Input", "old_value": None, "value": {"id": i, 'In AI Input': value.actions[i]['In AI Input']}}, include_self=True, broadcast=True, room="UI_2")
KeyError: 'In AI Input'

Output text formatting

The text in the AI output first has a different formatting before getting the usual one.
1

World Info is broken

OK! KoboldAI/fairseq-dense-125M pipeline created!00:01<00:00, 240.36it/s]
Initializing Lua Bridge... OK!
Loading Core Script
Exception in thread Thread-27:
Traceback (most recent call last):
  File "D:\Games\KoboldAI\miniconda3\lib\threading.py", line 932, in _bootstrap_inner
    self.run()
  File "D:\Games\KoboldAI\miniconda3\lib\threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\socketio\server.py", line 720, in _handle_event_internal
    r = server._trigger_event(data[0], namespace, sid, *data[1:])
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\socketio\server.py", line 745, in _trigger_event
    return self.handlers[namespace][event](*args)
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\flask_socketio\__init__.py", line 282, in _handler
    return self._handle_event(handler, message, namespace, sid,
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\flask_socketio\__init__.py", line 766, in _handle_event
    ret = handler(*args)
  File "aiserver.py", line 6474, in UI_2_load_model
    load_model(use_gpu=data['use_gpu'], gpu_layers=data['gpu_layers'], disk_layers=data['disk_layers'], online_model=data['online_model'])
  File "aiserver.py", line 2271, in load_model
    koboldai_vars.tokenizer = tokenizer
  File "D:\Games\KoboldAI\koboldai_settings.py", line 265, in __setattr__
    setattr(self._story_settings['default'].actions, name, value)
  File "D:\Games\KoboldAI\koboldai_settings.py", line 1015, in __setattr__
    self.recalc_token_length()
  File "D:\Games\KoboldAI\koboldai_settings.py", line 973, in recalc_token_length
    ignore = self.koboldai_vars.calc_ai_text()
  File "D:\Games\KoboldAI\koboldai_settings.py", line 120, in calc_ai_text
    self.worldinfo_v2.reset_used_in_game()
  File "D:\Games\KoboldAI\koboldai_settings.py", line 1293, in reset_used_in_game
    if self.world_info[key]["used_in_game"] != constant:
NameError: name 'constant' is not defined
Using Option Text: {'chunk': '5', 'option': '0'}
Exception in thread Thread-28:
Traceback (most recent call last):
  File "D:\Games\KoboldAI\miniconda3\lib\threading.py", line 932, in _bootstrap_inner
    self.run()
  File "D:\Games\KoboldAI\miniconda3\lib\threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\socketio\server.py", line 720, in _handle_event_internal
    r = server._trigger_event(data[0], namespace, sid, *data[1:])
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\socketio\server.py", line 745, in _trigger_event
    return self.handlers[namespace][event](*args)
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\flask_socketio\__init__.py", line 282, in _handler
    return self._handle_event(handler, message, namespace, sid,
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\flask_socketio\__init__.py", line 766, in _handle_event
    ret = handler(*args)
  File "aiserver.py", line 6350, in UI_2_Set_Selected_Text
    koboldai_vars.actions.use_option(int(data['option']), action_step=int(data['chunk']))
  File "D:\Games\KoboldAI\koboldai_settings.py", line 908, in use_option
    ignore = self.koboldai_vars.calc_ai_text()
  File "D:\Games\KoboldAI\koboldai_settings.py", line 120, in calc_ai_text
    self.worldinfo_v2.reset_used_in_game()
  File "D:\Games\KoboldAI\koboldai_settings.py", line 1293, in reset_used_in_game
    if self.world_info[key]["used_in_game"] != constant:
NameError: name 'constant' is not defined
{'data': '', 'theme': ''}
doing normal input
Min:432, Max:511, Txt:Niko is a small red kobold.
Niko has yellow, reptilian eyes and a long, scaly tail.
Niko is hungry and looking to steal something to eat.

Niko is an Idiot
Niko the kobold stalked carefully down the alley, his small scaly figure obscured by a dusky cloak that fluttered lightly in the cold winter breeze. Holding up his tail to keep it from dragging in the dirty snow that covered the cobblestone, he waited patiently for the butcher to turn his attention from his stall so that he could pilfer his next meal: a tender-looking  chicken. He crouched just slightly as he neared the stall to ensure that no one was watching, not that anyone would be dumb enough to hassle a small kobold. What else was there for a lowly kobold to do in a city? All that Niko needed to know was where to find the chicken and then how to make off with it.

A soft thud caused Niko to quickly lift his head. Standing behind the stall where the butcher had been cutting his chicken,
[Author's note: Things are about to get crazy for poor Niko.]
 he saw a pair of large brown eyes that were bright and wide-eyed. They were both wearing dark clothing and appeared to have been wearing gloves. Niko was leaning forward to look at them.

"What's wrong?" Niko asked, his voice shaking.

"Nothing," Niko said. "I'm fine."

The two men smiled at him. "You're okay, I guess."

He lifted his head, looking back at the pair of brown eyes. The expression on their faces was quite different than it had been in the past.

"Well, you can't see anything. You're not sure what happened, but you should try to get your head around it." Niko said. "You might think I'm a bit crazy, but you're right."

"Don't worry, I'll try to get my head
 around this.

The following is a list of the most popular expressions with the word 'dance' in it. You can also look for other words which we have not found.

We are looking for an energetic, motivated and dedicated individual to join our team. Applicants must have experience working in a multi disciplinary environment and possess strong communication skills. You will be responsible for managing the
Exception in thread Thread-29:
Traceback (most recent call last):
  File "D:\Games\KoboldAI\miniconda3\lib\threading.py", line 932, in _bootstrap_inner
    self.run()
  File "D:\Games\KoboldAI\miniconda3\lib\threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\socketio\server.py", line 720, in _handle_event_internal
    r = server._trigger_event(data[0], namespace, sid, *data[1:])
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\socketio\server.py", line 745, in _trigger_event
    return self.handlers[namespace][event](*args)
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\flask_socketio\__init__.py", line 282, in _handler
    return self._handle_event(handler, message, namespace, sid,
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\flask_socketio\__init__.py", line 766, in _handle_event
    ret = handler(*args)
  File "aiserver.py", line 6371, in UI_2_submit
    actionsubmit(data['data'], actionmode=koboldai_vars.actionmode)
  File "aiserver.py", line 3703, in actionsubmit
    calcsubmit(data)
  File "aiserver.py", line 3948, in calcsubmit
    generate(subtxt, min, max, found_entries=found_entries)
  File "aiserver.py", line 4156, in generate
    genresult(genout[0]["generated_text"])
  File "aiserver.py", line 4191, in genresult
    koboldai_vars.actions.append(genout)
  File "D:\Games\KoboldAI\koboldai_settings.py", line 823, in append
    ignore = self.koboldai_vars.calc_ai_text()
  File "D:\Games\KoboldAI\koboldai_settings.py", line 120, in calc_ai_text
    self.worldinfo_v2.reset_used_in_game()
  File "D:\Games\KoboldAI\koboldai_settings.py", line 1293, in reset_used_in_game
    if self.world_info[key]["used_in_game"] != constant:
NameError: name 'constant' is not defined

Add save rev button

I could probably just add a "save_rev" button. It would take the "current" and save it as _rev_x, then save the current story as "current"

Advanced Theme Popup changes

[Very Low Priority]

  • The advanced theme table should divide the table with the apropriate titles for better organization
  • A apply button on the popup for easy theming

Token Count Issue

ile "/home/somebody/Repos/kobold-united/aiserver.py", line 7096, in UI_2_retry
actionsubmit("", actionmode=koboldai_vars.actionmode)
File "/home/somebody/Repos/kobold-united/aiserver.py", line 4112, in actionsubmit
calcsubmit(data)
File "/home/somebody/Repos/kobold-united/aiserver.py", line 4475, in calcsubmit
subtxt, min, max = calcsubmitbudget(actionlen, winfo, mem, anotetxt, koboldai_vars.actions, submission=txt)
File "/home/somebody/Repos/kobold-united/aiserver.py", line 4394, in calcsubmitbudget
assert budget >= 0
AssertionError

set context length to 2048, filled up context, set it to 512 and clicked generate

Tweaks and theme choice saving issues

Tweaks now survive the page reload, but don't survive between sessions. I suggest, well, to fix it so that tweaks are saved inter-sessions.

Possible solution:

"What we can do is setup a var for colab (I think it already exists) and transmit that to the client. Then on the cookie side in JS we can check if colab is set and if so do an emit back to the server side. Server saves it to a setting file. On load we do the opposite."

P.S. It would be nice if the user selected any theme, then when starting a new session and getting the links to a new ui, the theme selected in the previous session would be shown.

One or more namespaces failed to connect

[Bug]
Version: Local
Model: KoboldAI/fairseq-dense-125M

How it happened:
-Loaded a story
-Clicked on Submit

Console Log:

Min:374, Max:453, Txt:Niko is a small red kobold.
Niko has yellow, reptilian eyes and a long, scaly tail.
Niko is hungry and looking to steal something to eat.
Niko the kobold stalked carefully down the alley, his small scaly figure obscured by a dusky cloak that fluttered lightly in the cold winter breeze. Holding up his tail to keep it from dragging in the dirty snow that covered the cobblestone, he waited patiently for the butcher to turn his attention from his stall so that he could pilfer his next meal: a tender-looking  chicken. He crouched just slightly as he neared the stall to ensure that no one was watching, not that anyone would be dumb enough to hassle a small kobold. What else was there for a lowly kobold to do in a city? All that Niko needed to know was
[Author's note: Things are about to get crazy for poor Niko.]
 where to find the chicken and then how to make off with it.

A soft thud caused Niko to quickly lift his head. Standing behind the stall where the butcher had been cutting his chicken, he saw a pair of large brown eyes that were bright and wide-eyed. They were both wearing dark clothing and appeared to have been wearing gloves. Niko was leaning forward to look at them.

"What's wrong?" Niko asked, his voice shaking.

"Nothing," Niko said. "I'm fine."

The two men smiled at him. "You're okay, I guess."

He lifted his head, looking back at the pair of brown eyes. The expression on their faces was quite different than it had been in the past.

"Well, you can't see anything. You
Traceback (most recent call last):
  File "aiserver.py", line 4105, in generate
    genout, already_generated = tpool.execute(_generate, txt, minimum, maximum, found_entries)
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\eventlet\tpool.py", line 132, in execute
    six.reraise(c, e, tb)
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\six.py", line 719, in reraise
    raise value
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\eventlet\tpool.py", line 86, in tworker
    rv = meth(*args, **kwargs)
  File "aiserver.py", line 4029, in _generate
    genout = generator(
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context
    return func(*args, **kwargs)
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\transformers\generation_utils.py", line 1326, in generate
    return self.sample(
  File "aiserver.py", line 1468, in new_sample
    return new_sample.old_sample(self, *args, **kwargs)
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\transformers\generation_utils.py", line 2001, in sample
    if unfinished_sequences.max() == 0 or stopping_criteria(input_ids, scores):
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\transformers\generation_stopping_criteria.py", line 113, in __call__
    return any(criteria(input_ids, scores) for criteria in self)
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\transformers\generation_stopping_criteria.py", line 113, in <genexpr>
    return any(criteria(input_ids, scores) for criteria in self)
  File "aiserver.py", line 1499, in __call__
    koboldai_vars.actions.stream_tokens([utils.decodenewlines(tokenizer.decode(x[-1])) for x in input_ids])
  File "D:\Games\KoboldAI\koboldai_settings.py", line 818, in stream_tokens
    process_variable_changes(self.socketio, "actions", "Selected Text", {"id": self.action_count+1, "text": self.actions[self.action_count+1]['Selected Text']}, None)
  File "D:\Games\KoboldAI\koboldai_settings.py", line 45, in process_variable_changes
    sio.connect('ws://localhost:{}/?rely=true'.format(port))
  File "D:\Games\KoboldAI\miniconda3\lib\site-packages\socketio\client.py", line 347, in connect
    raise exceptions.ConnectionError(
socketio.exceptions.ConnectionError: One or more namespaces failed to connect

Vars cleanup

At the moment, the vars sheet that is available in the new interface has some shortcomings. Among them:

Missing vars for:

  • Error popup window (background, text color, title bar background color, title bar text color)
  • Token bar color (background color, border color) (can be tied to --setting_footer vars, so as it's a footer too)
  • Load Story Popup window (internal text color (Story Name, Action Count, Drag file(s)...))
  • Advanced Theme Editor Popup window (ok button text color and background color, internal text color (vars names text color))
  • Import a Story window ("Accept" and "Cancel" buttons (text color, background color))

Nonfunctional vars:

--tooltip_text (does not change anything, because tooltips are now a default browser text line, not a part of the interface that can be changed with CSS)
--tooltip_background (does not change anything, because tooltips are now a default browser text line, not a part of the interface that can be changed with CSS)
--wi_card_border_color_to_ai (I haven't seen anything change from changing the color of this var)
--radius_buttons (nothing changes from increasing/decreasing the value)

Missing rounding vars for:

  • Tabs
  • Load Model and Story (including Import a Story) Buttons
  • Submit and Undo/Retry/Redo Buttons
  • Advanced Theme and Add World Info Entry Buttons

Problematic vars:

--error_palette, --on_error_palette, --error_container_palette, --on_error_container_palette (due to the lack of appropriate vars in the advanced theme section they cannot be deactivated (#000000) if the theme does not support or partially supports the palette system)
--layer1_palette (affects the flyout menu background color and the sequence area background color, which also makes it impossible to deactivate (#000000) if the theme does not support or partially supports the palette system)

Missing vars to be added nonfunctional vars to be deleted/fixed and problematic vars to be fixed

Vars syncing

The problem is that if someone adds new vars, they don't go automatically into the themes' css files. Since changes are also made to the koboldai.css file, which affects all themes, the vars must also somehow be added automatically to all themes, not just one. Because if you add new vars to every theme (and I have three, for example), the more themes we have, the longer the process will take.
Note: vars colors should not overwrite each other because they are different in different themes. Vars should only be initially added for further editing by theme creators.

Stories should be sorted by alphabetical order and creation date too

Idea is to have three sorting options: by last opened, by alphabetical order and by creation date. There could be a button to switch between these sorting options or any other way to switch between them. So that we have a choice of what sorting to choose, not limited to the last opened sorting only.

World Info and Author's Note are empty (Colab problem)

Only occurs in the Colab version! There is no such problem in the local version.

Kobold does not see/erase World Info and Author's Note in the stories (and even in the story json files themselves) in both the new and old interface. When running the official version, there is no such problem and all WIs and ANs are displayed correctly.

one-some's opinion:

we basically get the data out of the save file bit by bit, eg first we do story, then we do authors note, etc
theres some error that occurs at the beginning of that area of code due to some save reading issue
the error causes the rest of the function to be aborted, so the authors note and wi is not loaded

How to cause it:

  1. Create a story in the old ui (in the official version)
  2. Fill the World Info and Author's Note with some information
  3. Save the story
  4. Load the story using this fork
  5. World Info and Author's Note are empty, and even absent in the json files

Error log:

loading /content/KoboldAI-Client/stories/At The Mercy of My Aunt.json
Exception in thread Thread-11:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.7/dist-packages/socketio/server.py", line 730, in _handle_event_internal
r = server._trigger_event(data[0], namespace, sid, *data[1:])
File "/usr/local/lib/python3.7/dist-packages/socketio/server.py", line 755, in _trigger_event
return self.handlers[namespace]event
File "/usr/local/lib/python3.7/dist-packages/flask_socketio/init.py", line 283, in _handler
*args)
File "/usr/local/lib/python3.7/dist-packages/flask_socketio/init.py", line 826, in _handle_event
ret = handler(*args)
File "aiserver.py", line 271, in g
return f(*a, **k)
File "aiserver.py", line 7198, in UI_2_load_story
loadRequest(file)
File "aiserver.py", line 6099, in loadRequest
loadJSON(js)
File "aiserver.py", line 6112, in loadJSON
load_story_v1(json_data)
File "aiserver.py", line 6168, in load_story_v1
data["text"] = data.pop("Text")
TypeError: 'str' object cannot be interpreted as an integer

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.