chore: 调整文件结构 service 和 web 分离

This commit is contained in:
ChenZhaoYu committed 2023-02-13 10:00:08 +08:00
1 parent 98e75c0c5c
commit f910b5f8a4
16 files changed
+3180 -773

No files matched your search

+2
View File
@@ -0,0 +1,2 @@
# OpenAI API Key
OPENAI_API_KEY=
+4
View File
@@ -0,0 +1,4 @@
{
"root": true,
"extends": ["@antfu"]
}
+29
View File
@@ -0,0 +1,29 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
.DS_Store
dist
dist-ssr
coverage
*.local
/cypress/videos/
/cypress/screenshots/
# Editor directories and files
.vscode/*
!.vscode/settings.json
!.vscode/extensions.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
+3
View File
@@ -0,0 +1,3 @@
{
"recommendations": ["dbaeumer.vscode-eslint"]
}
+22
View File
@@ -0,0 +1,22 @@
{
"prettier.enable": false,
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"eslint.validate": [
"javascript",
"typescript",
"json",
"jsonc",
"json5",
"yaml"
],
"cSpell.words": [
"antfu",
"chatgpt",
"esno",
"GPTAPI",
"OPENAI"
]
}
+33
View File
@@ -0,0 +1,33 @@
{
"name": "chatgpt-web-service",
"version": "1.0.0",
"private": false,
"description": "ChatGPT Web Bot node service",
"keywords": [
"chatgpt",
"chatbot",
"web",
"vue"
],
"engines": {
"node": ">=18.0.0"
},
"scripts": {
"start": "esno ./src/index.ts",
"lint": "eslint .",
"lint:fix": "eslint . --fix"
},
"dependencies": {
"chatgpt": "^4.2.0",
"express": "^4.18.2"
},
"devDependencies": {
"@antfu/eslint-config": "^0.35.2",
"@types/express": "^4.17.17",
"@types/node": "^18.13.0",
"dotenv": "^16.0.3",
"eslint": "^8.34.0",
"esno": "^0.16.3",
"typescript": "^4.9.5"
}
}
+3064
View File
File diff suppressed because it is too large. Load diff
@@ -1,4 +1,4 @@
import dotenv from 'dotenv'
import * as dotenv from 'dotenv'
import { ChatGPTAPI } from 'chatgpt'
interface ChatContext {
File renamed without changes.