Skip to content

Commit e3cc23c

Browse files
authored
Update README.md
1 parent 86b9390 commit e3cc23c

File tree

1 file changed

+27
-18
lines changed

1 file changed

+27
-18
lines changed

GptService/README.md

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,28 @@
2323

2424
#### Listening port
2525

26-
http://localhost:3004
26+
http://localhost:3008
2727

2828

2929
#### Start the microservice on local machine by:
3030

31-
1. Navigate to peerprep directory.
31+
1. Navigate to GptService directory.
3232

33-
2. Insert your own GPT-API_KEY for the services in the `peer-prep\src\backend\gpt-service\config\config.js` file as below:
33+
2. Insert your own GPT-API_KEY for the services in the `GptService\config\config.js` file as below:
3434

3535
```
3636
const API_KEY = '<Your api key>';
3737
```
38+
39+
Warning:
40+
41+
> Please do not publish your API key to public.
42+
3843

3944
3. Start the microservice in terminal using commands:
4045

4146
```
42-
cd peer-prep\src\backend\gpt-service
47+
cd GptService
4348
npm install
4449
npm start
4550
```
@@ -50,7 +55,7 @@ npm start
5055
5156
> node server.js
5257
53-
GPT service listening on port 3004
58+
GPT service listening on port 3008
5459
```
5560

5661
5. End generative AI service in terminal using `Ctrl+C`.
@@ -66,11 +71,11 @@ GPT service listening on port 3004
6671

6772
Send **POST** request to:
6873

69-
`http://localhost:3004/generate` and specify post fields.
74+
`http://localhost:3008/generate` and specify post fields.
7075

7176
Example:
7277

73-
Url link: `http://localhost:3004`
78+
Url link: `http://localhost:3008`
7479

7580
For testing using Postman, enter data using the `Body` panel (2 methods are available):
7681

@@ -115,11 +120,11 @@ GPT service listening on port 3004
115120
116121
Send **DELETE** request to:
117122
118-
`http://localhost:3004/exitGpt`
123+
`http://localhost:3008/exitGpt`
119124
120125
Example:
121126
122-
`http://localhost:3004/exitGpt`
127+
`http://localhost:3008/exitGpt`
123128
124129
raw:
125130
@@ -145,11 +150,11 @@ GPT service listening on port 3004
145150
146151
Send **GET** request to:
147152
148-
`http://localhost:3004/getCache`
153+
`http://localhost:3008/getCache`
149154
150155
Example:
151156
152-
`http://localhost:3004/getCache`
157+
`http://localhost:3008/getCache`
153158
154159
raw:
155160
@@ -190,7 +195,7 @@ GPT service listening on port 3004
190195
1. Test the service using terminal commands:
191196
192197
```
193-
cd peer-prep\src\backend\gpt-service
198+
cd GptService
194199
npm test
195200
```
196201
@@ -199,20 +204,24 @@ npm test
199204
200205
**Note**:
201206
202-
> Please delete the containers for other microservices.
207+
> Please ensure that there are no active container of the required services.
203208
204-
1. Navigate to peerprep directory.
209+
1. Navigate to GptService directory.
205210
206-
2. Insert your own GPT-API_KEY for the services in the `peer-prep\src\backend\gpt-service\config\config.js` file as below:
211+
2. Insert your own GPT-API_KEY for the services in the `GptService\config\config.js` file as below:
207212
208213
```
209214
const API_KEY = '<Your api key>';
210215
```
216+
Warning:
217+
218+
> Please do not publish your API key to public.
219+
211220
212221
3. Start the microservice in terminal using commands:
213222
214223
```
215-
cd peer-prep\src\backend\gpt-service
224+
cd GptService
216225
docker-compose up --build
217226
```
218227
@@ -221,7 +230,7 @@ docker-compose up --build
221230
```
222231
223232
> node server.js
224-
> GPT service listening on port 3004
233+
> GPT service listening on port 3008
225234
```
226235
227-
5. End matching service in terminal using `Ctrl+C` twice.
236+
5. End GPT service in terminal using `Ctrl+C` twice.

0 commit comments

Comments
 (0)