Skip to content

Commit

Permalink
Update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyolazabal committed May 6, 2024
1 parent ee62c93 commit ec4ea04
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
17 changes: 13 additions & 4 deletions API/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,24 @@ API endpoint providing access to Google Gemini on /api/ai/gemini-pro
## Prerequisites
The API requires nodeJS v18 minimum.

The API rely on local environment variables, you can either create a .env file or if you run the API in a docker image you add the environment variables to it. Here is the list :
- API_KEY=<YOU API KEY>
- PROJECT_ID=<YOUR GOOGLE PROJECT ID>
- LOCATION=<LOCATION OF THE SERVICE>
- GEMINI_PRO_MODEL_NAME=gemini-pro
- GOOGLE_APPLICATION_CREDENTIALS=service-principal-gemini-credential.json

==In order to get the acccess to Google APIs, you need to place a file called service-principal-gemini-credential.json in the API folder. This file must include the credentials for the service account to connect to Google APIs.==

## Running the API
Start by installing the modules
'''
```
npm i
'''
```

Run the server
'''
```
node server.js
'''
```

The API will be listening on port 3001 by default.
10 changes: 10 additions & 0 deletions my-frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
This project was bootstrapped with
[Create React App](https://github.com/facebook/create-react-app).

## Prerequisites
The Frontend rely on local environment variables, you can either create a .env file or if you run the API in a docker image you add the environment variables to it. Here is the list :
- REACT_APP_BROKER_WS_ADDRESS=<BROKER WEBSOCKET ADDRESS>
- REACT_APP_WS_PORT=<BROKER WEBSOCKET PORT>
- REACT_APP_WS_USERNAME=<BROKER WEBSOCKET USERNAME>
- REACT_APP_WS_PASSWORD=<BROKER WEBSOCKET PASSWORD>
- REACT_APP_TOPIC_ROOT=<TOPIC ROOT TO SUBSCRIBRE TO>
- REACT_APP_API_URL=http://localhost:3001
- REACT_APP_API_KEY=<API TOKEN>

## Available Scripts

In the project directory, you can run:
Expand Down

0 comments on commit ec4ea04

Please sign in to comment.