chriscelaya commited on
Commit
f67edb3
1 Parent(s): 7897caf

Upload 6 files

Browse files
Files changed (6) hide show
  1. .gitignore +134 -0
  2. .gitpod.yml +5 -0
  3. Dockerfile +47 -0
  4. LICENSE +21 -0
  5. README.md +53 -11
  6. docker-compose.yml +16 -0
.gitignore ADDED
@@ -0,0 +1,134 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.sqlite
2
+ *.db
3
+ .gitpod.yml
4
+
5
+ # Logs
6
+ logs
7
+ *.log
8
+ npm-debug.log*
9
+ yarn-debug.log*
10
+ yarn-error.log*
11
+ lerna-debug.log*
12
+ .pnpm-debug.log*
13
+
14
+ # Diagnostic reports (https://nodejs.org/api/report.html)
15
+ report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
16
+
17
+ # Runtime data
18
+ pids
19
+ *.pid
20
+ *.seed
21
+ *.pid.lock
22
+
23
+ # Directory for instrumented libs generated by jscoverage/JSCover
24
+ lib-cov
25
+
26
+ # Coverage directory used by tools like istanbul
27
+ coverage
28
+ *.lcov
29
+
30
+ # nyc test coverage
31
+ .nyc_output
32
+
33
+ # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
34
+ .grunt
35
+
36
+ # Bower dependency directory (https://bower.io/)
37
+ bower_components
38
+
39
+ # node-waf configuration
40
+ .lock-wscript
41
+
42
+ # Compiled binary addons (https://nodejs.org/api/addons.html)
43
+ build/Release
44
+
45
+ # Dependency directories
46
+ node_modules/
47
+ jspm_packages/
48
+
49
+ # Snowpack dependency directory (https://snowpack.dev/)
50
+ web_modules/
51
+
52
+ # TypeScript cache
53
+ *.tsbuildinfo
54
+
55
+ # Optional npm cache directory
56
+ .npm
57
+
58
+ # Optional eslint cache
59
+ .eslintcache
60
+
61
+ # Optional stylelint cache
62
+ .stylelintcache
63
+
64
+ # Microbundle cache
65
+ .rpt2_cache/
66
+ .rts2_cache_cjs/
67
+ .rts2_cache_es/
68
+ .rts2_cache_umd/
69
+
70
+ # Optional REPL history
71
+ .node_repl_history
72
+
73
+ # Output of 'npm pack'
74
+ *.tgz
75
+
76
+ # Yarn Integrity file
77
+ .yarn-integrity
78
+
79
+ # dotenv environment variable files
80
+ .env
81
+ .env.development.local
82
+ .env.test.local
83
+ .env.production.local
84
+ .env.local
85
+
86
+ # parcel-bundler cache (https://parceljs.org/)
87
+ .cache
88
+ .parcel-cache
89
+
90
+ # Next.js build output
91
+ .next
92
+ out
93
+
94
+ # Nuxt.js build / generate output
95
+ .nuxt
96
+ # dist
97
+
98
+ # Gatsby files
99
+ .cache/
100
+ # Comment in the public line in if your project uses Gatsby and not Next.js
101
+ # https://nextjs.org/blog/next-9-1#public-directory-support
102
+ # public
103
+
104
+ # vuepress build output
105
+ .vuepress/dist
106
+
107
+ # vuepress v2.x temp and cache directory
108
+ .temp
109
+ .cache
110
+
111
+ # Docusaurus cache and generated files
112
+ .docusaurus
113
+
114
+ # Serverless directories
115
+ .serverless/
116
+
117
+ # FuseBox cache
118
+ .fusebox/
119
+
120
+ # DynamoDB Local files
121
+ .dynamodb/
122
+
123
+ # TernJS port file
124
+ .tern-port
125
+
126
+ # Stores VSCode versions used for testing VSCode extensions
127
+ .vscode-test
128
+
129
+ # yarn v2
130
+ .yarn/cache
131
+ .yarn/unplugged
132
+ .yarn/build-state.yml
133
+ .yarn/install-state.gz
134
+ .pnp.*
.gitpod.yml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ tasks:
2
+ - init: cd webapp && npm install
3
+ command: cd webapp && npm run start
4
+
5
+
Dockerfile ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM node:19-alpine AS build
2
+
3
+ RUN addgroup -S app && adduser -S app -G app
4
+ RUN mkdir /app && chown app:app /app
5
+
6
+ RUN apk add --update --no-cache git
7
+
8
+ USER app
9
+
10
+ WORKDIR /app
11
+
12
+ COPY ./app/package.json ./
13
+ COPY ./app/tsconfig.json ./
14
+
15
+ RUN npm install
16
+
17
+ COPY ./app/craco.config.js ./craco.config.js
18
+ COPY ./app/public ./public
19
+ COPY ./app/src ./src
20
+
21
+ ENV NODE_ENV=production
22
+ ENV REACT_APP_AUTH_PROVIDER=local
23
+
24
+ RUN npm run build
25
+
26
+ FROM node:19-alpine AS server
27
+
28
+ RUN addgroup -S app && adduser -S app -G app
29
+
30
+ WORKDIR /app
31
+
32
+ COPY ./server/package.json ./
33
+ COPY ./server/tsconfig.json ./
34
+
35
+ RUN apk add --update --no-cache python3 py3-pip make g++ git
36
+ RUN npm install
37
+
38
+ COPY ./server/src ./src
39
+
40
+ RUN CI=true sh -c "cd /app && mkdir data && npm run start && rm -rf data"
41
+
42
+ COPY --from=build /app/build /app/public
43
+
44
+ LABEL org.opencontainers.image.source="https://github.com/cogentapps/chat-with-gpt"
45
+ ENV PORT 3000
46
+
47
+ CMD ["npm", "run", "start"]
LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Cogent Apps
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
README.md CHANGED
@@ -1,11 +1,53 @@
1
- ---
2
- title: Chat With Gpt
3
- emoji: 📉
4
- colorFrom: red
5
- colorTo: yellow
6
- sdk: docker
7
- pinned: false
8
- license: mit
9
- ---
10
-
11
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Chat with GPT
2
+ Chat with GPT is an open-source, unofficial ChatGPT app with extra features and more ways to customize your experience.
3
+ It connects ChatGPT with ElevenLabs to give ChatGPT a realistic human voice.
4
+
5
+ Or [self-host with Docker](#running-on-your-own-computer).
6
+
7
+ Powered by the new ChatGPT API from OpenAI, this app has been developed using TypeScript + React.
8
+ We welcome pull requests from the community!
9
+
10
+ https://user-images.githubusercontent.com/127109874/223613258-0c4fef2e-1d05-43a1-ac38-e972dafc2f98.mp4
11
+
12
+ ## Features
13
+ - **Fast** response times.
14
+ - **Search** through your past chat conversations.
15
+ - View and customize the System Prompt - the **secret prompt** the system shows the AI before your messages.
16
+ - Adjust the **creativity and randomness** of responses by setting the Temperature setting. Higher temperature means more creativity.
17
+ - Give ChatGPT AI a **realistic human voice** by connecting your ElevenLabs text-to-speech account.
18
+ - **Speech recognition** powered by OpenAI Whisper
19
+ - **Share** your favorite chat sessions online using public share URLs.
20
+ - Easily **copy-and-paste** ChatGPT messages.
21
+ - Edit your messages
22
+ - Regenerate ChatGPT messages
23
+ - **Full markdown support** including code, tables, and math.
24
+ - Pay for only what you use with the ChatGPT API.
25
+
26
+ ## Bring your own API keys
27
+
28
+ ### OpenAI
29
+ To get started with Chat with GPT, you will need to add your OpenAI API key on the settings screen. Click "Connect your OpenAI account to get started" on the home page to begin. Once you have added your API key, you can start chatting with ChatGPT.
30
+
31
+ Your API key is stored only on your device and is never transmitted to anyone except OpenAI. Please note that OpenAI API key usage is billed at a pay-as-you-go rate, separate from your ChatGPT subscription.
32
+
33
+ ### ElevenLabs
34
+ To use the realistic AI text-to-speech feature, you will need to add your ElevenLabs API key by clicking "Play" next to any message.
35
+
36
+ Your API key is stored only on your device and never transmitted to anyone except ElevenLabs.
37
+
38
+ ## Running on your own computer
39
+ To run on your own device, you can use Docker:
40
+
41
+ ```
42
+ docker run -v $(pwd)/data:/app/data -p 3000:3000 ghcr.io/cogentapps/chat-with-gpt:release
43
+ ```
44
+
45
+ Then navigate to http://localhost:3000 to view the app.
46
+
47
+ ## Updating
48
+ ```
49
+ docker pull ghcr.io/cogentapps/chat-with-gpt:release
50
+ ```
51
+
52
+ ## License
53
+ Chat with GPT is licensed under the MIT license. See the LICENSE file for more information.
docker-compose.yml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ version: '3'
2
+
3
+ services:
4
+ app:
5
+ build:
6
+ context: .
7
+ dockerfile: Dockerfile
8
+ working_dir: /app
9
+ volumes:
10
+ - ./data:/app/data
11
+ command: npm run start
12
+ ports:
13
+ - 3000:3000
14
+ environment:
15
+ - PORT=3000
16
+ - WEBAPP_PORT=3000