Skip to content
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

Try this before submitting an issue #19

Open
jakobdylanc opened this issue Feb 17, 2024 · 24 comments
Open

Try this before submitting an issue #19

jakobdylanc opened this issue Feb 17, 2024 · 24 comments

Comments

@jakobdylanc
Copy link
Owner

jakobdylanc commented Feb 17, 2024

  • Force-update to the latest version of llmcord:

    git fetch && git reset --hard origin/main
  • (No Docker) Update python packages:

    python -m pip install -U -r requirements.txt
  • (With Docker) Rebuild the container:

    docker compose build --no-cache
    docker compose up
  • Make sure your config.yaml is up-to-date with config-example.yaml (this project is WIP so the config structure is subject to change)

  • If you're using something like Ollama, make sure it's up-to-date

@jakobdylanc jakobdylanc changed the title Common issues Try this before submitting an issue Feb 17, 2024
@jakobdylanc jakobdylanc pinned this issue Jul 24, 2024
@adamreading
Copy link

Hi - great bot, thank you - how would I run multiple instances in the same VPS?

@jakobdylanc
Copy link
Owner Author

Thanks!

You can run as many instances of llmcord as you want. Simply clone the repo multiple times and run each one independently.

@adamreading
Copy link

Thanks!

You can run as many instances of llmcord as you want. Simply clone the repo multiple times and run each one independently.

I’ve been trying to launch using docker commands with separate config files and they all fail lol - 6 hours trying… it took me a while to get the 2nd config to work - but it’s now good thank you - I want to make a few different types of bots all for the same server and running on cheap $5 a month VPS 24/7 service… I am just waiting for my main cloud service for comfyui to get API calls - then next stage will be a comfyui Bot - calling the GPU only when it is generating

@jakobdylanc
Copy link
Owner Author

So you mean multiple instances of llmcord in 1 docker container?

You're not the first person to ask about this. I definitely see the value in making this simpler to accomplish. I'll keep thinking...

@mkagit
Copy link

mkagit commented Nov 22, 2024 via email

@adamreading
Copy link

So you mean multiple instances of llmcord in 1 docker container?

You're not the first person to ask about this. I definitely see the value in making this simpler to accomplish. I'll keep thinking...

I’m up to 3 now, and of course 3 containers lol

@jakobdylanc
Copy link
Owner Author

jakobdylanc commented Dec 5, 2024

I’m up to 3 now, and of course 3 containers lol

Awesome 😎

@mkagit you back yet? 👀

@mkagit
Copy link

mkagit commented Dec 5, 2024

I’m up to 3 now, and of course 3 containers lol

Awesome 😎

@mkagit you back yet? 👀

I'll try it!
My setup is super simple. I use a Dockerfile to load a start.sh which starts some scripts in parallel. Then I set one yaml for each and change the path in the code.

@cezza168
Copy link

Installed this today, really easy and straightforward. Looking for a way to add some backstory for each server user through Discord. Possibly a pinned message with this info would help if this was always included in the context window. Thanks.

@jakobdylanc
Copy link
Owner Author

jakobdylanc commented Dec 12, 2024

Installed this today, really easy and straightforward. Looking for a way to add some backstory for each server user through Discord. Possibly a pinned message with this info would help if this was always included in the context window. Thanks.

One idea is to use threads. You can simply send a message introducing yourself, and then create a thread from it:

image

Now every time you start a conversation within that thread, it will remember the original message:

image

This functionality has existed in llmcord for awhile now. Here's the description from the README:

You can seamlessly move any conversation into a thread. Just create a thread from any message and @ the bot inside to continue.

...Maybe I should reword that description to better highlight this use case.

@cezza168
Copy link

Thanks for the reply. That solves the problem for me for channel messages. Just need something for DMs now.

@jakobdylanc
Copy link
Owner Author

Just need something for DMs now.

I'm thinking of adding user/channel specific system prompts to the config soon. This would accomplish what you want. Stay tuned :)

@Ollie155
Copy link

Questions that are probably dumb but I'll ask anyway.

Can this bot read the channel history? I saw another one made in Javascript that could read a channel's history back to about 100 messages for context but wasn't sure if that was implemented here. I'm not particularly good at programming so I couldn't check the code myself to find it.

Also, big question, will there be support for the openai assistants api? I have a pre-built assistant that just needs to be referenced as the model to use, but I don't think this bot accepts the assistants api. Does it and I just didn't see, or will that be a future addition, or is that not on the list?

New to programming, but these were just some questions I had in setting this up for my server. Thank you for making it! It's fantastic regardless of my few issues.

@jakobdylanc
Copy link
Owner Author

Can this bot read the channel history?

It only sees messages in the current reply chain. No plans for anything beyond that at the moment.

will there be support for the openai assistants api?

No - assistants work quite differently than regular LLMs so they wouldn't really make sense in llmcord. It'd be better off as an entirely separate project designed from the ground up for assistants.

Thanks for the positive feedback! :)

@Ollie155
Copy link

Of course! I guess I'll just do my own coding adventure over Christmas to give it some more complete memory. I figured a way around the assistants thing, now I just gotta figure out how that guy got the history in the first place :D

@jakobdylanc
Copy link
Owner Author

In discord.py you can do channel.history(...), see more details here:

https://discordpy.readthedocs.io/en/stable/api.html?highlight=history#discord.TextChannel.history

@Ollie155
Copy link

In discord.py you can do channel.history(...), see more details here:

https://discordpy.readthedocs.io/en/stable/api.html?highlight=history#discord.TextChannel.history

Thank you so much!
I do have one more question. Is there a way to pull the log of the messages this bot receives/sends? I'd like to keep track of it without having to go into the terminal (I have to monitor how ppl use it, even when not at my computer).

@jakobdylanc
Copy link
Owner Author

jakobdylanc commented Dec 17, 2024

Is there a way to pull the log of the messages this bot receives/sends?

Something like this should work:

python llmcord.py 2>&1 | tee log.txt

Or if you're using Docker:

docker compose up 2>&1 | tee log.txt

This will save all the output logs to a text file. Note that only incoming user messages are shown in the log, not the bot's responses. You could add more logging in the code yourself fairly easily.

@Ollie155
Copy link

Awesome! That's perfect. Thank you so much!

@Ollie155
Copy link

Is there a way to ban specific users? I have a user who is being rather difficult, but enough ppl are using the bot that it'd be difficult to manually add all of them as allowed users.

@jakobdylanc
Copy link
Owner Author

jakobdylanc commented Dec 20, 2024

Is there a way to ban specific users?

No official way to do that at the moment.

You could create a special role and add it to allowed_role_ids, and then give that role to everyone you want to have access.

You could also just hack the code and add a simple if new_msg.author.id == USER_TO_BAN_ID: return in the beginning of the on_message function.

Maybe this needs to be easier.

@Ollie155
Copy link

Sounds good. I used the special role option, but that disables DMs so it's a temporary fix. I'll work on getting a more concrete system in on Saturday. I'll probably just add what you said, but poking through the code trying to learn how it works is always fun XD

@jakobdylanc
Copy link
Owner Author

jakobdylanc commented Dec 20, 2024

Yeah, with how it works currently, DMs are either allowed for EVERYBODY or blocked for EVERYBODY. I agree that this isn't ideal...

I'm thinking I should add a blocked_user_ids config option.

@jakobdylanc
Copy link
Owner Author

I'm thinking I should add a blocked_user_ids config option.

Done! 8d4d9cc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants