jakobdylanc / llmcord.py

A Discord LLM chat bot that supports any OpenAI compatible API (OpenAI, Mistral, Groq, OpenRouter, ollama, oobabooga, Jan, LM Studio and more)
MIT License
312 stars 57 forks source link

Loading characters? #18

Closed enterv0id closed 7 months ago

enterv0id commented 7 months ago

Is there any way I can load the character I made in oobabooga webui? Really nice job btw, thanks!

jakobdylanc commented 7 months ago

I will look into this 👍

Avolix commented 7 months ago

This would be a massive thing, character support in general would really enhance this,

jakobdylanc commented 7 months ago

Added, enjoy!

Avolix commented 7 months ago

Would it be possible for it to be set for it to post the 'Greeting' that a lot of characters make use of if a character is loaded, or as a flag? A lot of them depend on that for context and characterization.

jakobdylanc commented 7 months ago

I see what you mean. Unfortunately I don't think character greetings are accessible through oobabooga's API server (which is what my code uses). So not sure how I would do this.

Avolix commented 7 months ago

It could be possible for it to load the character itself, and then pass that to ooba. I know sillytavern does it like that, instead of loading the character into ooba itself.

jakobdylanc commented 7 months ago

Beyond this it also goes against the functionality of discord-llm-chatbot. The bot is only meant to send messages when responding to a user prompt. Sending an "automatic message" for the greeting doesn't make sense as a feature IMO.

As an alternative you could write some character context in the bot's Discord activity message. Just change "github.com/jakobdylanc/discord-llm-chatbot" to whatever you want on this line: https://github.com/jakobdylanc/discord-llm-chatbot/blob/0d609f3474095f8826692b63394eef5370865670/llmcord.py#L48

jakobdylanc commented 7 months ago

Beyond this it also goes against the functionality of discord-llm-chatbot. The bot is only meant to send messages when responding to a user prompt. Sending an "automatic message" for the greeting doesn't make sense as a feature IMO.

As an alternative you could write some character context in the bot's Discord activity message. Just change "github.com/jakobdylanc/discord-llm-chatbot" to whatever you want on this line:

https://github.com/jakobdylanc/discord-llm-chatbot/blob/0d609f3474095f8826692b63394eef5370865670/llmcord.py#L48

I just made this easier to do with a new CUSTOM_DISCORD_STATUS config option. Check it out!