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

[FEATURE][DocBot] discord should create a conversation for each channel in discord #80

Open
dtaivpp opened this issue Nov 1, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed OSCI

Comments

@dtaivpp
Copy link
Collaborator

dtaivpp commented Nov 1, 2023

Is your feature request related to a problem?

Right now when the discord bot is spun up it functionally does nothing. We need a conversations mechanism to track the conversations that are happening with our bot.

What solution would you like?

When the discord bot spins up it should do the following

  1. Check local state to see if there is a conversation for that channel already
  2. If none is found in state it should check OpenSearch for an existing conversation from that channel
  3. If there isn't already a conversation one should be created

After the conversation_id is found or created it should be tracked locally and used whenever new messages arrive on a channel.

Do you have any additional context?

class DocBot():
    def __init__ (self):
        self.conversations: {}

    def handle_message(message_object):
        # get conversation id form _conversation handler
        # with conversation id call docbot.generate response(conversation_id, message)
        # return response

    def _conversation_handler(self, conversation_name):
        # check if conversation in state
        # check if conversation exists. If it exists track conversation id in self.conversations by name: id
        # if conversation doesn't exists create and then track using the above method
        # return id
@dtaivpp dtaivpp added enhancement New feature or request untriaged Issues not seen by a maintainer yet. labels Nov 1, 2023
@dtaivpp
Copy link
Collaborator Author

dtaivpp commented Nov 1, 2023

Also, this should probably live in its own file

@dtaivpp dtaivpp added good first issue Good for newcomers help wanted Extra attention is needed OSCI and removed untriaged Issues not seen by a maintainer yet. labels Nov 1, 2023
@RobertKilkenny
Copy link

I would like to work on this!

@dtaivpp dtaivpp changed the title [FEATURE] DocBot discord should create a conversation for each channel in discord [FEATURE][DocBot] discord should create a conversation for each channel in discord Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed OSCI
Projects
None yet
Development

No branches or pull requests

2 participants