Haly is here to revolutionize the way you communicate and seek information. With its friendly and helpful nature, Haly is more than just a chatbot - it's your ultimate companion in the digital world.
Haly is an expert in everything - from providing answers and explanations, to generating ideas and assisting with various tasks. Here are just a few things Haly can help you with:
- Semantic Search: Ask questions about your organization and Haly will tell you an answer based on previous public channel messages and who are the subject matter experts. Great for auditing for sensitive messages.
- Emails, Blogs, and Marketing Content: Need assistance with writing? Haly is at your service, providing suggestions, editing, and even helping with translations.
- Information and Research: Curious about a specific topic? Haly can provide you with accurate information and conduct in-depth research to satisfy your curiosity.
- Problem Solving and Troubleshooting: Stuck with a difficult problem? Haly loves challenges and is always ready to help you find the best solution.
- Recipes and Health & Fitness: Looking for a delicious recipe or need some advice on staying fit? Haly has got you covered with a wide range of suggestions and information.
- Travel Planning: Need help with your travel plans? Haly can assist you in finding the best destinations, booking accommodations, and even suggesting local attractions.
Haly is not just another chatbot - it's a personal assistant that truly cares about your needs. Here's why you should give Haly a try:
- Friendly and Engaging: Haly's warm and approachable personality makes every conversation enjoyable. You'll feel like you're chatting with a good friend.
- Expert in Everything: Whether you need help with writing, research, problem-solving, or anything else, Haly has the knowledge and expertise to assist you.
- Always Available: Haly is there for you 24/7, ready to provide assistance whenever you need it. Say goodbye to waiting for human help.
- Efficient and Reliable: Haly is fast, accurate, and reliable. You can trust Haly to deliver high-quality results every time.
Ready to experience the power of Haly? Join the growing community of Haly users and see how this friendly chatbot can enhance your digital life. Simply visit our website https://haly.ai or integrate Haly into Slack following the instructions in this README, and let the conversation begin! Note: Haly is constantly learning and improving, so don't hesitate to provide feedback and suggestions. Together, we can make Haly even better!
- You must have a Slack organization where either you or an administrator can approve a new application.
- The ability to git clone a repo and run commands in either a Windows, Mac, or Linux terminal.
- Install python and pip.
- Go to https://api.slack.com/apps and hit the "Create New App" green button. Select "From an app manifest" option.
- Choose workspace from dropdown if needed and paste the following content in the manifest. Hit Next button. Review the OAuth and Features tabs then hit Create.
{
"display_information": {
"name": "Haly",
"description": "AI Assistant",
"background_color": "#2f3133",
"long_description": "I'm Haly, your friendly Slack chatbot. I'm here to help you with any questions or problems you might have. I'm an expert in everything, so feel free to ask me anything. I'm a good listener and always ready to assist you. Just type your question or request, and I'll do my best to provide you with the information you need. You can direct message me or add me to a public channel. Just tag me to talk with me with @Haly."
},
"features": {
"app_home": {
"home_tab_enabled": true,
"messages_tab_enabled": true,
"messages_tab_read_only_enabled": false
},
"bot_user": {
"display_name": "Haly",
"always_online": true
}
},
"oauth_config": {
"redirect_urls": [
"https://localhost:5173/slack-auth"
],
"scopes": {
"bot": [
"app_mentions:read",
"channels:history",
"channels:join",
"channels:read",
"chat:write",
"groups:history",
"groups:write",
"im:history",
"im:read",
"im:write",
"mpim:history",
"mpim:read",
"mpim:write",
"users:read"
]
}
},
"settings": {
"org_deploy_enabled": false,
"socket_mode_enabled": false,
"token_rotation_enabled": false
}
}
- Select
Basic information
tab from the left nav bar, scroll down and make sure to save the "Signing Secret" for later.
Scroll down further and use Haly Profile Image for her App icon or select your own if you wish.
- Next, select
OAuth & Permissions
tab from the left nav bar, underOAuth Tokens for Your Workspace
section, hitInstall to Workspace
and follow the instructions there.
- In a terminal git clone the project. See the offical documentation if you do not know how to do this.
- cd in the slack-bot directory
- Create a new .env file. You can use the touch command (touch .env) to create the file. Then use your favorite editor to edit it.
- If you only want to use Haly for your own workspace, you can use it in standalone mode. Put the following in your .env file:
# SLACK BOT
SLACK_BOT_TOKEN=xoxb-your-oauth-token
SLACK_SIGNING_SECRET=your-slack-signing-secret
# OPENAI
OPENAI_API_KEY=your-openai-api-key
# SERVER
FLASK_APP=src/index.py
FLASK_RUN_HOST=localhost
FLASK_RUN_PORT=8080
# API
API_SHARED_SECRET=not-needed-for-standalone
API_BASE_URL=not-needed-for-standalone
LOG_LEVEL=DEBUG
STANDALONE=true
SLACK_USER_ID=U01JZQZQZQZ # Put a your workspace admin user ID if you know it
- Update SLACK_BOT_TOKEN (OAuth token), SLACK_SIGNING_SECRET, OPENAI_API_KEY (Click here to learn how to get an API key from OpenAI), and SLACK_USER_ID (Click here how to get your Slack user ID)
- Have venv installed
python3 -m pip install virtualenv
- Create a venv at the root of the slack-bot project using
python3 -m virtualenv -p python3 myvenv
- To enable the virtual environment run
source myvenv/bin/activate
on Linux/MacOS andmyvenv\Scripts\activate
on Windows - this opens up a terminal into the virtual environment. - verify your python is isolated by typing
where python
in the above terminal. It should show a python path within the project. - Run
pip install -r "requirements.txt" -r "src/semantic_search/requirements.txt"
to install dependencies in the same terminal - Run
flask --debug run
to start the dev server in the same terminal
If you use the --debug flag when running flask, the application will rebuild whenever the source code changes.
You will need ngrok to test the Bot locally
- Go to https://ngrok.com/download and follow the instructions to install ngrok
- Open a terminal an run
ngrok http localhost:8080
- Copy the forwarding url that starts with https and go to you app setting in api.slack.com . Go to 'Event subscriptions'. Put your forwarding url + /slack/events in the Request URL input.
- e.g: if your forwarindg url is https://3121-161-29-169-94.ngrok-free.app you put https://3121-161-29-169-94.ngrok-free.app/slack/events
- Subscribe to the neccesary bot events
This project is built on top of the following open source libraries:
- Flask (version 2.3.3)
- python-dotenv (version 1.0.0)
- slack-bolt (version 1.18.0)
- openai (version 0.28)
- gunicorn (version 20.1.0)
- gevent (version 23.9.1)
We are grateful to the developers and contributors of these libraries for their valuable work.
- Cloud build trigger will run every time you push a git tag that matches
^v.*$