Sarvgyan
- 4 Devlogs
- 3 Total hours
A simple Slack bot that lets you run web search queries (using Tavily API) and sometimes tells you unfunny jokes.
A simple Slack bot that lets you run web search queries (using Tavily API) and sometimes tells you unfunny jokes.
Feedback
Hey there,
Awesome project! I'd love to see what you make in the future!
Shipwright walkthrough
I wrapped up writing the handling logic of the last command for the bot: /sarvgyan-search which takes a query and returns an AI summar answer for the search.
For search, and AI answer I used the free tier of Tavily Search API. (It gives 1000 free req/month)
Next I intent to deploy it on nest to get it up and running 24/7
btw: here’s a search result screenshot from the bot:
Before writing a single line of code I spent ~1hr learning how to use slack_bolt to register a command listener and how to write logic to perform actions on the command trigger using the decorator @app.command("/command") from the guide and web.
Using it I went on to programming actions for two commands:
/sarvgyan-ping: returns latency for acknowledging command.
/sarvgyan-befunny: Tells you a joke (which I must say doesn’t look like a joke 😅)
I worked on setting up the project basics: github repo, installing slack_bolt package and all that.
For this project I’ve decided to not follow the guide and go on to build it on my own in python rather than JS coz I feel more comfortable in it.
I think I’ll be using the official slack guide to help me along the way to build the app in python: