Brawlence / SD_api_pics

An extension to oobabooga's TextGen allowing you to receive pics generated by Automatic1111's SD API
12 stars 1 forks source link

TavernAI compatibility mode #1

Closed Nepherpitou closed 1 year ago

Nepherpitou commented 1 year ago

Hi there! I didn't participated in any opensource activity before, so I don't know how to put it in right way.

I noticed it's pretty simple to add support of KoboldAI/TavernAI conversations:

Instead of modifying whole input string, I need only to replace last own phrase:

<Conversation history>
You: <Bla bla bla conversation context>
CharacterName: <Bla bla bla conversation context>
You: Send me selfie <-- only this line must be modified
CharacterName:

Adjust model response

<Description for image generation>
You: generated context <-- only everything up to this "You:" token must be sent to image generation
CharacterName: more generated context
You: event more

Change Image representation

Unfortunately, TavernAI doesn't support HTML, but it support markdown as well, as chat mode in webui, so it's worth to add markdown output instead of HTML. And it will be more clear in terms of conversation spoiling with tags.

So, I want to add new mode, for example "TavernAI (Experimental)" and implement everything described above. With better code structure:

I can prepare PR with all these changes after I got how to do it 😅 Just want to get your approval before placing efforts.

Brawlence commented 1 year ago

Wait, I'm kinda confused.

This extension was specifically made for oobabooga's texgen with its native chat UI. (I do realize one can use Kobold-AI-like api extension for ooba's -- to pipe the output into TavernAI.)

But, if you want to get Stable-Diffusion generated illustrations in T.AI, first, check out Cohee1207's TavernAI fork, there's lots of features and I've seen remote SD support added just a little while ago. I'm assuming this basically does the same as my extension but natively for TavernAI.

What are you trying to accomplish?

Nepherpitou commented 1 year ago

Checked, but after I created an issue :) It wasn't supported yesterday. And also not supported yet, but yeah, looks like it will be ready soon and my fork wokrs fine for me already, so I can just wait a bit. Things are bit messy right now since there are lot of stuff with same features implemented in different ways. Here I simply noticed my goal is easy to achieve and may be useful for someone else. Since I've already done it, why not to clean it up and share?

Brawlence commented 1 year ago

So, closing it as stale. Feel free to reopen if you didn't find the desired functionality in SillyTavern.