beckn-action-bot
is an open-source project built on Node.js, integrating OpenAI and the Beckn protocol to enable economic transactions across the Beckn open network using simple text inputs from users.
The primary objective of this AI assistant is to facilitate daily tasks such as ordering food, booking taxis, finding and navigating routes, scheduling appointments, and purchasing groceries, among others.
Key Features:
- Functions as a traditional chatbot by answering questions using GPT-3.5.
- Executes transactions on the Beckn open network.
- Retrieves routes from Google Maps and searches for items en route.
- Provides integration with WhatsApp and custom GPT models.
- Compatible with various chat interfaces.
simple_booking.mp4
search_along_a_route.mp4
git clone https://github.com/beckn/beckn-action-bot
cd beckn-action-bot
npm i
-
OpenAI access token : Obtain an open AI access token to use open AI LLMs. Here is a quick guide on how to do this.
-
Twilio access token : The project uses twilio to send and receive messages from Whatsapp. You can skip this step if you plan to use the project in API only mode. You can read more about Twilio access token here.
-
Google maps API key :The project uses Google maps for fetching route polylines. You will need the Google maps API key if you plan to use it
-
Copy
.env.sample
to.env
and set your environment variables. This is the step where you will need to set your access tokens as mentioned in the step above. -
To run the node server, run:
npm run dev # for debugging
npm run docker:dev # for docker
To run test cases, run:
npm run test # run all test cases
npm run test:unit # to run unit tests
# To run test cases inside docker-container
npm run docker:test
We use eslint to check for linting errors. The rules for eslint are configured under .eslint.json
file. Use the following command to run the eslint tests:
npm run lint
We use prettier to prettify the code. Run the following command to prettify:
npm run prettify
If you want to change the prettier rules, edit the .prettierrc.json
file
This is an open source project and everyone is welcome to chime in. Here is how you can contribute:
- Checkout the list of open issues here, and select the one that you are intersted in
- If you have any idea, suggestion or you discover an issue, create a discussion for it here
- To raise a PR: Fork the project
- Create your feature branch (git checkout -b feature/amazing-feature)
- Commit your changes (git commit -am 'Add some amazing feature')
- Push to the branch (git push origin feature/amazing-feature)
- Open a Pull Request
- Best practices:
- Follow the code structure
- Use test driven development
- Describe your PRs or issues in detail for the developers to understand. There are PR templates and issue templates configured in the project which can be used for understanding the structure.
This project is licensed under the MIT License - see the LICENSE file for details
For support, join our Discord channel or open an issue.