#ad_discordbot (Fork of Fork of xNul's bot)

1 messages · Page 25 of 1

turbid jungle
#

yeah that makes sense, I was going off the screenshot

halcyon quarry
#

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)

turbid jungle
#

it has worked yippee

halcyon quarry
#

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

fickle ember
#

It def sounds cool

fickle ember
#

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

halcyon quarry
#

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

halcyon quarry
#

So the bot wouldn’t try learning about users they would just plug in their own bio

fickle ember
#

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

brisk trout
#

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

halcyon quarry
#

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

brisk trout
#

I see, thanks

late pivot
#

@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

halcyon quarry
#

It’s hardcoded… if you want to temporarily change it you can edit a line in modules/shared.py

halcyon quarry
#

the line that defines ‘dir_internal’ could be changed to an arbitrary path

late pivot
#

only utils_shared.py

halcyon quarry
#

Derp

late pivot
#

is it that one?

halcyon quarry
#

Yeah that one

late pivot
halcyon quarry
#

yep 👍🏻

#

dir_internal = “<the path you want it to be>”

late pivot
halcyon quarry
#

same for dir_user

late pivot
#

alr tx

#

thx

halcyon quarry
#

You may need to also add these paths in the config file, the setting for allowed save paths

#

The user one at least

late pivot
#

@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')

halcyon quarry
#

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

halcyon quarry
#

@late pivot did it work out?

late pivot
halcyon quarry
#

Merry Christmas fellas 🎅

fickle ember
#

Merry Christmas altoid

valid crypt
#

Merry Christmas 🎅

terse folio
#

Merry Christmas >^-^<

valid crypt
#

Happy New Year 🎉

halcyon quarry
#

6 more hours here 🙂

#

Happy NY 🥳

halcyon quarry
#

quick report: Bot still working great with latest TGWUI.

#

updated now after a month or so 😛
Might start developing again soon

halcyon quarry
#

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 🤯

halcyon quarry
#

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

valid crypt
#

i will touch comfy in 2026 probably

halcyon quarry
#

How about January 3, 2026 😄

#

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

valid crypt
#

i mean there is a exe installer for comfy, cant get easier but portable is a huge +

halcyon quarry
#

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

late pivot
#

@halcyon quarry whats wrong with this one?

#

i installed a brand new text gen webui and the plugin

halcyon quarry
#

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

timid swan
#

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.

GitHub

Discord bot which transforms your servers into hubs for limitless local AI-driven interaction and content creation. Features cutting-edge tools for professionals, and unlocks creative fun for casua...

#

thars what i get when i try to install it

valid crypt
halcyon quarry
#

@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

timid swan
halcyon quarry
#

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

halcyon quarry
#

@timid swan ping me when you are available - I might have the fix

timid swan
halcyon quarry
#

I'm double checking one last thing to ensure I'm not wasting your time 😛

timid swan
#

Oki cool i'll have to do it later tho ive been working on AI stuff all day >w<

halcyon quarry
#

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

timid swan
#

Alright thanks I will give it a try tomorrow cuz I need to sleep soon lmao

halcyon quarry
#

I am eager to know if this solved your issue

#

Sleep well - I'll greatly appreciate it if you do indeed test and report 🥹

timid swan
#

I will sure owo

timid swan
#

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

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

timid swan
#

oki i will check it

halcyon quarry
#

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)

timid swan
#

I've not looked into comfyUI im kinda new to this whole thing

halcyon quarry
#

That is definitely a whole 'nother can of worms

timid swan
#

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

halcyon quarry
#

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

timid swan
#

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

halcyon quarry
#

Yes I am never happy to learn about bugs in the code 😄 Need to swat those ASAP

halcyon quarry
#

Pushed the launcher fix to Main

#
  • Linux launcher now confirmed to be working 😯
valid crypt
#

new profile photo :O

halcyon quarry
#

Well, new old 😛

#

I was using this image for a long time before the other

valid crypt
#

:O

valid crypt
halcyon quarry
#

Are you suggesting it’s anything like this bot?

#

Doesn’t even seem inspired

#

You checked out that new Qwen TTS?

valid crypt
valid crypt
valid crypt
valid crypt
#

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

halcyon quarry
#

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

#

🤯

halcyon quarry
#

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

halcyon quarry
#

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 😛

halcyon quarry
#

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
halcyon quarry
#

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 🍃

valid crypt
#

late pivot
#

@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

halcyon quarry
#

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

late pivot
halcyon quarry
#

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

halcyon quarry
#

@late pivot So? Get it or nah?

late pivot
#

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

late pivot
#

@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

halcyon quarry
#

It’s sensible

halcyon quarry
#

@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

late pivot
#

user?

#

internal?

halcyon quarry
#

Goes in user/settings/config

halcyon quarry
#

Seems like discord is about to be very annoying with a new privacy invasion verification shit

valid crypt
#

agree

valid crypt
#

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...

▶ Play video
halcyon quarry
#

Yeah video AI is taking off like a rocket

#

Open source models are also kickin ass

halcyon quarry
#

There’s a lot of disappointment, outrage and blowback but I think they’re gonna do it anyway

valid crypt
halcyon quarry
#

What’s your current fav TTS solution?

valid crypt
#

this one

halcyon quarry
#

Thanks, need to check it out finally

valid crypt
#

after all, if i have to tell which has the highest "quality" i'd say kokoro, the only problem is that it sounds flat

valid crypt
terse folio
# valid crypt 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||

valid crypt
halcyon quarry
#

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

halcyon quarry
#

What is it

#

Link to github 🙂

#

