smart-chat-asp 1.0.1 → 1.0.2-cdn

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/README.md +56 -328
  2. package/lib/{arc-799ff210.mjs → arc-f5c26411.mjs} +11 -11
  3. package/lib/{blockDiagram-38ab4fdb-bf5bbf65.mjs → blockDiagram-c4efeb88-0ec00dbe.mjs} +7 -7
  4. package/lib/{c4Diagram-3d4e48cf-2b0e6635.mjs → c4Diagram-c83219d4-c9218d19.mjs} +2 -2
  5. package/lib/{channel-3d875520.mjs → channel-0a45826b.mjs} +1 -1
  6. package/lib/{classDiagram-70f12bd4-bc2c0590.mjs → classDiagram-beda092f-f0412450.mjs} +5 -5
  7. package/lib/{classDiagram-v2-f2320105-6e7dd432.mjs → classDiagram-v2-2358418a-ef8e2a02.mjs} +9 -9
  8. package/lib/{clone-37eeafe9.mjs → clone-82effd28.mjs} +1 -1
  9. package/lib/{createText-2e5e7dd3-81fb1c55.mjs → createText-1719965b-029a25b2.mjs} +243 -240
  10. package/lib/{edges-e0da2a9e-aa948eaf.mjs → edges-96097737-38fac62a.mjs} +312 -307
  11. package/lib/{erDiagram-9861fffd-198b71fe.mjs → erDiagram-0228fc6a-ca735e04.mjs} +4 -4
  12. package/lib/{flowDb-956e92f1-0af0a180.mjs → flowDb-c6c81e3f-19d8a407.mjs} +1 -1
  13. package/lib/{flowDiagram-66a62f08-e6a57d6e.mjs → flowDiagram-50d868cf-b7936e03.mjs} +296 -296
  14. package/lib/flowDiagram-v2-4f6560a1-e5e250a7.mjs +26 -0
  15. package/lib/{flowchart-elk-definition-4a651766-bd003eba.mjs → flowchart-elk-definition-6af322e1-b37d4c74.mjs} +5 -5
  16. package/lib/{ganttDiagram-c361ad54-d7a489eb.mjs → ganttDiagram-a2739b55-278854af.mjs} +2 -2
  17. package/lib/{gitGraphDiagram-72cf32ee-8249845b.mjs → gitGraphDiagram-82fe8481-03deaa1a.mjs} +1 -1
  18. package/lib/graph-883a84fb.mjs +495 -0
  19. package/lib/{index-3862675e-11a90f38.mjs → index-5325376f-dae0661d.mjs} +6 -6
  20. package/lib/{index-7d5bcc75.mjs → index-c5f55f25.mjs} +410 -375
  21. package/lib/{infoDiagram-f8f76790-e5a7c665.mjs → infoDiagram-8eee0895-470af01d.mjs} +1 -1
  22. package/lib/{journeyDiagram-49397b02-159b70e9.mjs → journeyDiagram-c64418c1-e3e70675.mjs} +3 -3
  23. package/lib/layout-e08b76ab.mjs +1453 -0
  24. package/lib/{line-f99dda04.mjs → line-d0ae027e.mjs} +1 -1
  25. package/lib/linear-54ddf98a.mjs +447 -0
  26. package/lib/main-6a832180.mjs +172536 -0
  27. package/lib/mindmap-definition-8da855dc-1af281a7.mjs +22049 -0
  28. package/lib/{pieDiagram-8a3498a8-2789d871.mjs → pieDiagram-a8764435-c4eb3cfe.mjs} +2 -2
  29. package/lib/{quadrantDiagram-120e2f19-35c14026.mjs → quadrantDiagram-1e28029f-e261ce7e.mjs} +2 -2
  30. package/lib/{requirementDiagram-deff3bca-fe92cbda.mjs → requirementDiagram-08caed73-0a82fd56.mjs} +4 -4
  31. package/lib/{sankeyDiagram-04a897e0-c6c540d3.mjs → sankeyDiagram-a04cb91d-5b7f53c7.mjs} +1 -1
  32. package/lib/{sequenceDiagram-704730f1-d7df402a.mjs → sequenceDiagram-c5b8d532-a06e749d.mjs} +2 -2
  33. package/lib/smart-chat.d.ts +4 -0
  34. package/lib/smart-chat.es.js +1 -1
  35. package/lib/{stateDiagram-587899a1-29ee2eaf.mjs → stateDiagram-1ecb1508-a69e8461.mjs} +5 -5
  36. package/lib/{stateDiagram-v2-d93cdb3a-8f366fed.mjs → stateDiagram-v2-c2b004d7-a3d6a456.mjs} +9 -9
  37. package/lib/style.css +1 -1
  38. package/lib/{styles-9a916d00-0919841c.mjs → styles-b4e223ce-b2d06d9e.mjs} +1 -1
  39. package/lib/{styles-6aaf32cf-52404081.mjs → styles-ca3715f6-5be6fca0.mjs} +1 -1
  40. package/lib/{styles-c10674c1-91e3afff.mjs → styles-d45a18b0-5a374d3a.mjs} +17 -14
  41. package/lib/{svgDrawCommon-08f97a94-64eed6c2.mjs → svgDrawCommon-b86b1483-65510569.mjs} +3 -3
  42. package/lib/{timeline-definition-85554ec2-e738bba9.mjs → timeline-definition-faaaa080-10524d48.mjs} +2 -2
  43. package/lib/{xychartDiagram-e933f94c-35ccc3b8.mjs → xychartDiagram-f5964ef8-2916d90b.mjs} +4 -4
  44. package/license +21 -21
  45. package/package.json +10 -6
  46. package/README.zh.md +0 -367
  47. package/lib/blockDiagram-38ab4fdb-bf5bbf65.mjs.gz +0 -0
  48. package/lib/c4Diagram-3d4e48cf-2b0e6635.mjs.gz +0 -0
  49. package/lib/classDiagram-70f12bd4-bc2c0590.mjs.gz +0 -0
  50. package/lib/createText-2e5e7dd3-81fb1c55.mjs.gz +0 -0
  51. package/lib/edges-e0da2a9e-aa948eaf.mjs.gz +0 -0
  52. package/lib/erDiagram-9861fffd-198b71fe.mjs.gz +0 -0
  53. package/lib/flowDb-956e92f1-0af0a180.mjs.gz +0 -0
  54. package/lib/flowDiagram-66a62f08-e6a57d6e.mjs.gz +0 -0
  55. package/lib/flowDiagram-v2-96b9c2cf-94f961a9.mjs +0 -26
  56. package/lib/flowchart-elk-definition-4a651766-bd003eba.mjs.gz +0 -0
  57. package/lib/ganttDiagram-c361ad54-d7a489eb.mjs.gz +0 -0
  58. package/lib/gitGraphDiagram-72cf32ee-8249845b.mjs.gz +0 -0
  59. package/lib/graph-abf26b74.mjs +0 -512
  60. package/lib/graph-abf26b74.mjs.gz +0 -0
  61. package/lib/index-202ce608.mjs +0 -40
  62. package/lib/index-202ce608.mjs.gz +0 -0
  63. package/lib/index-3862675e-11a90f38.mjs.gz +0 -0
  64. package/lib/index-5ab8ef6d.mjs +0 -28
  65. package/lib/index-5ab8ef6d.mjs.gz +0 -0
  66. package/lib/index-7d5bcc75.mjs.gz +0 -0
  67. package/lib/infoDiagram-f8f76790-e5a7c665.mjs.gz +0 -0
  68. package/lib/journeyDiagram-49397b02-159b70e9.mjs.gz +0 -0
  69. package/lib/katex-78209485.mjs +0 -11691
  70. package/lib/katex-78209485.mjs.gz +0 -0
  71. package/lib/layout-7443d24c.mjs +0 -1495
  72. package/lib/layout-7443d24c.mjs.gz +0 -0
  73. package/lib/linear-59a89be6.mjs +0 -447
  74. package/lib/linear-59a89be6.mjs.gz +0 -0
  75. package/lib/main-d5ddd425.mjs +0 -117824
  76. package/lib/main-d5ddd425.mjs.gz +0 -0
  77. package/lib/mindmap-definition-fc14e90a-65f56a67.mjs +0 -19384
  78. package/lib/mindmap-definition-fc14e90a-65f56a67.mjs.gz +0 -0
  79. package/lib/pieDiagram-8a3498a8-2789d871.mjs.gz +0 -0
  80. package/lib/quadrantDiagram-120e2f19-35c14026.mjs.gz +0 -0
  81. package/lib/requirementDiagram-deff3bca-fe92cbda.mjs.gz +0 -0
  82. package/lib/sankeyDiagram-04a897e0-c6c540d3.mjs.gz +0 -0
  83. package/lib/sequenceDiagram-704730f1-d7df402a.mjs.gz +0 -0
  84. package/lib/stateDiagram-587899a1-29ee2eaf.mjs.gz +0 -0
  85. package/lib/style.css.gz +0 -0
  86. package/lib/styles-6aaf32cf-52404081.mjs.gz +0 -0
  87. package/lib/styles-9a916d00-0919841c.mjs.gz +0 -0
  88. package/lib/styles-c10674c1-91e3afff.mjs.gz +0 -0
  89. package/lib/timeline-definition-85554ec2-e738bba9.mjs.gz +0 -0
  90. package/lib/xychartDiagram-e933f94c-35ccc3b8.mjs.gz +0 -0
