#ad_discordbot (Fork of Fork of xNul's bot)
1 messages · Page 25 of 1
In yaml, python, json, etc - a list is usually represented as [] where the values are inside, comma separated
In yaml there is an alternative format you will see used throughout the bot's settings examples, where instead of [] the list just has a hyphen for each value (some values are dictionaries, when you see multiple line items)
it has worked yippee
AFAIK, everything in the bot works 😅
Despite how much I invest into this personally (it's my baby) it's not widely popular so there could be unreported bugs lurking
It def sounds cool
finally put in the work to rewrite the servermode example card
ill need to test it out later date
bot is up and running 24-7 on my server pc so horray
Let me know how it works!
I’m still hesitant to code in what I mentioned, I think it would be too much hardcoded behavior. Trying to think of another solution for personalization thats more dynamic/configurable
Was thinking that maybe it could be simplified by a new command allowing every user to add some optional context, which only gets plugged in for their LLM gens. This feature would be toggled by bot ower and control max characters allowed per user
So the bot wouldn’t try learning about users they would just plug in their own bio
Basically how i was doing it
I had wrote usernames with little bios into the character card before
but it got super complicated mostly due to my retardation with yaml formatting
is this compatible with current versions of TWGUI?
Been trying to install the bot with the integration, but it seems to look for a conda file and an environment that the latest, portable WUI versions seem to not have
The bot is not compatible with the “portable” version of TGWUI (I need to add this to the README)
I might add compatibility at some point but it looked like a big PITA
To use the bot you can use the latest TGWUI just not the portable version
I see, thanks
@halcyon quarry how do i change the directory for the internal and user btw?
since im using google colab to do it rn and its kinda time consuming just to copy user and internal folder back and forth
It’s hardcoded… if you want to temporarily change it you can edit a line in modules/shared.py
theres no shared.py there
the line that defines ‘dir_internal’ could be changed to an arbitrary path
only utils_shared.py
Derp
is it that one?
Yeah that one
what about user?
same for dir_user
You may need to also add these paths in the config file, the setting for allowed save paths
The user one at least
@halcyon quarry should it be like this?
dir_internal = init_shared_paths(dir_root, '/drive/MyDrive/ColabNotebooks/internal', 'persistent settings not intended to be modified by users')
dir_internal = '/drive/MyDrive/ColabNotebooks/internal'
I don’t have experience with google collab but I’m going to assume this works
Whenever I update the bot again (eventually!) you may need to stash the custom utils_shared.py and edit the lines back in again
@late pivot did it work out?
Yeah it did
Merry Christmas fellas 🎅
Merry Christmas altoid
Merry Christmas 🎅
Merry Christmas >^-^<
Happy New Year 🎉
quick report: Bot still working great with latest TGWUI.
updated now after a month or so 😛
Might start developing again soon
I need to add a Delete Nodes “step” for StepExecutor, make an example workflow to run a Wan 2.2 SVI, with discord options to select number of chunks, etc - then post it on Redit
People’s brains 🤯
Apparently I'm totally out of touch lol https://github.com/altoiddealer/ad_discordbot/wiki/stepexecutor#comfy_delete_nodes
The shower thought I had was to add something like a "delete until" param so it just traverses the flow deleting nodes until it hits the specified node ID
i will touch comfy in 2026 probably
How about January 3, 2026 😄
If and when you do, I recommend you install it via this guys solution here https://github.com/Tavris1/ComfyUI-Easy-Install
This guy is on top of it - and when shit hits the fan with the Comfy install it's as simple as double-clicking the correct .bat file in this
Custom node packs and comfy updates tend to constantly break dependencies
i mean there is a exe installer for comfy, cant get easier but portable is a huge +
The exe installer seems even more problematic to me IMO
I messed with it a bit and it’s very uncanny
Sageattention, triton, nunchaku - all manageable without this easy installer thing but really a huge PITA
Essential packages IMO. If any of these break it’s just a double click to fix w/ the easy installer
@halcyon quarry whats wrong with this one?
i installed a brand new text gen webui and the plugin
It generated no tokens
I think we went through this in the past - likely some incompatible model params + payload params
Truncation length, context size, chat prompt length
If you backed up your TGWUI’s user > models > config
And backed up your bot’s user > settings > dict base settings
That would be ideal
So I need some help i cloned it in the same folder as TGWUI but whenever i go to install it, it keeps saying im in the wrong environment im not sure what im doing wrong.
Trying to activate Conda from: /mnt/DATA/Ai/Discord/text-generation-webui/installer_files/conda/bin/conda
Conda activated successfully.
- Bot is unexpectedly running in the environment of 'b'''.
Please refer to 'https://github.com/altoiddealer/ad_discordbot/wiki/installation'
Only attempt installing with 'text-generation-webui integration' if ad_discordbot is in it's directory.
thars what i get when i try to install it
if your are trying to install in wsl, 😅 i think it is not fully tested
but in this case, you can check if your ad_discordbot folder is under text-generation-webui
@timid swan Yes, please confirm what OS you are trying to install with.
Also, please confirm that you are not using the "portable" version of TGWUI
i am using kubuntu 24.04 and i have the folder in the directory and i am not using the portable version.
Good morning
So ChatGPT basically wrote my installers, which I had to fine tune a bit
It’s much better now - I’m going to see if I can debug the error today
@timid swan ping me when you are available - I might have the fix
I went on to something else other than discord but if there is a fix that'd be cool
I'm double checking one last thing to ensure I'm not wasting your time 😛
Oki cool i'll have to do it later tho ive been working on AI stuff all day >w<
I believe that if you replace this file and try again, you'll launch up correctly:
text-generation-webui\ad_discordbot\one_click.py
Do not replace TGWUI's one_click.py
I'll tell you this though - if you get a grip on my bot it is extremely powerful
No one realizes it yet but my bot IS the most powerful tool to use ComfyUI remotely
Alright thanks I will give it a try tomorrow cuz I need to sleep soon lmao
I am eager to know if this solved your issue
Sleep well - I'll greatly appreciate it if you do indeed test and report 🥹
I will sure owo
trying it now will report shortly
damn it works thanks a bunch omigosh now i got a discord option
i got one more question now that ive started it up how do i access it through TGWUI?
do i launch the bot and the TGWUI server separately or?
@halcyon quarry
Heya
This does not use TGWUI's API - this bot imports some TGWUI code and directly executes it
So if you launch TGWUI - that is a completely separate instance
If you check out my Wiki I strongly recommend skimming through the Getting Started
The main page also has a lot of good info
oki i will check it
Are you using ComfyUI, or planning to at all with the bot?
Anyway, it is extremely easy to call ComfyUI from the bot's features (Tag system, Custom Commands feature)
I've not looked into comfyUI im kinda new to this whole thing
That is definitely a whole 'nother can of worms
i only just found out i could run an LLM locally and now im stoaked cuz i dont have to pay $$$ for rp
just was looking for discord bots so i could have my friend rp with them with me but ive been looking into Agnaistic too
Read up on my wiki about the Tags system
It's primarily for trigger phrase based effects - but you can get extremely creative with it in terms of swap_character, background prompting the character, etc
Basically can tweak the context in the background a bit when certain things are written
manipulate history - all that jazz
oki i decided to go with Agnai for now as it has lorebooks and chat summarisation features but i will look into your bot further tho thanks for all the help
glad i could help fix a problem tho hahaha
Yes I am never happy to learn about bugs in the code 😄 Need to swat those ASAP
new profile photo :O
:O
looks familiar 😅 https://github.com/moltbot/moltbot
Are you suggesting it’s anything like this bot?
Doesn’t even seem inspired
You checked out that new Qwen TTS?
ill check that out, like most tts cant do 48khz so...
same thing but more platform and improved features :v
also they are actively changing its name so i think they sold the project
all the preview ive found are using bad audio input and the output are not that good, maybe it is better than index tts and faster, but in terms of preference i like gpt sovits more
although qwen tts generates 24khz audio, a good 24khz could be quite good, because i liked kokoro tts
so i think ill try it soon
I've been trying to tackle some complicated ComfyUI payload manipulation logic - basically, in the UI when you select and delete nodes it will usually correctly rerout input and output connections automatically. ChatGPT has wrote me some code that was doing the same thing, but it was failing for certain complex situations where a node outputs to multiple nodes, etc.
I went back and forth with the trial ChatGPT v5 model and eventually it concluded that there was not enough information available from the JSON payload structure - that these situations are only handled properly in the web UI because there is more data available in the web view.
Kept spinning my wheels, spinning my wheels...
I open a new chat with the lesser free model, sharing the current code and pose the same problem.
The fucking thing solves it
Python methods like this don't seem to exist in the Comfy codebase, there's some crazy javascript in the graph UI library that handles it, so this is basically all whipped up from scratch by ChatGPT
🤯
This is a win for the bot bc this is very useful for handling optional inputs. For example you could have a payload designed to accept a number of reference images (these newer image editing models like Qwen edit and Klein can use one or many). A custom command can now have optional attachment inputs, and if not provided can conditionally delete/reroute the nodes
I've got this working very nicely now - verrrry nicely
This method can now operate using a "delete_until" logic which is a node or list of nodes.
It will start at each node in delete_nodes and walk all downstream outputs, deleting and rerouting the connections until it hits any of the delete_until nodes - at which point that branch will stop.
This means the bot can now delete and reroute massive chunks of nodes by just defining start and end points, rather than a manual list of every node
for this example, it will delete all the invalid nodes if a second reference image is not attached to the command
It is successfully collapsing daisy-chained LatentReference nodes (positive and negative conditioning branches)
This is really cool shit 😛
I've pushed the new developments to Main.
This update:
- adds an example "custom slash command" for Flux2 Klein 9B image editing via ComfyUI
- Greatly improves the logic for the processing step
comfy_delete_nodes - Fixes logic for "If" processing step when checking condition
exists or notexists - Improves handling of discord attachments via custom slash commands
Just pushed another update which greatly improves the "inject_bot_vars_to_payload" utility scripts
- Now comes with template files that can be copied and edited
- Usage instructions greatly improved
- Better logging
Now, formatting API payloads for the bot's Variable management system is a breeze 🍃
✅
@halcyon quarry how do i change the directory for google colab again? i wanna change to the google colab and the utils_shared.py doesnt work
since ive been just copying the user directory to the google colab instead of using one in my drive
and doing that is very unreliable since if the google colab gets disconnected nothing will get saved
I’m not versed in thus
This*
It’s joining bot root dir with that directory you provided
Use print() if you need to check any values
where do i put it?
Example after the dir_root = line you can add a new line
print(“dir doot:”, dir_root)
you can check other values this way and see if they are as expected
You might need to copy paste the code including print lines, and print results in CMD and ask an LLM
Google colab may need different handling idk
@late pivot So? Get it or nah?
yeah it works
turns out you only gave me the line for the internal
not the user too
since the user holds everything like the character, bot token and the other it doesnt work if you didnt include it
heres the version for the drive
from google.colab import drive
drive.mount('/content/drive')
mounting the drive should be like this
@halcyon quarry how do I make it so it writes the output immediately after it is generated?
Since in the history it saved the message after some time
So when the Google colab gets disconnected only some of the message gets saved
I think I’ll just add a setting for this tomorrow so you don’t have to patch files
It’s sensible
@late pivot just pushed a change now
New setting is called buffered_saving found in config.yaml
Change it to False and the history will save immediately after generating instead of waiting
where is the settings located?
user?
internal?
you need to add it from settings templates/config
Goes in user/settings/config
Seems like discord is about to be very annoying with a new privacy invasion verification shit
agree
i dont know why all the latest ai stuffs are chinese, at least those i hear lately
specially the seedance, my reaction, no words, pure emoji: 👀 🤔 🧐 🤯 👍
https://www.youtube.com/watch?v=-MluR9dqt5w
Which AI Video Generator is the BEST in 2026? I put Kling 3.0, Seedance 2.0, OpenAI's Sora 2, and Google Veo 3.1 head-to-head to see which one wins.
🚀 Sign up for Seedance 2.0 access: https://higgsfield.ai/seedance/2.0
In this video, I use 20 identical prompts across all four models to generate 80 videos, testing everything from complex phy...
Lets see if it actually took off
There’s a lot of disappointment, outrage and blowback but I think they’re gonna do it anyway
the voice is smooth, the quality feels like talking with a wall in the middle, and the speed is questionable, it is running on gpu so idk
What’s your current fav TTS solution?
this one
Thanks, need to check it out finally
after all, if i have to tell which has the highest "quality" i'd say kokoro, the only problem is that it sounds flat
same text
blind guess/judge 🤗
||2 sounds the best to me, it doesn't have that "metallic" for lack of better words harshness to it.
1, flows better compared to 3 which has some odd intonations||
Couple examples using flux klien for image edit via the bot, using confyui api
This model is so good for being so light and fast
It’s like 10 seconds for these
The quality of the diamond shower knob reflections
So good at preserving the original image
Wow B sounds so good
What is it
Link to github 🙂
I need to do some TTS work atm, would love to check that out
I've just remembered that I had an audio enhancer :V
So that one is actually qwen
Taking me 80s to generate 😱
@valid crypt would you be able to do me a favor and just generate a block of text using that voice 😄
I've got an annoying coworker asking me to pull a favor, making a talking head with custom message
Another day of sunshine, Seevan’s smile is glowing bright. We’re gathered here around you, to celebrate Seevan tonight! So, take a breath and make a wish, let your heart decide. May all your wishes and dreams come true, we’ll always be here by your side.
Just say if it's going to be public or not because I'm pretty sure the voice is copyrighted
It's just something he's going to share with his daughter for birthday thing, nothing commercial coming from this
If the rng wasn't good enough I can get a few more
It'll do!
Ugh - looks like there might be TGWUI changes to catch up with soon 😄
Yeah so he just merged it
moment of truth
it's like 150 commits
Among other things he removed ExLlama_v2 model loader
(not a bot thing)
After updating TGWUI, will definitely need to re-run my updater script
Added two new param keys
So far that's it - we're good to go
There's an interesting change here regarding TGWUI extensions
I combed through all the new commits and I think nothing else really affects the bot
looks like a lot of improvements with TGWUI internal processing
This makes it so extension devs can add _skip_output_extensions to the state dict
It’s a pretty bizarre feature, what this does is allows an extension dev to ensure that other extensions can’t process the final output
I wonder what use case this is practical for
Oh wow, he solved closed as completed but didn’t actually solve this Issue I posted forever ago
Don't think he didn’t actually solved them though heh
nice
This is pretty interesting... TGWUI just got "tool calling" functionality
although its a bit limited
limited feels safe i guess, i remember that there was a guy on yt pointing out that many bad people are exploiting openclaw to execute codes, steal info, etc, and many exposed instances :v
something like that, we are safe so 😁
the whole idea of openclaw is you give it unrestricted access to your personal data and the open internet at the same time
in other words, if you install openclaw as prescribed by official usage you are basically just intentionally malwaring yourself
the people running openclaw without being total idiots have it set up in a VM with access to nothing and are just playing with it
or have it running it a VM with access to exactly one thing at a time that they want it operating on and nothing else
😁
also ive been trying the Qwen3.5-35B-A3B althouth not in tgwui, really good model, very smart and fast, and most importantly with some tweaks you can lose some performance but greatly reduce the vram usage, but instead you use more ram?
basically ive reached 33tok/s at 32k context 19% filled, with 11.3gb of vram
Pushed an update that catches up with TGWUI internal default settings
Recommend updating state dict in your dict_base_settings.yaml (copy/paste from settings_templates)
@halcyon quarry the bot doesn't respond unless you choose a character first
Usually it should've just responded to me already with the previous selected character
Now I have to select a character before it responds to me
Idk I just downloaded it new
Might be the tgwui tho since it happened aswell using colab
Does cmd print look perfectly normal?
Feel free to open official Issue on GitHub when having problems, too
Works fine for me 🙂 Although TGWUI recently discontinued ExLlama V2 loader
I had to change my launch flags to use a different default model/loader b/c I was using that
But that is apparent from cmd print
It looked perfectly normal other than the error of no character selected
Even though it said the character was loaded
Are you able to reproduce that, and share a screenshot or copy/paste that part of the cmd?
21:00:18.509 #7005 INFO [bot.main]: • Processes messages at uncapped speeds, and will never go idle. (responsiveness: 1.0)
21:00:18.516 #5756 INFO [bot.main]: Mode is set to "chat".
21:00:18.630 #304 INFO [bot.main]: ----------------------------------------------
21:00:18.631 #305 INFO [bot.main]: Bot is ready
21:00:18.632 #306 INFO [bot.main]: Use Ctrl+C to shutdown the bot cleanly
21:00:18.633 #307 INFO [bot.main]: ----------------------------------------------
21:01:05.787 #4614 ERROR [bot.main]: Error running task on_message: 'character_menu'
Traceback (most recent call last):
File "C:\text-generation-webui-main\text-generation-webui-main\ad_discordbot\bot.py", line 4588, in run_and_cleanup
task.init_self_values()
~~~~~~~~~~~~~~~~~~~~~^^
File "C:\text-generation-webui-main\text-generation-webui-main\ad_discordbot\bot.py", line 4232, in init_self_values
history_char, history_mode = get_char_mode_for_history(settings=self.settings)
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\text-generation-webui-main\text-generation-webui-main\ad_discordbot\bot.py", line 8272, in get_char_mode_for_history
character = state_dict["character_menu"] or 'unknown_character'
~~~~~~~~~~^^^^^^^^^^^^^^^^^^
KeyError: 'character_menu'
KeyError: 'character_menu'
21:02:23.309 #5871 INFO [bot.main]: wolgm used "/character": "Assistant"
21:02:23.311 #4594 INFO [bot.main]: Running task 'change_char' from queue 'history_queue'
21:02:23.999 #7002 INFO [bot.main]: Assistant's Behavior:
21:02:24.000 #7005 INFO [bot.main]: • Processes messages at uncapped speeds, and will never go idle. (responsiveness: 1.0)
21:02:24.007 #5756 INFO [bot.main]: Mode is set to "chat" in servers.
21:02:24.008 #984 INFO [bot.modules.history]: Creating new history for "1458032531256377387_Assistant_chat".
21:02:24.008 #3876 INFO [bot.main]: Character loaded: Assistant
21:02:24.478 #5791 INFO [bot.main]: Updated discord client profile: (display name: Assistant; Avatar: Unchanged).
21:02:24.478 #5792 INFO [bot.main]: Profile can be updated again in 10 minutes.
21:02:25.383 #432 WARN [bot.main]: [Post Active Settings] This feature is enabled, but a channel is not yet set for server 'servers'.
21:02:25.383 #433 WARN [bot.main]: [Post Active Settings] Use command '/set_server_settings_channel' to designate a 'settings channel'.
21:02:32.019 #8315 INFO [bot.main]: Internal history file will be saved to: C:\text-generation-webui-main\text-generation-webui-main\ad_discordbot\internal\history\1458032531256377387\Assistant_chat\20260327-21-02-32.json
21:02:32.020 #4594 INFO [bot.main]: Running task 'on_message' from queue 'message_queue'
But I just updated the tgwui?
They used to require a "character_menu" key to be included in the payload - I recently refreshed the default payload to ommit this
lemme test slightly more...
still same version
Please try replacing bot.py with this one (back up your current one)
OH
I see the issue I think
That should solve it though
Let me know if that resolves it - if so, I'm pushing to main
@late pivot let me know if you are able to try this out
Wait
Great works fine
What was the issue?
I removed a key that TGWUI no longer uses
But didn't realize my code was still trying to access it elsewhere 🙂
Alr
Pushed a critical update to keep up with TGWUI
Side note - it's very cool that he already added support for gemma 4
ooba is on his game 
If anyone has trouble updating TGWUI - see this Issue
https://github.com/oobabooga/text-generation-webui/issues/7460
gemma 4 is thing already? that was fast
only smaller models, which are the 4.5b and the 2.3b
👋
hmm
That second error looks like something I may have just recently broke.
@late pivot could you copy and paste the text from cmd
21:17:39.626 #5764 ERROR [bot.main]: Error loading character. Check spelling and file structure. Use bot cmd '/character' to try again. unsupported operand type(s) for /: 'str' and 'str'
Traceback (most recent call last):
File "C:\text-generation-webui\ad_discordbot\bot.py", line 5690, in character_loader
_, name, _, greeting, context = custom_load_character(char_name, '', '', try_tgwui=tgwui_enabled)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\text-generation-webui\ad_discordbot\modules\utils_chat.py", line 137, in custom_load_character
name1, name2, picture, greeting, context = load_bot_character(char, n1, n2, should_warn)
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\text-generation-webui\ad_discordbot\modules\utils_chat.py", line 111, in load_bot_character
picture = generate_pfp_cache(character)
File "C:\text-generation-webui\ad_discordbot\modules\utils_chat.py", line 29, in generate_pfp_cache
path = shared_path.dir_user_characters / f"{character}.{extension}"
~~~~~~~^
TypeError: unsupported operand type(s) for /: 'str' and 'str'
1:15:16.002 #4594 INFO [bot.main]: Running task 'on_message' from queue 'message_queue'
21:15:16.176 #2219 ERROR [bot.main]: An error occurred in llm_gen(): replace() argument 2 must be str, not None
Traceback (most recent call last):
File "C:\text-generation-webui\ad_discordbot\bot.py", line 2206, in llm_gen
async for resp_chunk in process_responses():
...<4 lines>...
num_chunks += 1
File "C:\text-generation-webui\ad_discordbot\bot.py", line 2131, in process_responses
async for streaming_response in generate_in_executor(func):
...<37 lines>...
yield chunk
File "C:\text-generation-webui\ad_discordbot\modules\utils_asyncio.py", line 161, in generate_in_executor
result, is_done = await loop.run_in_executor(None, get_next_generator_result, gen)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\text-generation-webui\installer_files\env\Lib\concurrent\futures\thread.py", line 59, in run
result = self.fn(*self.args, **self.kwargs)
File "C:\text-generation-webui\ad_discordbot\modules\utils_asyncio.py", line 29, in get_next_generator_result
result = next(gen)
File "C:\text-generation-webui\modules\chat.py", line 1091, in chatbot_wrapper
prompt = generate_chat_prompt(text, state, **kwargs)
File "C:\text-generation-webui\modules\chat.py", line 293, in generate_chat_prompt
chat_template_str = replace_character_names(chat_template_str, state['name1'], state['name2'])
File "C:\text-generation-webui\modules\chat.py", line 1910, in replace_character_names
text = text.replace('{{user}}', name1).replace('{{char}}', name2)
TypeError: replace() argument 2 must be str, not None
15:04.571 #99 INFO [bot.modules.apis]: Checking if client 'SD Forge' is a known API
21:15:04.571 #91 INFO [bot.modules.apis]: SD Forge recognized as Forge.
21:15:04.573 #178 INFO [bot.modules.apis]: Registered main imggen client: SD Forge
21:15:06.618 #942 WARN [bot.modules.apis]: [SD Forge] Connection error to http://127.0.0.1:7860/, attempt 1/1
21:15:06.619 #516 WARN [bot.modules.apis]: [SD Forge] disabled. Use '/toggle_api' to try enabling it when available.
21:15:06.892 #99 INFO [bot.main]: The bot is installed with text-generation-webui integration. Loading applicable modules and features.
21:15:10.867 #176 ERROR [bot.main]: Error trying to load character data: unsupported operand type(s) for /: 'str' and 'str'
21:15:10.905 #304 INFO [bot.main]: ----------------------------------------------
21:15:10.906 #305 INFO [bot.main]: Bot is ready
Making progress...
If you copy and paste http://127.0.0.1:7860/ into the browser, you get Forge UI?
I don't use forge ui
OK
I might have image gen enabled by default
SO we can ignore that error for the moment
@late pivot I just pushed an update that should resolve the problem
Alright thank you
Which file do I get?
If you just run the updater script, should do the trick
I only changed /modules/utils_chat.py
oobabooga is a much more capable coder than I am - and when it comes to the few code snippets that this project copies, I aim to keep up with those
In this case I misunderstood something he did
works fine now
thanks for the update
Thanks for reporting it!
Found this sitting in the mess that is my Desktop.
The initial structure I had in mind for what is now the completed Universal APIs feature
Actually nvm this was a dumbed down overview of my structure, to more easily add context to my ChatGPT prompts
TGWUI has been renamed to “TextGen”
oh no the frog is gone 🥲
Welp, I pushed a hotfix to allow the bot to detect the new naming (or old)
Need to spend a bit of time reviewing my existing code
The integration is a bit of a PITA to maintain 🤗
Traceback (most recent call last):
File "/content/text-generation-webui/ad_discordbot/bot.py", line 2206, in llm_gen
async for resp_chunk in process_responses():
...<4 lines>...
num_chunks += 1
File "/content/text-generation-webui/ad_discordbot/bot.py", line 2131, in process_responses
async for streaming_response in generate_in_executor(func):
...<37 lines>...
yield chunk
File "/content/text-generation-webui/ad_discordbot/modules/utils_asyncio.py", line 161, in generate_in_executor
result, is_done = await loop.run_in_executor(None, get_next_generator_result, gen)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/content/text-generation-webui/installer_files/env/lib/python3.13/concurrent/futures/thread.py", line 59, in run
result = self.fn(*self.args, **self.kwargs)
File "/content/text-generation-webui/ad_discordbot/modules/utils_asyncio.py", line 29, in get_next_generator_result
result = next(gen)
File "/content/text-generation-webui/modules/chat.py", line 1146, in chatbot_wrapper
prompt = generate_chat_prompt(text, state, **kwargs)
File "/content/text-generation-webui/modules/chat.py", line 361, in generate_chat_prompt
preserve_thinking=state['preserve_thinking'],
~~~~~^^^^^^^^^^^^^^^^^^^^^
KeyError: 'preserve_thinking'
why every tgwui update breaks the discord bot
also is it possible to just use it without the tgwui integration?
cant use the standalone too
Thanks for the report - I need to fix that
Also does the utils_shared.py still works if you use the standalone?
I need to add that one new key
Since sometime I switch to the colab version and uses the drive to save it
Yes
Great
I’m not sure what the default value is for that new key but simply adding the key in “state” in basesettings
Would temporarily fix the error
Willpush update soon
Ping me if you did so I can test it
@halcyon quarry is it finished?
Just got home - slappin it in there now
@late pivot All good now!
(should be)
What fixed?
- Added the new key
preserve_thinking - I had made an oversight with a recent change, causing that error when launching in "standalone"
Fixed this
The big picture plan for the bot, is to remove the TextGen integration.
It's actually a very big to-do, and I've been a bit lazy. I'm going to try and tackle it soon, though.
I'm installing everything rq
Also since I have a thinking model how do I hide the thinking process?
Or just make it not think?
I had added code that I expected to handle thinking blocks gracefully (basically, split it out into a "thought bubble" like in the web UI)
I haven't been using the text gen features of the bot lately, and also had not used thinking models much. I'm not sure if its working as intended.
Ok
If it's not working well, then disable thinking 🙂
Or perhaps if you have results to share we could try debugging
Ultimately, the bot will be updated to remove the integration and just use the API.
Similar to how it handles the Image gen and TTS gen - with a lot of convenience baked in
Standalone still has the same problem
Also I think you forgot to publish it
Nvm you did I forgot to refresh the GitHub
All good then?
The standalone still has same problem
But the bot replies now
So the only one that is still broken is the standalone
It looks like I had made yet another oversight
Which should be all fixed up now
I had started renaming all my internal labels and variables that were “tgwui” and “text-generation-webui” with “textgen” and after a few minutes realized it was a bad idea.
But I messed up slightly walking back those changes
@late pivot lmk when you get a moment to try one more time 🤗
Sure
I'm in church rn so ill try it in about 3-4 hours
Latest version of TGWUI portable has an optional dedicated Desktop app UI
which, portable version currently unsupported by this bot
I need to rework the LLM features sooner than later - very daunting task
I see, changed the name because it's switching to desktop app
Heya
ah, wrong channel
Is it?
I searched for a previous issue, and it brought me here
Ill move it somewhere else
Been back and forth between generating images and videos, and playing a Diablo 2 mod 😎
Yeah dry sequence breakers caused some isssues with my bot, bc the expected value type had changed
It was originally expected as a stringified list (string value of a list), I think now its expects list object
Or vice versa, I forget but it was mildly annoying
👀
Sorry if it was said somewhere in here before, but is it possible to run a different tts modal? Like, faster qwan3 tts or something similar?
you have to specify a little, this channel is primarily about a discord bot for textgen, there is a integrated pipeline to use tts extensions as the tts engine, and in recent version op added api feature, making tts does not require any extension, but just defining the api for any tts with api feature
so you can technically run any model
Is the discord bot currently working or does it need to be updated due to the new name for text-gen?
Um... sorry very new to all this. I was asking about the extension itself. But if I understood you correctly then all I need to do is define or give the tts model the discord bot extensions api and it should work?
yes https://github.com/altoiddealer/ad_discordbot/blob/main/settings_templates/dict_api_settings.yaml here is an example for alltalk
Sorry didn’t see ur msg until now - last I checked everything working. However - probably not working with “portable” version
There’s numerous TTS packages that have API support meaning they’re not bound to any particular parent software such as TextGen
The bot is currently capable of using Textgen TTS extensions, or API enabled packages.
If you run into any trouble, @ mention me
Okay, thanks for the offer but if I do encounter any trouble it is most definitely going to be because I lack a lot of coding knowledge lol
If you check out the Getting Started in the Wiki - and follow the example stuff I included, everything is kind of straight forward
Ideally at some point the settings management would have a nice friendly GUI like a Gradio interface, but it's like ridiculously complicated to create something like that