The Deck API Gateway serves as a bridge between your "Deck" application and both the OpenAI API and Gemini AI, facilitating the processing and connection of data. It provides endpoints for interacting with the Deck application and leveraging the power of these AI services for generating flashcards and enhancing productivity.
- ⚡ Flashcard Generation: Utilize the OpenAI API and Gemini to automatically generate flashcards from study materials (pdf files) and text inputs.
- Node.js installed
- OpenAI API key
- Firebase admin SDK
- 🛠️ Clone this repository to your local machine.
- 📦 Install dependencies using
npm install
. - ⚙️ Set up environment variables:
OPENAI_API_KEY
: Your OpenAI API key.GEMINI_API_KEY
: Your Google Generative AI API key.ASSISTANT_ID
: Your OpenAI assistant ID.FIREBASE_API_KEY
: Found in Firebase admin.AUTH_DOMAIN
: Found in Firebase admin.PROJECT_ID
: Found in Firebase admin.STORAGE_BUCKET
: Found in Firebase admin.MESSAGING_SENDER_ID
: Found in Firebase admin.APP_ID
: Found in Firebase admin.KEY_FILE
: Found in Firebase Service Providers.
- 📃 generate your firebase private key json file and place it in your project's root folder
- 🚀 Run the server using
npm start
.
GET /hi
: To check if the API is onlinePOST /prompt/v1/openAI/:id
: Send prompt or message to OpenAI assistant.POST /prompt/v2/gemini/:id
: Send prompt or message to Gemini AI and also receive a response.GET /response/v1/openAI/:id
: Retrieve OpenAI assistant response.
We welcome contributions from the community! To contribute:
- 🍴 Fork the repository.
- 🌿 Create a new branch (
git checkout -b feature/YourFeature
). - 💻 Commit your changes (
git commit -m 'Add some feature'
). - 📤 Push to the branch (
git push origin feature/YourFeature
). - 🔄 Open a pull request.
This project is licensed under the MIT License.
If you have any questions or suggestions, feel free to open an issue.
Thank you for using Deck API Gateway! We hope it helps streamline your productivity workflows and enhances your "Deck" application experience. 🎉