I need to do some TTS work atm, would love to check that out

valid crypt
#

I've just remembered that I had an audio enhancer :V

#

So that one is actually qwen

#

Taking me 80s to generate 😱

halcyon quarry
#

@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.
valid crypt
#

Just say if it's going to be public or not because I'm pretty sure the voice is copyrighted

halcyon quarry
#

It's just something he's going to share with his daughter for birthday thing, nothing commercial coming from this

valid crypt
#

Alr

halcyon quarry
#

👏

#

Thanks my dude

valid crypt
#

If the rng wasn't good enough I can get a few more

halcyon quarry
#

It'll do!

halcyon quarry
#

Ugh - looks like there might be TGWUI changes to catch up with soon 😄

halcyon quarry
#

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

halcyon quarry
#

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

halcyon quarry
#

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

halcyon quarry
#

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

valid crypt
#

nice

halcyon quarry
#

This is pretty interesting... TGWUI just got "tool calling" functionality

#

although its a bit limited

valid crypt
#

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 😁

calm rain
#

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

valid crypt
#

😁

#

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

halcyon quarry
#

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)

late pivot
#

@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

halcyon quarry
#

Ill look into that

#

Is this after or just recently updating the Bot? TGWUI?

late pivot
#

Might be the tgwui tho since it happened aswell using colab

halcyon quarry
#

Does cmd print look perfectly normal?

#

Feel free to open official Issue on GitHub when having problems, too

halcyon quarry
#

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

late pivot
#

Even though it said the character was loaded

halcyon quarry
#

Are you able to reproduce that, and share a screenshot or copy/paste that part of the cmd?

late pivot
# halcyon quarry Are you able to reproduce that, and share a screenshot or copy/paste that part o...

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'

halcyon quarry
#

I think I know the issue here

#

Well, you may be on slightly outdated TGWUI

late pivot
halcyon quarry
#

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...

late pivot
#

still same version

halcyon quarry
#

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

halcyon quarry
#

@late pivot let me know if you are able to try this out

late pivot
#

Wait

late pivot
#

What was the issue?

halcyon quarry
#

I removed a key that TGWUI no longer uses

#

But didn't realize my code was still trying to access it elsewhere 🙂

late pivot
#

Alr

halcyon quarry
#

I pushed that change to Main now. It's just 1 line

#

Sorry for the inconvenience

halcyon quarry
#

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 oobabooga

valid crypt
#

gemma 4 is thing already? that was fast

halcyon quarry
#

Indeed!

#

I think from what I was reading it can interpret audio

valid crypt
#

only smaller models, which are the 4.5b and the 2.3b

late pivot
#

when switching character too

halcyon quarry
#

👋

#

hmm

#

That second error looks like something I may have just recently broke.

#

@late pivot could you copy and paste the text from cmd

late pivot
#

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

halcyon quarry
#

thank you

#

checking now

late pivot
#

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

halcyon quarry
#

Making progress...

halcyon quarry
halcyon quarry
#

OK

late pivot
#

Also I just re install it fresh

#

Like text gen and ad discord bot

halcyon quarry
#

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

late pivot
#

Which file do I get?

halcyon quarry
#

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

late pivot
#

thanks for the update

halcyon quarry
#

Thanks for reporting it!

halcyon quarry
#

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

halcyon quarry
#

TGWUI has been renamed to “TextGen”

valid crypt
#

oh no the frog is gone 🥲

halcyon quarry
#

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 🤗

late pivot
#

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

halcyon quarry
late pivot
halcyon quarry
#

I need to add that one new key

late pivot
#

Since sometime I switch to the colab version and uses the drive to save it

late pivot
#

Great

halcyon quarry
#

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

late pivot
late pivot
#

@halcyon quarry is it finished?

halcyon quarry
#

@late pivot All good now!

#

(should be)

late pivot
halcyon quarry
#
  • 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.

late pivot
#

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?

halcyon quarry
#

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.

halcyon quarry
#

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

late pivot
#

Also I think you forgot to publish it

#

Nvm you did I forgot to refresh the GitHub

halcyon quarry
late pivot
#

But the bot replies now

#

So the only one that is still broken is the standalone

halcyon quarry
#

Hmm

#

Lemme go check that…

halcyon quarry
#

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

halcyon quarry
#

@late pivot lmk when you get a moment to try one more time 🤗

late pivot
#

I'm in church rn so ill try it in about 3-4 hours

halcyon quarry
#

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

valid crypt
#

I see, changed the name because it's switching to desktop app

halcyon quarry
#

Heya

austere trout
#

ah, wrong channel

halcyon quarry
#

Is it?

fickle ember
#

Peepee poopoo

#

Wsg Altoiddealer

austere trout
#

I searched for a previous issue, and it brought me here

#

Ill move it somewhere else

halcyon quarry
#

Been back and forth between generating images and videos, and playing a Diablo 2 mod 😎

halcyon quarry
#

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

valid crypt
#

👀

rose folio
#

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?

valid crypt
#

so you can technically run any model

half sinew
#

Is the discord bot currently working or does it need to be updated due to the new name for text-gen?

rose folio
valid crypt
# rose folio Um... sorry very new to all this. I was asking about the extension itself. But i...
GitHub

Discord bot which transforms your servers into hubs for limitless local AI-driven interaction and content creation. Features cutting-edge tools for professionals, and unlocks creative fun for casua...

halcyon quarry
halcyon quarry
#

The bot is currently capable of using Textgen TTS extensions, or API enabled packages.

#

If you run into any trouble, @ mention me

rose folio
#

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

halcyon quarry
#

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