package/README.md CHANGED
@@ -1,364 +1,92 @@
1
- # ChatGPT Web
2
-
3
- > Disclaimer: This project is only published on GitHub, based on the MIT license, free and for open source learning usage. And there will be no any form of account selling, paid service, discussion group, discussion group and other behaviors. Beware of being deceived.
4
-
5
- [中文](README.zh.md)
6
-
7
- ![cover](./docs/c1.png)
8
- ![cover2](./docs/c2.png)
9
-
10
- - [ChatGPT Web](#chatgpt-web)
11
- - [Introduction](#introduction)
12
- - [Roadmap](#roadmap)
13
- - [Prerequisites](#prerequisites)
14
- - [Node](#node)
15
- - [PNPM](#pnpm)
16
- - [Filling in the Key](#filling-in-the-key)
17
- - [Install Dependencies](#install-dependencies)
18
- - [Backend](#backend)
19
- - [Frontend](#frontend)
20
- - [Run in Test Environment](#run-in-test-environment)
21
- - [Backend Service](#backend-service)
22
- - [Frontend Webpage](#frontend-webpage)
23
- - [Environment Variables](#environment-variables)
24
- - [Packaging](#packaging)
25
- - [Use Docker](#use-docker)
26
- - [Docker Parameter Examples](#docker-parameter-examples)
27
- - [Docker build \& Run](#docker-build--run)
28
- - [Docker compose](#docker-compose)
29
- - [Prevent Crawlers](#prevent-crawlers)
30
- - [Deploy with Railway](#deploy-with-railway)
31
- - [Railway Environment Variables](#railway-environment-variables)
32
- - [Deploy with Sealos](#deploy-with-sealos)
33
- - [Package Manually](#package-manually)
34
- - [Backend Service](#backend-service-1)
35
- - [Frontend Webpage](#frontend-webpage-1)
36
- - [FAQ](#faq)
37
- - [Contributing](#contributing)
38
- - [Acknowledgements](#acknowledgements)
39
- - [Sponsors](#sponsors)
40
- - [License](#license)
41
- ## Introduction
42
-
43
- Supports dual models and provides two unofficial `ChatGPT API` methods
44
-
45
- | Method | Free? | Reliability | Quality |
46
- | ---------------------------------- | ----- | ----------- | ------- |
47
- | `ChatGPTAPI(gpt-3.5-turbo-0301)` | No | Reliable | Relatively stupid |
48
- | `ChatGPTUnofficialProxyAPI(web accessToken)` | Yes | Relatively unreliable | Smart |
49
-
50
- Comparison:
51
- 1. `ChatGPTAPI` uses `gpt-3.5-turbo` through `OpenAI` official `API` to call `ChatGPT`
52
- 2. `ChatGPTUnofficialProxyAPI` uses unofficial proxy server to access `ChatGPT`'s backend `API`, bypass `Cloudflare` (dependent on third-party servers, and has rate limits)
53
-
54
- Warnings:
55
- 1. You should first use the `API` method
56
- 2. When using the `API`, if the network is not working, it is blocked in China, you need to build your own proxy, never use someone else's public proxy, which is dangerous.
57
- 3. When using the `accessToken` method, the reverse proxy will expose your access token to third parties. This should not have any adverse effects, but please consider the risks before using this method.
58
- 4. When using `accessToken`, whether you are a domestic or foreign machine, proxies will be used. The default proxy is [pengzhile](https://github.com/pengzhile)'s `https://ai.fakeopen.com/api/conversation`. This is not a backdoor or monitoring unless you have the ability to flip over `CF` verification yourself. Use beforehand acknowledge. [Community Proxy](https://github.com/transitive-bullshit/chatgpt-api#reverse-proxy) (Note: Only these two are recommended, other third-party sources, please identify for yourself)
59
- 5. When publishing the project to public network, you should set the `AUTH_SECRET_KEY` variable to add your password access, you should also modify the `title` in `index. html` to prevent it from being searched by keywords.
60
-
61
- Switching methods:
62
- 1. Enter the `service/.env.example` file, copy the contents to the `service/.env` file
63
- 2. To use `OpenAI API Key`, fill in the `OPENAI_API_KEY` field [(get apiKey)](https://platform.openai.com/overview)
64
- 3. To use `Web API`, fill in the `OPENAI_ACCESS_TOKEN` field [(get accessToken)](https://chat.openai.com/api/auth/session)
65
- 4. `OpenAI API Key` takes precedence when both exist
66
-
67
- Environment variables:
68
-
69
- See all parameter variables [here](#environment-variables)
1
+ # Web
70
2
 
71
- ## Roadmap
72
- [✓] Dual models
73
-
74
- [✓] Multi-session storage and context logic
75
-
76
- [✓] Formatting and beautification of code and other message types
77
-
78
- [✓] Access control
79
-
80
- [✓] Data import/export
81
-
82
- [✓] Save messages as local images
83
-
84
- [✓] Multilingual interface
85
-
86
- [✓] Interface themes
87
-
88
- [✗] More...
89
-
90
- ## Prerequisites
91
-
92
- ### Node
93
-
94
- `node` requires version `^16 || ^18 || ^19` (`node >= 14` needs [fetch polyfill](https://github.com/developit/unfetch#usage-as-a-polyfill) installation), use [nvm](https://github.com/nvm-sh/nvm) to manage multiple local `node` versions
95
-
96
- ```shell
97
- node -v
98
- ```
99
-
100
- ### PNPM
101
- If you haven't installed `pnpm`
102
- ```shell
103
- npm install pnpm -g
104
- ```
105
-
106
- ### Filling in the Key
107
- Get `Openai Api Key` or `accessToken` and fill in the local environment variables [Go to Introduction](#introduction)
108
-
109
- ```
110
- # service/.env file
111
-
112
- # OpenAI API Key - https://platform.openai.com/overview
113
- OPENAI_API_KEY=
114
-
115
- # change this to an `accessToken` extracted from the ChatGPT site's `https://chat.openai.com/api/auth/session` response
116
- OPENAI_ACCESS_TOKEN=
117
- ```
118
-
119
- ## Install Dependencies
120
-
121
- > For the convenience of "backend developers" to understand the burden, the front-end "workspace" mode is not adopted, but separate folders are used to store them. If you only need to do secondary development of the front-end page, delete the `service` folder.
122
-
123
- ### Backend
124
-
125
- Enter the folder `/service` and run the following commands
126
-
127
- ```shell
128
- pnpm install
129
- ```
130
-
131
- ### Frontend
132
- Run the following commands at the root directory
133
- ```shell
134
- pnpm bootstrap
135
- ```
136
-
137
- ## Run in Test Environment
138
- ### Backend Service
139
-
140
- Enter the folder `/service` and run the following commands
141
-
142
- ```shell
143
- pnpm start
144
- ```
145
-
146
- ### Frontend Webpage
147
- Run the following commands at the root directory
148
- ```shell
149
- pnpm dev
150
- ```
151
-
152
- ## Environment Variables
153
-
154
- `API` available:
155
-
156
- - `OPENAI_API_KEY` and `OPENAI_ACCESS_TOKEN` choose one
157
- - `OPENAI_API_MODEL` Set model, optional, default: `gpt-3.5-turbo`
158
- - `OPENAI_API_BASE_URL` Set interface address, optional, default: `https://api.openai.com`
159
- - `OPENAI_API_DISABLE_DEBUG` Set interface to close debug logs, optional, default: empty does not close
160
-
161
- `ACCESS_TOKEN` available:
162
-
163
- - `OPENAI_ACCESS_TOKEN` and `OPENAI_API_KEY` choose one, `OPENAI_API_KEY` takes precedence when both exist
164
- - `API_REVERSE_PROXY` Set reverse proxy, optional, default: `https://ai.fakeopen.com/api/conversation`, [Community](https://github.com/transitive-bullshit/chatgpt-api#reverse-proxy) (Note: Only these two are recommended, other third party sources, please identify for yourself)
165
-
166
- Common:
167
-
168
- - `AUTH_SECRET_KEY` Access permission key, optional
169
- - `MAX_REQUEST_PER_HOUR` Maximum number of requests per hour, optional, unlimited by default
170
- - `TIMEOUT_MS` Timeout, unit milliseconds, optional
171
- - `SOCKS_PROXY_HOST` and `SOCKS_PROXY_PORT` take effect together, optional
172
- - `SOCKS_PROXY_PORT` and `SOCKS_PROXY_HOST` take effect together, optional
173
- - `HTTPS_PROXY` Support `http`, `https`, `socks5`, optional
174
- - `ALL_PROXY` Support `http`, `https`, `socks5`, optional
175
-
176
- ## Packaging
177
3
 
178
- ### Use Docker
179
4
 
180
- #### Docker Parameter Examples
5
+ ## Getting started
181
6
 
182
- ![docker](./docs/docker.png)
7
+ To make it easy for you to get started with GitLab, here's a list of recommended next steps.
183
8
 
184
- #### Docker build & Run
9
+ Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
185
10
 
186
- ```bash
187
- docker build -t chatgpt-web .
11
+ ## Add your files
188
12
 
189
- # Foreground running
190
- docker run --name chatgpt-web --rm -it -p 127.0.0.1:3002:3002 --env OPENAI_API_KEY=your_api_key chatgpt-web
13
+ - [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
14
+ - [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
191
15
 
192
- # Background running
193
- docker run --name chatgpt-web -d -p 127.0.0.1:3002:3002 --env OPENAI_API_KEY=your_api_key chatgpt-web
194
-
195
- # Run address
196
- http://localhost:3002/
197
16
  ```
198
-
199
- #### Docker compose
200
-
201
- [Hub address](https://hub.docker.com/repository/docker/chenzhaoyu94/chatgpt-web/general)
202
-
203
- ```yml
204
- version: '3'
205
-
206
- services:
207
- app:
208
- image: chenzhaoyu94/chatgpt-web # always use latest, pull the tag image again to update
209
- ports:
210
- - 127.0.0.1:3002:3002
211
- environment:
212
- # choose one
213
- OPENAI_API_KEY: sk-xxx
214
- # choose one
215
- OPENAI_ACCESS_TOKEN: xxx
216
- # API interface address, optional, available when OPENAI_API_KEY is set
217
- OPENAI_API_BASE_URL: xxx
218
- # API model, optional, available when OPENAI_API_KEY is set, https://platform.openai.com/docs/models
219
- # gpt-4, gpt-4o, gpt-4o-mini, gpt-4-turbo, gpt-4-turbo-preview, gpt-4-0125-preview, gpt-4-1106-preview, gpt-4-0314, gpt-4-0613, gpt-4-32k, gpt-4-32k-0314, gpt-4-32k-0613, gpt-3.5-turbo-16k, gpt-3.5-turbo-16k-0613, gpt-3.5-turbo, gpt-3.5-turbo-0301, gpt-3.5-turbo-0613, text-davinci-003, text-davinci-002, code-davinci-002
220
- OPENAI_API_MODEL: xxx
221
- # reverse proxy, optional
222
- API_REVERSE_PROXY: xxx
223
- # access permission key, optional
224
- AUTH_SECRET_KEY: xxx
225
- # maximum number of requests per hour, optional, unlimited by default
226
- MAX_REQUEST_PER_HOUR: 0
227
- # timeout, unit milliseconds, optional
228
- TIMEOUT_MS: 60000
229
- # Socks proxy, optional, take effect with SOCKS_PROXY_PORT
230
- SOCKS_PROXY_HOST: xxx
231
- # Socks proxy port, optional, take effect with SOCKS_PROXY_HOST
232
- SOCKS_PROXY_PORT: xxx
233
- # HTTPS proxy, optional, support http,https,socks5
234
- HTTPS_PROXY: http://xxx:7890
17
+ cd existing_repo
18
+ git remote add origin http://10.12.5.53/MIGUMS/web.git
19
+ git branch -M main
20
+ git push -uf origin main
235
21
  ```
236
22
 
237
- - `OPENAI_API_BASE_URL` Optional, available when `OPENAI_API_KEY` is set
238
- - `OPENAI_API_MODEL` Optional, available when `OPENAI_API_KEY` is set
239
-
240
- #### Prevent Crawlers
23
+ ## Integrate with your tools
241
24
 
242
- **nginx**
25
+ - [ ] [Set up project integrations](http://10.12.5.53/MIGUMS/web/-/settings/integrations)
243
26
 
244
- Fill in the following configuration in the nginx configuration file to prevent crawlers. You can refer to the `docker-compose/nginx/nginx.conf` file to add anti-crawler methods
27
+ ## Collaborate with your team
245
28
 
246
- ```
247
- # Prevent crawlers
248
- if ($http_user_agent ~* "360Spider|JikeSpider|Spider|spider|bot|Bot|2345Explorer|curl|wget|webZIP|qihoobot|Baiduspider|Googlebot|Googlebot-Mobile|Googlebot-Image|Mediapartners-Google|Adsbot-Google|Feedfetcher-Google|Yahoo! Slurp|Yahoo! Slurp China|YoudaoBot|Sosospider|Sogou spider|Sogou web spider|MSNBot|ia_archiver|Tomato Bot|NSPlayer|bingbot")
249
- {
250
- return 403;
251
- }
252
- ```
29
+ - [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
30
+ - [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
31
+ - [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
32
+ - [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
33
+ - [ ] [Automatically merge when pipeline succeeds](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
253
34
 
254
- ### Deploy with Railway
35
+ ## Test and Deploy
255
36
 
256
- [![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/new/template/yytmgc)
37
+ Use the built-in continuous integration in GitLab.
257
38
 
258
- #### Railway Environment Variables
39
+ - [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
40
+ - [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
41
+ - [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
42
+ - [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
43
+ - [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
259
44
 
260
- | Environment variable name | Required | Remarks |
261
- | --------------------- | ---------------------- | -------------------------------------------------------------------------------------------------- |
262
- | `PORT` | Required | Default `3002` |
263
- | `AUTH_SECRET_KEY` | Optional | Access permission key |
264
- | `MAX_REQUEST_PER_HOUR` | Optional | Maximum number of requests per hour, optional, unlimited by default |
265
- | `TIMEOUT_MS` | Optional | Timeout, unit milliseconds |
266
- | `OPENAI_API_KEY` | `OpenAI API` choose one | `apiKey` required for `OpenAI API` [(get apiKey)](https://platform.openai.com/overview) |
267
- | `OPENAI_ACCESS_TOKEN` | `Web API` choose one | `accessToken` required for `Web API` [(get accessToken)](https://chat.openai.com/api/auth/session) |
268
- | `OPENAI_API_BASE_URL` | Optional, available when `OpenAI API` | `API` interface address |
269
- | `OPENAI_API_MODEL` | Optional, available when `OpenAI API` | `API` model |
270
- | `API_REVERSE_PROXY` | Optional, available when `Web API` | `Web API` reverse proxy address [Details](https://github.com/transitive-bullshit/chatgpt-api#reverse-proxy) |
271
- | `SOCKS_PROXY_HOST` | Optional, take effect with `SOCKS_PROXY_PORT` | Socks proxy |
272
- | `SOCKS_PROXY_PORT` | Optional, take effect with `SOCKS_PROXY_HOST` | Socks proxy port |
273
- | `SOCKS_PROXY_USERNAME` | Optional, take effect with `SOCKS_PROXY_HOST` | Socks proxy username |
274
- | `SOCKS_PROXY_PASSWORD` | Optional, take effect with `SOCKS_PROXY_HOST` | Socks proxy password |
275
- | `HTTPS_PROXY` | Optional | HTTPS proxy, support http,https, socks5 |
276
- | `ALL_PROXY` | Optional | All proxies, support http,https, socks5 |
45
+ ***
277
46
 
278
- > Note: Modifying environment variables on `Railway` will re-`Deploy`
47
+ # Editing this README
279
48
 
280
- ### Deploy with Sealos
49
+ When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template.
281
50
 
282
- [![](https://raw.githubusercontent.com/labring-actions/templates/main/Deploy-on-Sealos.svg)](https://cloud.sealos.io/?openapp=system-fastdeploy%3FtemplateName%3Dchatgpt-web)
51
+ ## Suggestions for a good README
52
+ Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
283
53
 
284
- > Environment variables are consistent with Docker environment variables
54
+ ## Name
55
+ Choose a self-explaining name for your project.
285
56
 
286
- ### Package Manually
287
- #### Backend Service
288
- > If you don't need the `node` interface of this project, you can omit the following operations
57
+ ## Description
58
+ Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
289
59
 
290
- Copy the `service` folder to the server where you have the `node` service environment.
291
-
292
- ```shell
293
- # Install
294
- pnpm install
295
-
296
- # Pack
297
- pnpm build
298
-
299
- # Run
300
- pnpm prod
301
- ```
60
+ ## Badges
61
+ On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
302
62
 
303
- PS: It is also okay to run `pnpm start` directly on the server without packing
63
+ ## Visuals
64
+ Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
304
65
 
305
- #### Frontend Webpage
66
+ ## Installation
67
+ Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
306
68
 
307
- 1. Modify the `VITE_GLOB_API_URL` field in the `.env` file at the root directory to your actual backend interface address
69
+ ## Usage
70
+ Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
308
71
 
309
- 2. Run the following commands at the root directory, then copy the files in the `dist` folder to the root directory of your website service
72
+ ## Support
73
+ Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
310
74
 
311
- [Reference](https://cn.vitejs.dev/guide/static -deploy.html#building-the-app)
312
-
313
- ```shell
314
- pnpm build
315
- ```
316
-
317
- ## FAQ
318
- Q: Why does `Git` commit always report errors?
319
-
320
- A: Because there is a commit message verification, please follow the [Commit Guide](./CONTRIBUTING.md)
321
-
322
- Q: Where to change the request interface if only the front-end page is used?
323
-
324
- A: The `VITE_GLOB_API_URL` field in the `.env` file at the root directory.
325
-
326
- Q: All files explode red when saving?
327
-
328
- A: `vscode` please install the recommended plug-ins for the project, or manually install the `Eslint` plug-in.
329
-
330
- Q: No typewriter effect on the front end?
331
-
332
- A: One possible reason is that after Nginx reverse proxy, buffer is turned on, then Nginx will try to buffer some data from the backend before sending it to the browser. Please try adding `proxy_buffering off; ` after the reverse proxy parameter, then reload Nginx. Other web server configurations are similar.
75
+ ## Roadmap
76
+ If you have ideas for releases in the future, it is a good idea to list them in the README.
333
77
 
334
78
  ## Contributing
79
+ State if you are open to contributions and what your requirements are for accepting them.
335
80
 
336
- Please read the [Contributing Guide](./CONTRIBUTING.md) before contributing
337
-
338
- Thanks to everyone who has contributed!
339
-
340
- <a href="https://github.com/Chanzhaoyu/chatgpt-web/graphs/contributors">
341
- <img src="https://contrib.rocks/image?repo=Chanzhaoyu/chatgpt-web" />
342
- </a>
81
+ For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
343
82
 
344
- ## Acknowledgements
83
+ You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
345
84
 
346
- Thanks to [JetBrains](https://www.jetbrains.com/) SoftWare for providing free Open Source license for this project.
347
-
348
- ## Sponsors
349
-
350
- If you find this project helpful and can afford it, you can give me a little support. Anyway, thanks for your support~
351
-
352
- <div style="display: flex; gap: 20px;">
353
- <div style="text-align: center">
354
- <img style="max-width: 100%" src="./docs/wechat.png" alt="WeChat" />
355
- <p>WeChat Pay</p>
356
- </div>
357
- <div style="text-align: center">
358
- <img style="max-width: 100%" src="./docs/alipay.png" alt="Alipay" />
359
- <p>Alipay</p>
360
- </div>
361
- </div>
85
+ ## Authors and acknowledgment
86
+ Show your appreciation to those who have contributed to the project.
362
87
 
363
88
  ## License
364
- MIT © []
89
+ For open source projects, say how it is licensed.
90
+
91
+ ## Project status
92
+ If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
@@ -1,5 +1,5 @@
1
1
  import { w as ln, c as O } from "./path-428ebac9.mjs";
2
- import { bs as an, bt as G, bu as P, bv as rn, bw as y, aE as tn, bx as K, by as _, bz as un, bA as o, bB as sn, bC as on, bD as fn } from "./main-d5ddd425.mjs";
2
+ import { bt as an, bu as G, bv as P, bw as rn, bx as y, aE as tn, by as K, bz as _, bA as un, bB as o, bC as sn, bD as on, bE as fn } from "./main-6a832180.mjs";
3
3
  function cn(l) {
4
4
  return l.innerRadius;
5
5
  }
@@ -15,13 +15,13 @@ function mn(l) {
15
15
  function pn(l) {
16
16
  return l && l.padAngle;
17
17
  }
18
- function xn(l, h, q, D, v, A, S, a) {
19
- var z = q - l, i = D - h, n = S - v, m = a - A, r = m * z - n * i;
18
+ function xn(l, h, q, E, v, A, S, a) {
19
+ var z = q - l, i = E - h, n = S - v, m = a - A, r = m * z - n * i;
20
20
  if (!(r * r < y))
21
21
  return r = (n * (h - A) - m * (l - v)) / r, [l + r * z, h + r * i];
22
22
  }
23
- function V(l, h, q, D, v, A, S) {
24
- var a = l - q, z = h - D, i = (S ? A : -A) / K(a * a + z * z), n = i * z, m = -i * a, r = l + n, s = h + m, f = q + n, c = D + m, j = (r + f) / 2, t = (s + c) / 2, p = f - r, g = c - s, R = p * p + g * g, b = v - A, T = r * c - f * s, B = (g < 0 ? -1 : 1) * K(fn(0, b * b * R - T * T)), C = (T * g - p * B) / R, I = (-T * p - g * B) / R, w = (T * g + p * B) / R, x = (-T * p + g * B) / R, d = C - j, e = I - t, u = w - j, F = x - t;
23
+ function V(l, h, q, E, v, A, S) {
24
+ var a = l - q, z = h - E, i = (S ? A : -A) / K(a * a + z * z), n = i * z, m = -i * a, r = l + n, s = h + m, f = q + n, c = E + m, j = (r + f) / 2, t = (s + c) / 2, p = f - r, g = c - s, R = p * p + g * g, b = v - A, T = r * c - f * s, B = (g < 0 ? -1 : 1) * K(fn(0, b * b * R - T * T)), C = (T * g - p * B) / R, I = (-T * p - g * B) / R, w = (T * g + p * B) / R, x = (-T * p + g * B) / R, d = C - j, e = I - t, u = w - j, F = x - t;
25
25
  return d * d + e * e > u * u + F * F && (C = w, I = x), {
26
26
  cx: C,
27
27
  cy: I,
@@ -32,7 +32,7 @@ function V(l, h, q, D, v, A, S) {
32
32
  };
33
33
  }
34
34
  function vn() {
35
- var l = cn, h = yn, q = O(0), D = null, v = gn, A = mn, S = pn, a = null, z = ln(i);
35
+ var l = cn, h = yn, q = O(0), E = null, v = gn, A = mn, S = pn, a = null, z = ln(i);
36
36
  function i() {
37
37
  var n, m, r = +l.apply(this, arguments), s = +h.apply(this, arguments), f = v.apply(this, arguments) - rn, c = A.apply(this, arguments) - rn, j = un(c - f), t = c > f;
38
38
  if (a || (a = n = z()), s < r && (m = s, s = r, r = m), !(s > y))
@@ -40,17 +40,17 @@ function vn() {
40
40
  else if (j > tn - y)
41
41
  a.moveTo(s * G(f), s * P(f)), a.arc(0, 0, s, f, c, !t), r > y && (a.moveTo(r * G(c), r * P(c)), a.arc(0, 0, r, c, f, t));
42
42
  else {
43
- var p = f, g = c, R = f, b = c, T = j, B = j, C = S.apply(this, arguments) / 2, I = C > y && (D ? +D.apply(this, arguments) : K(r * r + s * s)), w = _(un(s - r) / 2, +q.apply(this, arguments)), x = w, d = w, e, u;
43
+ var p = f, g = c, R = f, b = c, T = j, B = j, C = S.apply(this, arguments) / 2, I = C > y && (E ? +E.apply(this, arguments) : K(r * r + s * s)), w = _(un(s - r) / 2, +q.apply(this, arguments)), x = w, d = w, e, u;
44
44
  if (I > y) {
45
45
  var F = sn(I / r * P(C)), L = sn(I / s * P(C));
46
46
  (T -= F * 2) > y ? (F *= t ? 1 : -1, R += F, b -= F) : (T = 0, R = b = (f + c) / 2), (B -= L * 2) > y ? (L *= t ? 1 : -1, p += L, g -= L) : (B = 0, p = g = (f + c) / 2);
47
47
  }
48
48
  var H = s * G(p), J = s * P(p), M = r * G(b), N = r * P(b);
49
49
  if (w > y) {
50
- var Q = s * G(g), U = s * P(g), W = r * G(R), X = r * P(R), E;
50
+ var Q = s * G(g), U = s * P(g), W = r * G(R), X = r * P(R), D;
51
51
  if (j < an)
52
- if (E = xn(H, J, W, X, Q, U, M, N)) {
53
- var Y = H - E[0], Z = J - E[1], $ = Q - E[0], k = U - E[1], nn = 1 / P(on((Y * $ + Z * k) / (K(Y * Y + Z * Z) * K($ * $ + k * k))) / 2), en = K(E[0] * E[0] + E[1] * E[1]);
52
+ if (D = xn(H, J, W, X, Q, U, M, N)) {
53
+ var Y = H - D[0], Z = J - D[1], $ = Q - D[0], k = U - D[1], nn = 1 / P(on((Y * $ + Z * k) / (K(Y * Y + Z * Z) * K($ * $ + k * k))) / 2), en = K(D[0] * D[0] + D[1] * D[1]);
54
54
  x = _(w, (r - en) / (nn - 1)), d = _(w, (s - en) / (nn + 1));
55
55
  } else
56
56
  x = d = 0;
@@ -70,7 +70,7 @@ function vn() {
70
70
  }, i.cornerRadius = function(n) {
71
71
  return arguments.length ? (q = typeof n == "function" ? n : O(+n), i) : q;
72
72
  }, i.padRadius = function(n) {
73
- return arguments.length ? (D = n == null ? null : typeof n == "function" ? n : O(+n), i) : D;
73
+ return arguments.length ? (E = n == null ? null : typeof n == "function" ? n : O(+n), i) : E;
74
74
  }, i.startAngle = function(n) {
75
75
  return arguments.length ? (v = typeof n == "function" ? n : O(+n), i) : v;
76
76
  }, i.endAngle = function(n) {
@@ -1,13 +1,13 @@
1
- import { Y as he, aJ as se, a1 as H, a3 as ye, a2 as S, ao as Ee, al as we, a5 as De, a9 as ve } from "./main-d5ddd425.mjs";
2
- import { c as Ne } from "./clone-37eeafe9.mjs";
3
- import { i as ke, c as Ie, b as Oe, d as Te, a as ge, p as ze } from "./edges-e0da2a9e-aa948eaf.mjs";
4
- import { G as Ce } from "./graph-abf26b74.mjs";
1
+ import { Y as he, aJ as se, a1 as H, a3 as ye, a2 as S, ao as Ee, al as we, a5 as De, a9 as ve } from "./main-6a832180.mjs";
2
+ import { c as Ne } from "./clone-82effd28.mjs";
3
+ import { i as ke, c as Ie, b as Oe, d as Te, a as ge, p as ze } from "./edges-96097737-38fac62a.mjs";
4
+ import { G as Ce } from "./graph-883a84fb.mjs";
5
5
  import { o as Ae } from "./ordinal-980380c7.mjs";
6
6
  import { s as Re } from "./Tableau10-2ff7471d.mjs";
7
- import { c as Be } from "./channel-3d875520.mjs";
7
+ import { c as Be } from "./channel-0a45826b.mjs";
8
8
  import "vue";
9
- import "./createText-2e5e7dd3-81fb1c55.mjs";
10
- import "./line-f99dda04.mjs";
9
+ import "./createText-1719965b-029a25b2.mjs";
10
+ import "./line-d0ae027e.mjs";
11
11
  import "./array-2ff2c7a6.mjs";
12
12
  import "./path-428ebac9.mjs";
13
13
  import "./init-f9637058.mjs";
@@ -1,5 +1,5 @@
1
- import { T as we, U as Te, W as Oe, X as Re, Y as Dt, Z as ue, $ as De, a0 as wt, a1 as Nt, a2 as le, a3 as Se, a4 as Pe, a5 as Kt, a6 as oe, a7 as Me } from "./main-d5ddd425.mjs";
2
- import { d as Le, g as Ne } from "./svgDrawCommon-08f97a94-64eed6c2.mjs";
1
+ import { T as we, U as Te, W as Oe, X as Re, Y as Dt, Z as ue, $ as De, a0 as wt, a1 as Nt, a2 as le, a3 as Se, a4 as Pe, a5 as Kt, a6 as oe, a7 as Me } from "./main-6a832180.mjs";
2
+ import { d as Le, g as Ne } from "./svgDrawCommon-b86b1483-65510569.mjs";
3
3
  import "vue";
4
4
  var Yt = function() {
5
5
  var e = function(bt, _, x, m) {
@@ -1,4 +1,4 @@
1
- import { bE as r, bF as a } from "./main-d5ddd425.mjs";
1
+ import { bF as r, bG as a } from "./main-6a832180.mjs";
2
2
  const s = (n, o) => r.lang.round(a.parse(n)[o]), e = s;
3
3
  export {
4
4
  e as c
@@ -1,8 +1,8 @@
1
- import { p as A, d as S, s as G } from "./styles-9a916d00-0919841c.mjs";
2
- import { Y as v, a2 as y, a1 as B, a3 as W, ap as $, ak as M, aq as I } from "./main-d5ddd425.mjs";
3
- import { G as Y } from "./graph-abf26b74.mjs";
4
- import { l as O } from "./layout-7443d24c.mjs";
5
- import { l as P } from "./line-f99dda04.mjs";
1
+ import { p as A, d as S, s as G } from "./styles-b4e223ce-b2d06d9e.mjs";
2
+ import { Y as v, a2 as y, a1 as B, a3 as W, ap as $, ak as M, aq as I } from "./main-6a832180.mjs";
3
+ import { G as Y } from "./graph-883a84fb.mjs";
4
+ import { l as O } from "./layout-e08b76ab.mjs";
5
+ import { l as P } from "./line-d0ae027e.mjs";
6
6
  import "vue";
7
7
  import "./array-2ff2c7a6.mjs";
8
8
  import "./path-428ebac9.mjs";
@@ -1,13 +1,13 @@
1
- import { p as M, d as _, s as R } from "./styles-9a916d00-0919841c.mjs";
2
- import { a2 as d, Y as c, a1 as w, ak as B, ad as G, a9 as D, ac as E, a8 as C, a5 as A } from "./main-d5ddd425.mjs";
3
- import { G as z } from "./graph-abf26b74.mjs";
4
- import { r as P } from "./index-3862675e-11a90f38.mjs";
5
- import "./layout-7443d24c.mjs";
1
+ import { p as M, d as _, s as R } from "./styles-b4e223ce-b2d06d9e.mjs";
2
+ import { a2 as d, Y as c, a1 as w, ak as B, ad as G, a9 as D, ac as E, a8 as C, a5 as A } from "./main-6a832180.mjs";
3
+ import { G as z } from "./graph-883a84fb.mjs";
4
+ import { r as P } from "./index-5325376f-dae0661d.mjs";
5
+ import "./layout-e08b76ab.mjs";
6
6
  import "vue";
7
- import "./clone-37eeafe9.mjs";
8
- import "./edges-e0da2a9e-aa948eaf.mjs";
9
- import "./createText-2e5e7dd3-81fb1c55.mjs";
10
- import "./line-f99dda04.mjs";
7
+ import "./clone-82effd28.mjs";
8
+ import "./edges-96097737-38fac62a.mjs";
9
+ import "./createText-1719965b-029a25b2.mjs";
10
+ import "./line-d0ae027e.mjs";
11
11
  import "./array-2ff2c7a6.mjs";
12
12
  import "./path-428ebac9.mjs";
13
13
  const S = (s) => A.sanitizeText(s, c());
@@ -1,4 +1,4 @@
1
- import { a as r } from "./graph-abf26b74.mjs";
1
+ import { a as r } from "./graph-883a84fb.mjs";
2
2
  var a = 4;
3
3
  function n(o) {
4
4
  return r(o, a);