Skip to content

OpenReplyDE/open-mind

Repository files navigation

OpenMind Slack Bot

OpenMind is a Python-based Slack bot with LLM (Large Language Model) capabilities that searches Confluence for relevant content. This bot helps users quickly find information from Confluence directly within Slack.

Features

  • Search Confluence: Query Confluence for relevant content.
  • LLM Integration: Utilize large language models to enhance search capabilities.
  • Slack Integration: Seamlessly interact with the bot within Slack.

Architecture

The bot is built as a RAG agent with prepared prompts. The user query is ran agains a vector database to find the most similar confluence articles, which then are used to enrich the prompt.

Installation

The projet works locally with poetry. Installing pyenv beforehand is recommended. Current test python version 3.12

for local dev, it is recommended to run:

 poetry run extract
 poetry run preprocess
 poetry run encode

These ensure confluence data is available locally for indexing

for local development you can quickly create a slack app and use ngrok http 3000 to get a public ip address. You can use this public adress with /slack/events path to connect to your slack app and listen for event. the path will look something like this e.g.

https://random.ngrok-free.app/slack/events

Configuration

  1. Set up your Slack bot and obtain the necessary tokens.
  2. Configure your Confluence API access.
  3. Create a .env file in the project root and add the following environment variables:
    JIRA_API_KEY=<Jira API Token>
    CONFLUENCE_USERNAME=<Confluence user name>
    CONFLUENCE_SPACE_KEY=OR
    HF_API_TOKEN=<hugging face inference read api token>
    SLACK_BOT_TOKEN=<get from Slack Open Mind Dev>
    SLACK_SIGNING_SECRET=<get from Slack Open Mind Dev>
    INIT_TOKEN=<A token used by the init endpoint to reindex the vector database>
    DO_NOT_INDEX=True <used in local environment where data is locally always available>
    

Contributing

Contributions are welcome! Please fork the repository and create a pull request with your changes.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For any questions or suggestions, please open an issue or contact the project maintainer at [email protected]

About

Our friendly intelligent slack chatbot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published