Last change
on this file since 38824 was 38804, checked in by davidb, 3 months ago |
Starting server, and running as nohup separated; updated README
|
File size:
956 bytes
|
Line | |
---|
1 |
|
---|
2 | Code based on the MIT-licensed github project:
|
---|
3 |
|
---|
4 | https://github.com/hillis/gpt-4-chat-ui.git
|
---|
5 |
|
---|
6 | Updated to work with openai v4.x Nodejs API
|
---|
7 |
|
---|
8 | Then changed to work with a custom assistant that has been
|
---|
9 | 'taught' about a collection based on exporting the
|
---|
10 | collection:
|
---|
11 |
|
---|
12 | export.pl -save_as OpenAIGPTs ...
|
---|
13 |
|
---|
14 | Further changed so the ChatGPT GUI can be embedded in a Greenstone page.
|
---|
15 |
|
---|
16 |
|
---|
17 | To setup and run the code:
|
---|
18 |
|
---|
19 | 1. Make sure you have created a '.env' field in the top-level of
|
---|
20 | this NodeJS project, and set the following lines accordingly
|
---|
21 | with the relevant values from your OpenAI account:
|
---|
22 |
|
---|
23 | ----
|
---|
24 | OPENAI_API_KEY=sk-????????????????????????????????????????????????
|
---|
25 | ORGANIZATION_ID=org-????????????????????????
|
---|
26 | ASSISTANT_ID=asst_????????????????????????
|
---|
27 | ----
|
---|
28 |
|
---|
29 |
|
---|
30 | 2. Start the development server (defaults to port 3000) with:
|
---|
31 |
|
---|
32 | npm run dev
|
---|
33 |
|
---|
34 |
|
---|
35 | Now access:
|
---|
36 |
|
---|
37 | http://localhost:3000/
|
---|
38 |
|
---|
39 |
|
---|
40 | 3. To run as a production server
|
---|
41 |
|
---|
42 | ./BUILD-PROD.sh
|
---|
43 | ./START-PROD-NOHUP.sh
|
---|
44 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.