These instructions will help you set up the project on your local machine for development and testing purposes.
-
Clone the repository:
git clone https://github.com/rbl-project-ADD/ai-server.git
-
Navigate to the project directory:
cd ai-server
-
Install the dependencies:
npm install
-
Create a
.env
file in the root directory and add the following environment variables:GEMINI_API_KEY="your_api_key_here" FAL_API_KEY="your_api_key_here"
-
Start the server:
npm start
Route | HTTP Method | Description |
---|---|---|
/ | GET | Returns a greeting from the server |
/chat | GET | Returns a greeting from the chat router |
/chat/process-text | POST | Processes a text input in the body and gives output as a string |
/chat/process-text-stream | POST | Processes a text input in the body as a stream using the Gemini model |
/chat/process-image | POST | Processes an image input with a prompt in form-data using the Gemini model |
/images | GET | Returns a greeting from the image router |
/images/fal | POST | Processes an image input with a prompt and model selection using the FAL AI service |