Closed dmitriyap closed 11 months ago
[No connection to webui API] in telegram
I think this is due to API change, seed param is missing, replace response call with:
response = requests.post(f"http://{ai_server_ip}:{ai_server_port}/run/textgen", json={
"data": [ prompt,
params['max_new_tokens'],
params['do_sample'],
params['temperature'],
params['top_p'],
params['typical_p'],
params['repetition_penalty'],
params['encoder_repetition_penalty'],
params['top_k'],
params['min_length'],
params['no_repeat_ngram_size'],
params['num_beams'],
params['penalty_alpha'],
params['length_penalty'],
params['early_stopping'],
params['seed'],
]
}).json()
If you are interested in telegram integration, I would suggest to look into https://github.com/oobabooga/text-generation-webui/pull/725
This issue has been closed due to inactivity for 6 weeks. If you believe it is still relevant, please leave a comment below. You can tag a developer in your comment.
Description
For those familiar with the telegram messaging app I think it would be cool idea to add telegram bot integration support, so that telegram app could be used as a "conversation ui".
What do you think?
I made a small proof of concept script for those who want to give it a quick try, it acts as a gateway between telegram bot api and text-generation-webui api.
Requirements:
To run the script you have to register a bot on telegram and get api_key (https://core.telegram.org/bots)
Run:
GPTBOT_SERVER/PORT defaults to 127.0.0.1:7860 so you can omit them, but apikey is required.
This script only supports no-stream webui api, so you have to run it with --no-stream flag, for example I use the following command to run 13b llama model as a backend:
Once you are chatting with the bot you can use
/start
command to reset the conversation and/stats
command to display basic conversation stats.gptbot.py: