TogetherCrew / hivemind-bot

This repository is made for TogetherCrew's LLM bot.
2 stars 0 forks source link

feat: updated the prompt in case of None! #36

Closed amindadgar closed 8 months ago

amindadgar commented 8 months ago

Updated in case of having thread equal to None we would say the main channel.

amindadgar commented 8 months ago

Do we need the elif level2_title == "None"? If I understand this correctly, this means that we have no channel name which should only be the case for the server summary. But we never include the server summary in the context. If we do process the server summary, this would already go into the elif level1_title == "None" and so the last elif statement would never be reached.

The rest looks good so I already approved

Thanks for asking. So the reason I made it for both is because we don't know which level2_key or level1_key is thread and it depends on the initialization of the class that we assign thread or channel to the level1_key and level2_key. It would be always one of the conditions that never reached but since we don't know exactly which is thread it is written that way.

The other thing that I didn't compare the level1_key and level2_key to be equal to thread is because the module can be used later for platforms like discourse and it isn't the best practice to include a piece of information from other part of the code to another part (Single-responsibility principle)

TjitsevdM commented 8 months ago

Makes sense. Thanks for explaining!