The Reactome ChatBot is an interactive tool that provides information about biological entities and processes using natural language processing techniques. It leverages the Reactome database to retrieve relevant information based on user queries.
- Python 3.x
- Poetry (for dependency management)
git clone https://github.com/your_username/reactome_chatbot.git
cd reactome_chatbot
poetry install
usage: chat.py [-h] [--openai-key OPENAI_KEY] [--query QUERY] [--verbose]
Reactome ChatBot
optional arguments: -h, --help show this help message and exit --openai-key OPENAI_KEY API key for OpenAI --query QUERY Query string to run --verbose Enable verbose mode
Reactome Dockerized Graph database form DockerHub: https://hub.docker.com/r/reactome/graphdb
To generate embeddings using the embedding generator script, use the following command:
poetry run python bin/embedding_generator.py --openai-key=<your-key>
This command will generate embeddings using the specified OpenAI API key.
To run the ChatBot interactively, execute the following command:
poetry run python bin/chat.py
This will start the ChatBot in interactive mode, allowing users to input queries and receive responses in real-time.
You can also provide queries non-interactively by passing them as command-line arguments.
For example:
poetry run python bin/chat.py --query "What is TP53 involved in?"
This will execute the ChatBot with the provided query and print the response.
You can set environment variables for the ChatBot and other components:
OPENAI_API_KEY: API key for the ChatBot (required)
export OPENAI_API_KEY=your_openai_api_key
You can also use a .env file to set the environment variable for the chatbot.
poetry run chainlit run bin/app.py -w
Contributions to the Reactome ChatBot project are welcome! If you encounter any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.