-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
blank turn_template? #94
Comments
Perhaps, you can add custom eos token or turn template to .cfg file. eos/turn template translates to textgenerator "generate_reply" method, so if ooba didnt change something it should work properly. This is little bit complicated because of any model/char have its own prefereces for working. Also, as I can see vicuna better use with notebook or query mode - chat-like modes add user/bot names to each query and can ruin vicuna syntax. |
I see the variable turn_template in TelegramBotGenerator in the get_answer function, I just can't figure out where it should be coming from, or could be coming from if it hasn't been implemented. Are you saying that the extension isn't setup to use the sane Instruction template the UI is? Is that instruction template the same thing as the turn_template or something else entirely? |
UPD. I found a problem with turn_template in .cfg, but I cant fix right now. Will check it later. |
If you don't have time, if you let me know what the issue is I'll be glad to fork and fix if I can. |
I checked, fixed, but I still didn't test. turn_template - readed character .yaml file. It is not common var, it is user var (stored in individual TelegramBotUser object)
This two points shold be tested. I have not enought experience with vicuna, so I cant be sure that I did everything well. Perhaps, we need add new bot_mode ("vicuna") with properly prompt formatting. Also, I added two generator_script option config:
|
I'm using Llama-2 70b Uncensored now, it works very well. But the Telegram bot isn't working for me. The bot gives the typing notifications, in persons mode, then buttons show up, but no message, just the Bot: and nothing. I'll test more tomorrow and see if I can isolate the issue. I like your improved user config json, a much better way to manage what mode gets which buttons. |
You can manage buttons in telegram_user_rules.json, if you want. About blank answers... usualy this mean that llm can't return answer. Moust of cases for me - VRAM shortage) |
With the UI working good from the web interface, at over 8 tokens per second, I'm seeing no errors via the UI over lengthy chats. With the Telegram bot I'm getting blank replies, and seeing these errors and the chat in the console. The initial message from the character profile comes through, but anything generated by the LLM does not.
Is it possible the telegram bot isn't sending the max token parameter? |
seems, it is something new in textgenerationwebui. or switch to api mode |
Adding that parameter and setting it to false worked, but it's still given the replies with the extra user reply. In this case I asked the LLM to explain quantitive easing and got this back
It only gives the made up User input via the Telegram bot, not the UI. Any idea what could be causing this behavior? |
Usualy, this ir result of zeroed stopping_strings. But wrapper always add to Try to run text-generatoe-webui with --api and set in telegram_bot configfile |
That didn't fix it. How does your extension communicate with the API differently than an external app would? When I use the API from my own app it doesn't add the extra user messages, and I'm using the example code from Oobabooga, just trimmed down a bit. |
Same way as in example, but params can be different. Perhaps, need to adjust params. About params: In additional, stopping_strings and eos_token stored in |
I don't see a turn_template in the character file. What's the format for adding one to to telegram_generator_params, does this look right?
The above did not fix the issue. I'm getting this error in the console, or I assume it's an error, it's not actually showing up an error in logging: last_message_markup_clean Message to edit not found |
Hm... I see example was truncated in ooba repo.
Bot try to clean inline buttons, but message already deleted. This may happend during unstable internet connection or if you clisck "delete" button twice. Usualy, this is not a problem. |
I'm using ngrep to capture the exact data sent to the API interface from my outside app that does not generate the extra dialog, I'd like to do the same for the telegram_bot to compare but apparently it's not coming in on port 5000? Where does the bot send the data to the API? |
If generator_script - GeneratorTextGeneratorWebuiApi used - http://localhost:5000/api/v1/chat (this can be customized in GeneratorTextGeneratorWebuiApi.py) |
Excellent idea, I just pasted in my request code from my working app based on the Oobabooga example. I added this line to telegram_config.json
I then edited the get_answer method in GeneratorTextGeneratorWebuiApi.py like this:
I'm down to the LLM only generating a single User reply instead of several, but one is too many. But your suggested technique has isolated the problem I believe as I can now directly compare the two data.json files from my generic requests app and the telegram bot. I have them identical now, minus one thing, I'm getting the full character context in the prompt variable in the telegram bot, even though the character is already specified in another var. In my generic app there is no "User: Hi" or character context, it's just "Hi" with "Hi" being the user input. Should the bot be sending the full character context with each message? |
The LLM is replying to the Telegram user, and adding additional Q&A as if the user asked additional questions, basically the LLM is talking to itself, in my case at least.
I have the same character and preset in the Web UI, and it does not do this. When I looked at the JSON history file to see if maybe some additional context was injected, I noticed the turn_template is blank?
Should that settings be applied elsewhere?
The Instruction template I'm using in the Web UI is Vicuna 1.1, but I don't see anywhere to specify that in the extension settings. I assume the Telegram bot is supposed emulate the Web UI behavior, but I'm guessing I missed a setting somewhere?
The text was updated successfully, but these errors were encountered: