From bfe2d4d5731330b090ce65ba86e2b98acf46ff46 Mon Sep 17 00:00:00 2001 From: RockYang Date: Mon, 27 Nov 2023 10:56:18 +0800 Subject: [PATCH] feat: merge mysql and redis docker service to docker-compose.yaml file --- {docker => build}/build.sh | 0 {docker => build}/dockerfile-api-go | 0 {docker => build}/dockerfile-vue | 0 {docker => deploy}/.gitignore | 0 {docker => deploy}/conf/config.toml | 0 .../conf/nginx/conf.d/chatgpt-plus.conf | 0 {docker => deploy}/conf/nginx/nginx.conf | 0 {docker => deploy}/docker-compose.yaml | 5 +- deploy/mysql/conf/my.cnf | 32 +++++ .../mysql/init.d/chatgpt_plus-v3.1.9.sql | 133 +++++++++++++----- 10 files changed, 129 insertions(+), 41 deletions(-) rename {docker => build}/build.sh (100%) rename {docker => build}/dockerfile-api-go (100%) rename {docker => build}/dockerfile-vue (100%) rename {docker => deploy}/.gitignore (100%) rename {docker => deploy}/conf/config.toml (100%) rename {docker => deploy}/conf/nginx/conf.d/chatgpt-plus.conf (100%) rename {docker => deploy}/conf/nginx/nginx.conf (100%) rename {docker => deploy}/docker-compose.yaml (94%) create mode 100644 deploy/mysql/conf/my.cnf rename docker/mysql/init.d/chatgpt_plus-v3.1.8.sql => deploy/mysql/init.d/chatgpt_plus-v3.1.9.sql (92%) diff --git a/docker/build.sh b/build/build.sh similarity index 100% rename from docker/build.sh rename to build/build.sh diff --git a/docker/dockerfile-api-go b/build/dockerfile-api-go similarity index 100% rename from docker/dockerfile-api-go rename to build/dockerfile-api-go diff --git a/docker/dockerfile-vue b/build/dockerfile-vue similarity index 100% rename from docker/dockerfile-vue rename to build/dockerfile-vue diff --git a/docker/.gitignore b/deploy/.gitignore similarity index 100% rename from docker/.gitignore rename to deploy/.gitignore diff --git a/docker/conf/config.toml b/deploy/conf/config.toml similarity index 100% rename from docker/conf/config.toml rename to deploy/conf/config.toml diff --git a/docker/conf/nginx/conf.d/chatgpt-plus.conf b/deploy/conf/nginx/conf.d/chatgpt-plus.conf similarity index 100% rename from docker/conf/nginx/conf.d/chatgpt-plus.conf rename to deploy/conf/nginx/conf.d/chatgpt-plus.conf diff --git a/docker/conf/nginx/nginx.conf b/deploy/conf/nginx/nginx.conf similarity index 100% rename from docker/conf/nginx/nginx.conf rename to deploy/conf/nginx/nginx.conf diff --git a/docker/docker-compose.yaml b/deploy/docker-compose.yaml similarity index 94% rename from docker/docker-compose.yaml rename to deploy/docker-compose.yaml index 920d086c..8e0b513a 100644 --- a/docker/docker-compose.yaml +++ b/deploy/docker-compose.yaml @@ -7,7 +7,7 @@ services: command: --default-authentication-plugin=mysql_native_password restart: always environment: - - MYSOL_ROOT_PASSWORD=12345678 + - MYSQL_ROOT_PASSWORD=12345678 ports: - "3307:3306" volumes : @@ -19,7 +19,8 @@ services: # redis chatgpt-plus-redis: image: redis:6.0.16 - restart: always + restart: always + container_name: chatgpt-plus-redis command: redis-server --requirepass 12345678 volumes : - ./redis/data:/data diff --git a/deploy/mysql/conf/my.cnf b/deploy/mysql/conf/my.cnf new file mode 100644 index 00000000..3ba41579 --- /dev/null +++ b/deploy/mysql/conf/my.cnf @@ -0,0 +1,32 @@ +# +# The MySQL database server configuration file. +# +# One can use all long options that the program supports. +# Run program with --help to get a list of available options and with +# --print-defaults to see which it would actually understand and use. +# +# For explanations see +# http://dev.mysql.com/doc/mysql/en/server-system-variables.html + +# Here is entries for some specific programs +# The following values assume you have at least 32M ram + +[mysqld] +# +# * Basic Settings +# +#user = mysql +# pid-file = /var/run/mysqld/mysqld.pid +# socket = /var/run/mysqld/mysqld.sock +# port = 3306 +# datadir = /var/lib/mysql + + +# If MySQL is running as a replication slave, this should be +# changed. Ref https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_tmpdir +# tmpdir = /tmp +# +# Instead of skip-networking the default is now to listen only on +# localhost which is more compatible and is not less secure. +bind-address = 0.0.0.0 +mysqlx-bind-address = 0.0.0.0 diff --git a/docker/mysql/init.d/chatgpt_plus-v3.1.8.sql b/deploy/mysql/init.d/chatgpt_plus-v3.1.9.sql similarity index 92% rename from docker/mysql/init.d/chatgpt_plus-v3.1.8.sql rename to deploy/mysql/init.d/chatgpt_plus-v3.1.9.sql index 284e35fc..dd5ea39f 100644 --- a/docker/mysql/init.d/chatgpt_plus-v3.1.8.sql +++ b/deploy/mysql/init.d/chatgpt_plus-v3.1.9.sql @@ -3,7 +3,7 @@ -- https://www.phpmyadmin.net/ -- -- 主机: localhost --- 生成日期: 2023-11-10 16:43:50 +-- 生成日期: 2023-11-23 09:56:22 -- 服务器版本: 8.0.33-0ubuntu0.22.04.2 -- PHP 版本: 8.1.18 @@ -708,7 +708,46 @@ INSERT INTO `chatgpt_chat_history` (`id`, `user_id`, `chat_id`, `type`, `icon`, (751, 4, '0c770732-e46c-4b6f-b1ee-ce0c34e794ca', 'prompt', 'http://img.r9it.com/chatgpt-plus/1693981355719469.png', 1, '你不是说你可以作画吗', 10, 1, '2023-11-09 16:49:08', '2023-11-09 16:49:08', NULL), (752, 4, '0c770732-e46c-4b6f-b1ee-ce0c34e794ca', 'reply', '/images/avatar/gpt.png', 1, '是的,我之前的回答是有误导性的,我可以在一定程度上进行文本创作和生成图像,但并不是真正的绘画。如果你需要绘画作品,最好还是寻求专业的绘画艺术家的帮助。', 293, 1, '2023-11-09 16:49:10', '2023-11-09 16:49:10', NULL), (753, 4, '0c770732-e46c-4b6f-b1ee-ce0c34e794ca', 'prompt', 'http://img.r9it.com/chatgpt-plus/1693981355719469.png', 1, '画只小猫', 6, 1, '2023-11-09 16:50:23', '2023-11-09 16:50:23', NULL), -(754, 4, '0c770732-e46c-4b6f-b1ee-ce0c34e794ca', 'reply', '/images/avatar/gpt.png', 1, '很抱歉,我无法直接为您提供小猫的图像。但是,您可以在搜索引擎中搜索“小猫绘画教程”或“小猫简笔画”,可以找到很多简单易学的小猫绘画方法,帮助您绘制出可爱的小猫图案。', 399, 1, '2023-11-09 16:50:25', '2023-11-09 16:50:25', NULL); +(754, 4, '0c770732-e46c-4b6f-b1ee-ce0c34e794ca', 'reply', '/images/avatar/gpt.png', 1, '很抱歉,我无法直接为您提供小猫的图像。但是,您可以在搜索引擎中搜索“小猫绘画教程”或“小猫简笔画”,可以找到很多简单易学的小猫绘画方法,帮助您绘制出可爱的小猫图案。', 399, 1, '2023-11-09 16:50:25', '2023-11-09 16:50:25', NULL), +(755, 4, '505a4bcb-b7e1-498e-87ea-1896fcfd5044', 'prompt', 'http://img.r9it.com/chatgpt-plus/1693981355719469.png', 1, 'hello', 1, 1, '2023-11-22 14:11:22', '2023-11-22 14:11:22', NULL), +(756, 4, '505a4bcb-b7e1-498e-87ea-1896fcfd5044', 'reply', '/images/avatar/gpt.png', 1, 'Hello! How can I assist you today?', 10, 1, '2023-11-22 14:11:22', '2023-11-22 14:11:22', NULL), +(757, 4, '505a4bcb-b7e1-498e-87ea-1896fcfd5044', 'prompt', 'http://img.r9it.com/chatgpt-plus/1693981355719469.png', 1, 'who are you?', 4, 1, '2023-11-22 14:11:50', '2023-11-22 14:11:50', NULL), +(758, 4, '505a4bcb-b7e1-498e-87ea-1896fcfd5044', 'reply', '/images/avatar/gpt.png', 1, 'Hello, I am iFLYTEK Spark developed by iFLYTEK, and my name is iFLYTEK Spark. I can communicate with human beings naturally, answer questions, and efficiently complete the needs of cognitive intelligence in various fields.', 63, 1, '2023-11-22 14:11:51', '2023-11-22 14:11:51', NULL), +(759, 4, '505a4bcb-b7e1-498e-87ea-1896fcfd5044', 'prompt', 'http://img.r9it.com/chatgpt-plus/1693981355719469.png', 1, '写一段代码实现微积分计算', 12, 1, '2023-11-22 14:34:50', '2023-11-22 14:34:50', NULL), +(760, 4, '505a4bcb-b7e1-498e-87ea-1896fcfd5044', 'reply', '/images/avatar/gpt.png', 1, '微积分计算涉及到很多方面,这里给出一个简单的例子,使用Python的SymPy库来计算函数f(x) = x^2在区间[0, 1]上的定积分。\n\n```python\nfrom sympy import symbols, integrate\n\nx = symbols(\'x\')\nf_x = x**2\n\nintegral = integrate(f_x, (x, 0, 1))\nprint(\"定积分结果:\", integral)\n```\n\n这段代码首先导入了SymPy库中的symbols和integrate函数,然后定义了一个符号x和一个函数f(x) = x^2。接着,使用integrate函数计算了函数f(x)在区间[0, 1]上的定积分,并将结果打印出来。', 201, 1, '2023-11-22 14:34:50', '2023-11-22 14:34:50', NULL), +(761, 4, '505a4bcb-b7e1-498e-87ea-1896fcfd5044', 'prompt', 'http://img.r9it.com/chatgpt-plus/1693981355719469.png', 1, '使用 PHP 实现二叉树', 9, 1, '2023-11-22 15:16:29', '2023-11-22 15:16:29', NULL), +(762, 4, '505a4bcb-b7e1-498e-87ea-1896fcfd5044', 'reply', '/images/avatar/gpt.png', 1, '二叉树是一种常见的数据结构,它由一组节点组成,每个节点最多有两个子节点。在 PHP 中,我们可以使用类来实现二叉树。\r\n\r\n首先,我们需要定义一个节点类,该类包含节点的值和指向左右子节点的指针:\r\n\r\n```php\r\n \r\n class Node {\r\n public $value;\r\n public $left;\r\n public $right;\r\n\r\n public function __construct($value) {\r\n $this->value = $value;\r\n $this->left = null;\r\n $this->right = null;\r\n }\r\n}\r\n\r\n```\r\n\r\n接下来,我们可以定义一个二叉树类,该类包含根节点和一些操作方法,例如插入、查找等:\r\n\r\n```php\r\n \r\n class BinaryTree {\r\n private $root;\r\n\r\n public function __construct() {\r\n $this->root = null;\r\n }\r\n\r\n public function insert($value) {\r\n if ($this->root === null) {\r\n $this->root = new Node($value);\r\n } else {\r\n $this->insertNode($this->root, $value);\r\n }\r\n }\r\n\r\n private function insertNode($node, $value) {\r\n if ($value < $node->value) {\r\n if ($node->left === null) {\r\n $node->left = new Node($value);\r\n } else {\r\n $this->insertNode($node->left, $value);\r\n }\r\n } else {\r\n if ($node->right === null) {\r\n $node->right = new Node($value);\r\n } else {\r\n $this->insertNode($node->right, $value);\r\n }\r\n }\r\n }\r\n\r\n // 其他操作方法...\r\n}\r\n\r\n```\r\n\r\n在上面的代码中,我们定义了一个 `BinaryTree` 类,其中包含了一个私有属性 `$root`,表示根节点。我们还定义了一个构造函数,用于初始化根节点为空。\r\n\r\n`insert` 方法用于向二叉树中插入一个新的节点。如果根节点为空,则直接将新节点作为根节点;否则,调用私有方法 `insertNode` 来递归地插入新节点。\r\n\r\n`insertNode` 方法用于递归地插入新节点。如果新节点的值小于当前节点的值,则将其插入到当前节点的左子树中;否则,将其插入到右子树中。如果当前节点的左子树或右子树为空,则直接将新节点作为相应的子节点;否则,递归地调用 `insertNode` 方法来继续插入新节点。\r\n\r\n除了插入操作外,二叉树还可以实现其他操作方法,例如查找、删除等。', 855, 1, '2023-11-22 15:16:30', '2023-11-22 15:16:30', NULL), +(763, 4, '505a4bcb-b7e1-498e-87ea-1896fcfd5044', 'prompt', 'http://img.r9it.com/chatgpt-plus/1693981355719469.png', 1, 'Java 实现 HTTP 请求', 5, 1, '2023-11-22 15:33:36', '2023-11-22 15:33:36', NULL), +(764, 4, '505a4bcb-b7e1-498e-87ea-1896fcfd5044', 'reply', '/images/avatar/gpt.png', 1, 'Java 提供了多种方式来实现 HTTP 请求,其中最常用的是使用 Java 标准库中的 `java.net` 包。\n\n以下是一个简单的示例代码,演示如何使用 Java 发送一个 GET 请求:\n\n[code]\n\n java\n \n import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.net.HttpURLConnection;\nimport java.net.URL;\n\npublic class HttpExample {\n public static void main(String[] args) throws Exception {\n String url = \"http://www.example.com\";\n URL obj = new URL(url);\n HttpURLConnection con = (HttpURLConnection) obj.openConnection();\n con.setRequestMethod(\"GET\");\n int responseCode = con.getResponseCode();\n System.out.println(\"Response Code: \" + responseCode);\n BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));\n String inputLine;\n StringBuffer response = new StringBuffer();\n while ((inputLine = in.readLine()) != null) {\n response.append(inputLine);\n }\n in.close();\n System.out.println(response.toString());\n }\n}\n\n[/code]\n\n在上面的代码中,我们首先创建了一个 `URL` 对象,然后使用 `openConnection()` 方法打开一个到该 URL 的连接。接着,我们设置请求方法为\n\"GET\",并获取响应码。最后,我们读取响应内容并将其输出到控制台。\n\n除了 GET 请求外,Java 还支持其他类型的 HTTP 请求,例如 POST、PUT、DELETE 等。要实现这些请求,只需要将请求方法设置为相应的值即可。例如,要发送一个\nPOST 请求,可以将以下代码添加到上面的示例中:\n\n[code]\n\n java\n \n con.setRequestMethod(\"POST\");\nString postData = \"key1=value1&key2=value2\";\ncon.setDoOutput(true);\nDataOutputStream wr = new DataOutputStream(con.getOutputStream());\nwr.writeBytes(postData);\nwr.flush();\nwr.close();\n\n[/code]\n\n在上面的代码中,我们设置了请求方法为 \"POST\",然后将要发送的数据作为字符串传递给 `DataOutputStream` 对象,并将其写入连接的输出流中。最后,我们刷新和关闭输出流。', 1345, 1, '2023-11-22 15:33:36', '2023-11-22 15:33:36', NULL), +(765, 4, 'd64e98f6-35e9-4c2f-beb8-f26c4fc1d580', 'prompt', 'http://img.r9it.com/chatgpt-plus/1693981355719469.png', 1, '写一段代码,实现 golang 生成 websocket 链接 ', 17, 1, '2023-11-22 15:34:45', '2023-11-22 15:34:45', NULL), +(766, 4, 'd64e98f6-35e9-4c2f-beb8-f26c4fc1d580', 'reply', '/images/avatar/gpt.png', 1, ' 以下是一个使用 Go 语言和 `github.com/gorilla/websocket` 库实现的简单 WebSocket 服务器示例。这个示例将创建一个 WebSocket 链接,并等待客户端连接。```go package main import ( \"fmt\" \"log\" \"net/http\" \"github.com/gorilla/websocket\")var upgrader = websocket.Upgrader{ ReadBufferSize: 1024, WriteBufferSize: 1024, CheckOrigin: func(r *http.Request) bool { return true },}func main() { http.HandleFunc(\"/ws\", handleConnections) log.Println(\"WebSocket server started on :8080\") err := http.ListenAndServe(\":8080\", nil) if err != nil { log.Fatal(\"ListenAndServe: \", err) }}func handleConnections(w http.ResponseWriter, r *http.Request) { // Upgrade initial GET request to a WebSocket conn, err := upgrader.Upgrade(w, r, nil) if err != nil { log.Println(err) return } defer conn.Close() // Send a message to the connected client conn.WriteMessage(websocket.TextMessage, []byte(\"Hello, WebSocket!\")) // Keep the connection open for { _, message, err := conn.ReadMessage() if err != nil { log.Println(err) break } log.Println(\"Received message:\", string(message)) // Send a message back to the client conn.WriteMessage(websocket.TextMessage, []byte(fmt.Sprintf(\"You sent: %s\", string(message)))) }}```要运行此示例,请将代码保存到名为 `main.go` 的文件中,并使用以下命令安装依赖项:```go get github.com/gorilla/websocket```然后,在命令行中运行以下命令以启动服务器:```go run main.go```现在,您可以使用任何 WebSocket 客户端(如 Chrome 的 WebSocket 测试工具或 Node.js 的 `ws` 库)连接到此服务器并发送消息。服务器将接收并回复消息。', 577, 1, '2023-11-22 15:34:46', '2023-11-22 15:34:46', NULL), +(767, 4, '1fcad3e0-4041-48d1-ba4a-fbf043bad861', 'prompt', 'http://img.r9it.com/chatgpt-plus/1693981355719469.png', 1, '写一段 PHP 代码实现 websocket 客户端', 13, 1, '2023-11-22 15:57:01', '2023-11-22 15:57:01', NULL), +(768, 4, '1fcad3e0-4041-48d1-ba4a-fbf043bad861', 'reply', '/images/avatar/gpt.png', 1, 'Sure! Here is an example of PHP code to implement a WebSocket client:\n\n```php\nsocket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\n \n // Connect to the WebSocket server\n socket_connect($this->socket, $host, $port);\n \n // Send the WebSocket handshake request\n socket_write($this->socket, $header, strlen($header));\n \n // Receive the WebSocket handshake response\n $response = socket_read($this->socket, 1024);\n \n // Check if the handshake was successful\n if (strpos($response, \' 101 \') === false) {\n return false;\n }\n \n return true;\n }\n \n // Send data to the WebSocket server\n public function send($data) {\n $length = strlen($data);\n $header = \"\";\n \n // Set the FIN bit and opcode for a text frame\n $header .= chr(129);\n \n // Calculate the payload length and header\n if ($length <= 125) {\n $header .= chr($length);\n } else if ($length <= 65535) {\n $header .= chr(126).pack(\"n\", $length);\n } else {\n $header .= chr(127).pack(\"N\", $length);\n }\n \n // Send the header and data to the WebSocket server\n socket_write($this->socket, $header.$data, strlen($header.$data));\n }\n \n // Receive data from the WebSocket server\n public function receive() {\n // Read the header from the WebSocket server\n $header = socket_read($this->socket, 2);\n $opcode = ord(substr($header, 0, 1)) & 15;\n $length = ord(substr($header, 1, 1)) & 127;\n \n // Calculate the payload length and mask\n if ($length === 126) {\n $length = unpack(\"n\", socket_read($this->socket, 2))[1];\n } else if ($length === 127) {\n $length = unpack(\"N\", socket_read($this->socket, 8))[1];\n }\n \n // Get the mask key\n $mask = socket_read($this->socket, 4);\n \n // Read the masked payload from the WebSocket server\n $payload = socket_read($this->socket, $length);\n \n // Unmask the payload\n $decoded_payload = \"\";\n for ($i = 0; $i < $length; $i++) {\n $decoded_payload .= $payload[$i] ^ $mask[$i % 4];\n }\n \n // Return the decoded payload\n return $decoded_payload;\n }\n \n // Close the WebSocket connection\n public function close() {\n socket_close($this->socket);\n }\n}\n\n// Usage example\n$ws = new WebSocketClient();\n\n// Connect to the WebSocket server\nif ($ws->connect(\"localhost\", 8000)) {\n echo \"Connected\\n\";\n \n // Send data to the WebSocket server\n $ws->send(\"Hello, WebSocket!\");\n \n // Receive data from the WebSocket server\n $response = $ws->receive();\n echo \"Received: $response\\n\";\n \n // Close the WebSocket connection\n $ws->close();\n} else {\n echo \"Connection failed\\n\";\n}\n```\n\nYou can replace the host and port values with your WebSocket server\'s host and port.', 878, 1, '2023-11-22 15:57:02', '2023-11-22 15:57:02', NULL), +(769, 4, '1fcad3e0-4041-48d1-ba4a-fbf043bad861', 'prompt', 'http://img.r9it.com/chatgpt-plus/1693981355719469.png', 1, '写一段 python 代码,实现二叉树', 14, 1, '2023-11-22 16:00:16', '2023-11-22 16:00:16', NULL), +(770, 4, '1fcad3e0-4041-48d1-ba4a-fbf043bad861', 'reply', '/images/avatar/gpt.png', 1, '当然!以下是一个示例 Python 代码,演示了如何实现二叉树:\n\n```python\n# 定义二叉树节点类\nclass TreeNode:\n def __init__(self, value):\n self.value = value\n self.left = None\n self.right = None\n\n# 定义二叉树类\nclass BinaryTree:\n def __init__(self):\n self.root = None\n\n # 插入节点\n def insert(self, value):\n if self.root is None:\n self.root = TreeNode(value)\n else:\n self._insert(self.root, value)\n\n # 内部插入节点的递归函数\n def _insert(self, node, value):\n if value < node.value:\n if node.left is None:\n node.left = TreeNode(value)\n else:\n self._insert(node.left, value)\n else:\n if node.right is None:\n node.right = TreeNode(value)\n else:\n self._insert(node.right, value)\n\n # 先序遍历\n def preorder_traversal(self):\n if self.root is None:\n return []\n else:\n return self._preorder_traversal(self.root, [])\n\n # 内部先序遍历的递归函数\n def _preorder_traversal(self, node, result):\n if node is not None:\n result.append(node.value)\n self._preorder_traversal(node.left, result)\n self._preorder_traversal(node.right, result)\n return result\n\n # 中序遍历\n def inorder_traversal(self):\n if self.root is None:\n return []\n else:\n return self._inorder_traversal(self.root, [])\n\n # 内部中序遍历的递归函数\n def _inorder_traversal(self, node, result):\n if node is not None:\n self._inorder_traversal(node.left, result)\n result.append(node.value)\n self._inorder_traversal(node.right, result)\n return result\n\n # 后序遍历\n def postorder_traversal(self):\n if self.root is None:\n return []\n else:\n return self._postorder_traversal(self.root, [])\n\n # 内部后序遍历的递归函数\n def _postorder_traversal(self, node, result):\n if node is not None:\n self._postorder_traversal(node.left, result)\n self._postorder_traversal(node.right, result)\n result.append(node.value)\n return result\n\n# 测试代码\nbinary_tree = BinaryTree()\n\nbinary_tree.insert(4)\nbinary_tree.insert(2)\nbinary_tree.insert(7)\nbinary_tree.insert(1)\nbinary_tree.insert(3)\nbinary_tree.insert(5)\nbinary_tree.insert(6)\n\nprint(\"二叉树先序遍历结果:\", binary_tree.preorder_traversal())\nprint(\"二叉树中序遍历结果:\", binary_tree.inorder_traversal())\nprint(\"二叉树后序遍历结果:\", binary_tree.postorder_traversal())\n```\n\n此代码实现了一个简单的二叉树类(`BinaryTree`),通过插入节点(`insert`方法)的方式构建二叉树。然后提供了三种不同的遍历方法:先序遍历(`preorder_traversal`)、中序遍历(`inorder_traversal`)和后序遍历(`postorder_traversal`),分别返回相应遍历顺序的节点值组成的列表。\n\n您可以根据需要修改示例代码,并使用您自己的数据来构建和遍历二叉树。', 1712, 1, '2023-11-22 16:00:17', '2023-11-22 16:00:17', NULL), +(771, 4, '1fcad3e0-4041-48d1-ba4a-fbf043bad861', 'prompt', 'http://img.r9it.com/chatgpt-plus/1693981355719469.png', 1, 'Java 实现 sha256 摘要', 9, 1, '2023-11-22 16:02:09', '2023-11-22 16:02:09', NULL), +(772, 4, '1fcad3e0-4041-48d1-ba4a-fbf043bad861', 'reply', '/images/avatar/gpt.png', 1, '要在Java中实现SHA-256摘要,可以使用Java提供的`MessageDigest`类。下面是一个示例代码,演示了如何使用SHA-256算法计算消息的摘要:\n\n```java\nimport java.nio.charset.StandardCharsets;\nimport java.security.MessageDigest;\nimport java.security.NoSuchAlgorithmException;\n\npublic class SHA256Digest {\n public static String getSHA256Digest(String message) {\n try {\n // 创建SHA-256摘要对象\n MessageDigest md = MessageDigest.getInstance(\"SHA-256\");\n\n // 将消息转换为字节数组并计算摘要\n byte[] digest = md.digest(message.getBytes(StandardCharsets.UTF_8));\n\n // 将摘要转换为十六进制字符串\n StringBuilder hexString = new StringBuilder();\n for (byte b : digest) {\n String hex = Integer.toHexString(0xff & b);\n if (hex.length() == 1) {\n hexString.append(\'0\');\n }\n hexString.append(hex);\n }\n return hexString.toString();\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n return null;\n }\n }\n\n public static void main(String[] args) {\n String message = \"Hello, world!\";\n String digest = getSHA256Digest(message);\n System.out.println(\"SHA-256 Digest: \" + digest);\n }\n}\n```\n\n在示例代码中,我们首先通过调用`MessageDigest.getInstance(\"SHA-256\")`创建SHA-256摘要对象。然后,我们将要计算摘要的消息转换为字节数组,并通过调用`md.digest()`计算摘要。最后,我们将计算得到的摘要转换为十六进制字符串表示。在`main()`方法中,我们使用示例消息\"Hello, world!\"来计算SHA-256摘要,并将其打印输出。\n\n请注意,此代码可能会抛出NoSuchAlgorithmException异常,因为在某些情况下,系统可能不支持SHA-256算法。在这种情况下,可以检查替代的摘要算法,如SHA-1或MD5。', 2213, 1, '2023-11-22 16:02:10', '2023-11-22 16:02:10', NULL), +(773, 4, 'c4cc1709-2dcb-479d-943b-0d124eecdfcf', 'prompt', 'http://img.r9it.com/chatgpt-plus/1693981355719469.png', 1, '写一段 python 代码实现 sha256 摘要', 14, 1, '2023-11-22 16:04:25', '2023-11-22 16:04:25', NULL), +(774, 4, 'c4cc1709-2dcb-479d-943b-0d124eecdfcf', 'reply', '/images/avatar/gpt.png', 1, ' 你可以使用 Python 的内置库 `hashlib` 来生成 SHA256 摘要。以下是一个简单的示例:```pythonimport hashlibdef sha256_sum(data): sha256 = hashlib.sha256() sha256.update(data.encode(\'utf-8\')) return sha256.hexdigest()data = \"Hello, world!\"result = sha256_sum(data)print(f\"SHA256摘要: {result}\")```在这个示例中,我们定义了一个名为 `sha256_sum` 的函数,它接受一个字符串参数 `data`。首先,我们创建了一个 `hashlib.sha256` 对象,并使用 `update()` 方法将输入数据编码为 UTF-8 并添加到摘要中。最后,我们使用 `hexdigest()` 方法将摘要转换为十六进制字符串并返回。', 235, 1, '2023-11-22 16:04:25', '2023-11-22 16:04:25', NULL), +(775, 4, '71bcfd25-d091-4311-830a-6f792dd36d2d', 'prompt', 'http://img.r9it.com/chatgpt-plus/1693981355719469.png', 1, '写一段 python 代码实现 sha256 摘要', 14, 1, '2023-11-22 16:06:34', '2023-11-22 16:06:34', NULL), +(776, 4, '71bcfd25-d091-4311-830a-6f792dd36d2d', 'reply', '/images/avatar/gpt.png', 1, ' 您可以您可以您可以使用使用使用 Python Python Python 的 的 的内置内置内置库库库 ` ` `hashhashhashlibliblib``` 来 来 来生成生成生成 SH SH SHAAA222555666 摘要摘要摘要。。。以下以下以下是一个是一个是一个简单的简单的简单的示示示例例例:::`````````pythonpythonpythonimportimportimport hash hash hashlibliblibdefdefdef sh sh shaaa222555666___sumsumsum(((datadatadata):):): shashasha222555666 = = = hash hash hashlibliblib...shashasha222555666()()() shashasha222555666...updateupdateupdate(((datadatadata...encodeencodeencode(\'(\'(\'utfutfutf---888\'))\'))\')) returnreturnreturn sh sh shaaa222555666...hexhexhexdigdigdigestestest()()()datadatadata = = = \" \" \"HelloHelloHello,,, world world world!\"!\"!\"resultresultresult = = = sh sh shaaa222555666___sumsumsum(((datadatadata)))printprintprint(\"(\"(\"SSSHAHAHA222555666摘要摘要摘要:::\",\",\", result result result)))`````````在这个在这个在这个示示示例例例中中中,,,我们我们我们定义定义定义了一个了一个了一个名为名为名为 ` ` `shashasha222555666___sumsumsum``` 的 的 的函数函数函数,,,该该该函数函数函数接受接受接受一个一个一个字符字符字符串串串参数参数参数 ` ` `datadatadata```。。。首先首先首先,,,我们我们我们创建创建创建了一个了一个了一个 ` ` `hashhashhashlibliblib...shashasha222555666``` 对象对象对象,,,并并并使用使用使用 ` ` `updateupdateupdate()()()``` 方法方法方法将将将输入输入输入字符字符字符串串串编码编码编码为为为 UT UT UTFFF---888 字节字节字节并并并添加添加添加到到到摘要摘要摘要中中中。。。最后最后最后,,,我们我们我们使用使用使用 ` ` `hexhexhexdigdigdigestestest()()()``` 方法方法方法将将将摘要摘要摘要转换转换转换为为为十六十六十六进进进制制制字符字符字符串串串并并并返回返回返回。。', 668, 1, '2023-11-22 16:06:35', '2023-11-22 16:06:35', NULL), +(777, 4, '0dcded34-1c25-4f31-ad5a-56789ff29671', 'prompt', 'http://img.r9it.com/chatgpt-plus/1693981355719469.png', 1, '写一段 python 代码实现 sha256 摘要', 14, 1, '2023-11-22 16:09:20', '2023-11-22 16:09:20', NULL), +(778, 4, '0dcded34-1c25-4f31-ad5a-56789ff29671', 'reply', '/images/avatar/gpt.png', 1, ' 你可以使用 Python 的内置库 `hashlib` 来生成 SHA256 摘要。以下是一个简单的例子:```pythonimport hashlibdef sha256_sum(data): sha256 = hashlib.sha256() sha256.update(data.encode(\'utf-8\')) return sha256.hexdigest()data = \"Hello, world!\"result = sha256_sum(data)print(\"SHA256摘要:\", result)```这段代码定义了一个名为 `sha256_sum` 的函数,它接受一个字符串参数 `data`,然后使用 `hashlib.sha256()` 创建一个 SHA256 摘要对象。接下来,调用 `update()` 方法将字符串编码为字节并更新摘要对象。最后,使用 `hexdigest()` 方法获取摘要的十六进制表示,并将其返回。', 231, 1, '2023-11-22 16:09:21', '2023-11-22 16:09:21', NULL), +(779, 4, '15dd3cd2-abc6-4ea1-88fc-74bc14b7f342', 'prompt', 'http://img.r9it.com/chatgpt-plus/1693981355719469.png', 1, '写一段 python 代码实现 sha256 摘要', 14, 1, '2023-11-22 16:10:27', '2023-11-22 16:10:27', NULL); +INSERT INTO `chatgpt_chat_history` (`id`, `user_id`, `chat_id`, `type`, `icon`, `role_id`, `content`, `tokens`, `use_context`, `created_at`, `updated_at`, `deleted_at`) VALUES +(780, 4, '15dd3cd2-abc6-4ea1-88fc-74bc14b7f342', 'reply', '/images/avatar/gpt.png', 1, ' 你可以使用 Python 的内置库 `hashlib` 来生成 SHA256 摘要。以下是一个简单的示例:\n\n```python\nimport hashlib\n\ndef sha256_sum(data):\n sha256 = hashlib.sha256()\n sha256.update(data.encode(\'utf-8\'))\n return sha256.hexdigest()\n\ndata = \"Hello, world!\"\nresult = sha256_sum(data)\nprint(\"SHA256摘要:\", result)\n```\n\n在这个示例中,我们定义了一个名为 `sha256_sum` 的函数,它接受一个字符串参数 `data`。我们首先创建一个 `hashlib.sha256` 对象,并使用 `update()` 方法将输入字符串编码为 UTF-8 并添加到摘要中。最后,我们使用 `hexdigest()` 方法将摘要转换为十六进制字符串并返回。', 234, 1, '2023-11-22 16:10:28', '2023-11-22 16:10:28', NULL), +(781, 4, '17e01718-7504-4a33-a116-829e8e8cfb96', 'prompt', 'http://img.r9it.com/chatgpt-plus/1693981355719469.png', 1, '写一段 PHP 代码实现 sha256 加密', 12, 1, '2023-11-22 16:12:31', '2023-11-22 16:12:31', NULL), +(782, 4, '17e01718-7504-4a33-a116-829e8e8cfb96', 'reply', '/images/avatar/gpt.png', 1, '解析:需要编写一段 PHP 代码,实现 sha256 加密功能。\n\n代码如下:\n\n```php\n\n```', 94, 1, '2023-11-22 16:12:31', '2023-11-22 16:12:31', NULL), +(783, 4, '15dd3cd2-abc6-4ea1-88fc-74bc14b7f342', 'prompt', 'http://img.r9it.com/chatgpt-plus/1693981355719469.png', 1, '如果是 Java 呢', 6, 1, '2023-11-22 16:57:26', '2023-11-22 16:57:26', NULL), +(784, 4, '15dd3cd2-abc6-4ea1-88fc-74bc14b7f342', 'reply', '/images/avatar/gpt.png', 1, ' 在 Java 中,你可以使用内置的 `java.security.MessageDigest` 类来实现 SHA256 摘要。以下是一个简单的示例:\n\n```java\nimport java.security.MessageDigest;\nimport java.security.NoSuchAlgorithmException;\nimport java.nio.charset.StandardCharsets;\nimport java.math.BigInteger;\n\npublic class SHA256Sum {\n public static void main(String[] args) {\n String data = \"Hello, world!\";\n String result = sha256Sum(data);\n System.out.println(\"SHA256摘要: \" + result);\n }\n\n public static String sha256Sum(String data) {\n try {\n MessageDigest md = MessageDigest.getInstance(\"SHA-256\");\n byte[] digest = md.digest(data.getBytes(StandardCharsets.UTF_8));\n BigInteger bigInt = new BigInteger(1, digest);\n String hashText = bigInt.toString(16);\n while (hashText.length() < 32) {\n hashText = \"0\" + hashText;\n }\n return hashText;\n } catch (NoSuchAlgorithmException e) {\n throw new RuntimeException(e);\n }\n }\n}\n```\n\n在这个示例中,我们定义了一个名为 `sha256Sum` 的函数,它接受一个字符串参数 `data`。我们首先使用 `MessageDigest.getInstance(\"SHA-256\")` 创建一个 SHA256 摘要对象,然后使用 `digest()` 方法将输入字符串编码为 UTF-8 并计算摘要。接下来,我们将摘要转换为一个 BigInteger,然后将其转换为十六进制字符串。最后,我们返回结果。', 665, 1, '2023-11-22 16:57:27', '2023-11-22 16:57:27', NULL), +(785, 4, '9940f206-d110-4ee8-8892-c4a1efd686fe', 'prompt', 'http://img.r9it.com/chatgpt-plus/1693981355719469.png', 1, '你是什么模型', 7, 1, '2023-11-23 09:21:10', '2023-11-23 09:21:10', NULL), +(786, 4, '9940f206-d110-4ee8-8892-c4a1efd686fe', 'reply', '/images/avatar/gpt.png', 1, '抱歉,我无法告知你关于我的模型参数规模等信息,您可以问我其他问题。\n', 36, 1, '2023-11-23 09:21:11', '2023-11-23 09:21:11', NULL), +(787, 4, '9940f206-d110-4ee8-8892-c4a1efd686fe', 'prompt', 'http://img.r9it.com/chatgpt-plus/1693981355719469.png', 1, '你是星火大模型的哪个版本', 12, 1, '2023-11-23 09:21:24', '2023-11-23 09:21:24', NULL), +(788, 4, '9940f206-d110-4ee8-8892-c4a1efd686fe', 'reply', '/images/avatar/gpt.png', 1, '科大讯飞的讯飞星火认知大模型当前版本是V3.0。星火认知大模型V3.0是科大讯飞在2023年10月24日发布的讯飞星火认知大模型新版本。讯飞星火大模型3.0版本相比于2.0版本,七大维度能力全面提升,大模型代码能力迭代升级。\n', 164, 1, '2023-11-23 09:21:24', '2023-11-23 09:21:24', NULL), +(789, 4, '9940f206-d110-4ee8-8892-c4a1efd686fe', 'prompt', 'http://img.r9it.com/chatgpt-plus/1693981355719469.png', 1, '写一段代码实现二叉树', 11, 1, '2023-11-23 09:21:49', '2023-11-23 09:21:49', NULL), +(790, 4, '9940f206-d110-4ee8-8892-c4a1efd686fe', 'reply', '/images/avatar/gpt.png', 1, '```python\nclass TreeNode:\n def __init__(self, value):\n self.value = value\n self.left = None\n self.right = None\n\nclass BinaryTree:\n def __init__(self, root_value):\n self.root = TreeNode(root_value)\n\n def insert(self, value):\n self._insert_recursive(self.root, value)\n\n def _insert_recursive(self, node, value):\n if value < node.value:\n if node.left is None:\n node.left = TreeNode(value)\n else:\n self._insert_recursive(node.left, value)\n else:\n if node.right is None:\n node.right = TreeNode(value)\n else:\n self._insert_recursive(node.right, value)\n\n def inorder_traversal(self):\n return self._inorder_traversal_recursive(self.root, [])\n\n def _inorder_traversal_recursive(self, node, result):\n if node:\n self._inorder_traversal_recursive(node.left, result)\n result.append(node.value)\n self._inorder_traversal_recursive(node.right, result)\n return result\n\n# 使用示例\nbt = BinaryTree(5)\nbt.insert(3)\nbt.insert(7)\nbt.insert(1)\nbt.insert(4)\nbt.insert(6)\nbt.insert(8)\nprint(bt.inorder_traversal()) # 输出: [1, 3, 4, 5, 6, 7, 8]\n```', 469, 1, '2023-11-23 09:21:49', '2023-11-23 09:21:49', NULL), +(791, 4, '9940f206-d110-4ee8-8892-c4a1efd686fe', 'prompt', 'http://img.r9it.com/chatgpt-plus/1693981355719469.png', 1, 'PHP 抓取网络图片', 6, 1, '2023-11-23 09:23:20', '2023-11-23 09:23:20', NULL), +(792, 4, '9940f206-d110-4ee8-8892-c4a1efd686fe', 'reply', '/images/avatar/gpt.png', 1, '要使用PHP抓取网络图片,可以使用`file_get_contents()`函数。以下是一个简单的示例:\n\n```php\n\n```\n\n这段代码首先从指定的URL获取图片数据,然后将其保存到本地文件夹中。请确保目标文件夹存在并具有正确的权限。', 682, 1, '2023-11-23 09:23:20', '2023-11-23 09:23:20', NULL); -- -------------------------------------------------------- @@ -741,14 +780,14 @@ INSERT INTO `chatgpt_chat_items` (`id`, `chat_id`, `user_id`, `role_id`, `title` (5, '437da751-5aca-41f8-850f-8ee82fbf7294', 4, 1, '你是谁', 1, '2023-09-04 17:32:39', '2023-09-04 17:32:39', '2023-09-05 09:54:19'), (6, 'a892c916-48c2-4631-aa06-4b686c366690', 4, 1, '你是谁', 5, '2023-09-04 18:10:58', '2023-09-04 18:10:58', '2023-09-05 09:54:07'), (7, 'd236acaa-f09d-4097-aca6-5e2c977d79ea', 4, 1, 'hello', 1, '2023-09-05 10:36:52', '2023-09-05 10:36:52', '2023-09-05 10:36:59'), -(8, '7e668724-a2e0-4a72-8388-41a73b0c2594', 4, 1, '今日热搜', 1, '2023-09-05 10:55:25', '2023-09-05 10:55:25', NULL), -(9, '33fe526f-08b3-4cfa-af12-cf832babc814', 4, 1, '天王盖地虎', 1, '2023-09-07 09:03:17', '2023-09-07 09:03:17', NULL), -(10, '60228f64-cb5b-4c7b-9712-01dae0913434', 4, 1, '绘画:Ma painting of a young girl...', 1, '2023-09-11 10:00:51', '2023-09-11 10:00:51', NULL), +(8, '7e668724-a2e0-4a72-8388-41a73b0c2594', 4, 1, '今日热搜', 1, '2023-09-05 10:55:25', '2023-09-05 10:55:25', '2023-11-23 09:24:57'), +(9, '33fe526f-08b3-4cfa-af12-cf832babc814', 4, 1, '天王盖地虎', 1, '2023-09-07 09:03:17', '2023-09-07 09:03:17', '2023-11-23 09:24:54'), +(10, '60228f64-cb5b-4c7b-9712-01dae0913434', 4, 1, '绘画:Ma painting of a young girl...', 1, '2023-09-11 10:00:51', '2023-09-11 10:00:51', '2023-11-23 09:24:51'), (11, 'f2e23148-3b4d-4127-a68e-2153724f22b7', 4, 27, '如何成为自己呢', 1, '2023-09-11 10:26:11', '2023-09-11 10:26:11', NULL), (12, '006d65f3-1288-4b3c-81e0-0097b66079ee', 4, 27, '你好', 1, '2023-09-11 10:33:09', '2023-09-11 10:33:09', '2023-09-11 10:38:07'), (13, 'bbab1bd0-feb7-4ea3-a8d4-1a9518183a1b', 4, 25, '你好', 1, '2023-09-11 10:34:00', '2023-09-11 10:34:00', '2023-09-11 10:38:00'), (14, '37711760-018c-4a51-904e-cd84a437346c', 4, 24, '你好', 1, '2023-09-11 10:38:20', '2023-09-11 10:38:20', NULL), -(15, '2541acd5-dfe7-4f1b-ac45-4b60612e8afc', 4, 1, '画一只狗', 1, '2023-09-12 12:03:49', '2023-09-12 12:03:49', NULL), +(15, '2541acd5-dfe7-4f1b-ac45-4b60612e8afc', 4, 1, '画一只狗', 1, '2023-09-12 12:03:49', '2023-09-12 12:03:49', '2023-11-23 09:25:03'), (16, '2a737e88-a284-4328-b362-3be89f6f85fa', 4, 27, '你是谁', 5, '2023-10-11 11:34:07', '2023-10-11 11:34:07', '2023-10-11 11:47:34'), (17, '8eb31442-888a-4d38-bf99-29eab3f27050', 4, 1, '你好', 5, '2023-10-11 11:47:56', '2023-10-11 11:47:56', '2023-10-11 12:04:43'), (18, '4b142cef-cd2c-4192-826a-569647792012', 4, 1, '你是谁', 6, '2023-10-11 12:04:55', '2023-10-11 12:04:55', '2023-10-12 09:33:49'), @@ -777,7 +816,16 @@ INSERT INTO `chatgpt_chat_items` (`id`, `chat_id`, `user_id`, `role_id`, `title` (41, 'a700301f-6b86-4d1b-97a7-0cd633886f75', 4, 1, '七个齿轮围成一圈,相邻齿轮之间彼此咬合,如果顺时针转动第三个...', 11, '2023-10-25 09:07:14', '2023-10-25 09:07:14', NULL), (42, '51b9709c-7632-4daf-8bd8-8616bd83dff4', 4, 1, '你是谁?', 11, '2023-10-26 14:26:53', '2023-10-26 14:26:53', '2023-11-07 11:33:51'), (43, 'cd5cdb56-b059-4978-81d9-c87f5c8d50a3', 4, 1, '请用表格输出博弈论的相关知识', 7, '2023-11-07 11:35:16', '2023-11-07 11:35:16', NULL), -(44, '0c770732-e46c-4b6f-b1ee-ce0c34e794ca', 4, 1, '你是谁', 10, '2023-11-09 16:48:18', '2023-11-09 16:48:18', NULL); +(44, '0c770732-e46c-4b6f-b1ee-ce0c34e794ca', 4, 1, '你是谁', 10, '2023-11-09 16:48:18', '2023-11-09 16:48:18', NULL), +(45, '505a4bcb-b7e1-498e-87ea-1896fcfd5044', 4, 1, '科大讯飞写代码', 9, '2023-11-22 14:11:23', '2023-11-22 14:11:23', '2023-11-22 15:50:46'), +(46, 'd64e98f6-35e9-4c2f-beb8-f26c4fc1d580', 4, 1, '写一段代码,实现 golang 生成 websocket 链...', 3, '2023-11-22 15:35:23', '2023-11-22 15:35:23', '2023-11-22 15:50:42'), +(47, '1fcad3e0-4041-48d1-ba4a-fbf043bad861', 4, 1, '写一段 PHP 代码实现 websocket 客户端', 1, '2023-11-22 15:57:22', '2023-11-22 15:57:22', NULL), +(48, 'c4cc1709-2dcb-479d-943b-0d124eecdfcf', 4, 1, '写一段 python 代码实现 sha256 摘要', 3, '2023-11-22 16:04:41', '2023-11-22 16:04:41', '2023-11-22 16:13:59'), +(49, '71bcfd25-d091-4311-830a-6f792dd36d2d', 4, 1, '写一段 python 代码实现 sha256 摘要', 3, '2023-11-22 16:06:51', '2023-11-22 16:06:51', '2023-11-22 16:13:56'), +(50, '0dcded34-1c25-4f31-ad5a-56789ff29671', 4, 1, '写一段 python 代码实现 sha256 摘要', 3, '2023-11-22 16:09:37', '2023-11-22 16:09:37', '2023-11-22 16:57:13'), +(51, '15dd3cd2-abc6-4ea1-88fc-74bc14b7f342', 4, 1, '写一段 python 代码实现 sha256 摘要', 3, '2023-11-22 16:10:46', '2023-11-22 16:10:46', NULL), +(52, '17e01718-7504-4a33-a116-829e8e8cfb96', 4, 1, '写一段 PHP 代码实现 sha256 加密', 9, '2023-11-22 16:12:35', '2023-11-22 16:12:35', NULL), +(53, '9940f206-d110-4ee8-8892-c4a1efd686fe', 4, 1, '科大讯飞V3.0', 12, '2023-11-23 09:21:12', '2023-11-23 09:21:12', NULL); -- -------------------------------------------------------- @@ -794,6 +842,7 @@ CREATE TABLE `chatgpt_chat_models` ( `sort_num` tinyint(1) NOT NULL COMMENT '排序数字', `enabled` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否启用模型', `weight` tinyint NOT NULL COMMENT '对话权重,每次对话扣减多少次对话额度', + `open` tinyint(1) NOT NULL COMMENT '是否开放模型', `created_at` datetime DEFAULT NULL, `updated_at` datetime DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='AI 模型表'; @@ -802,17 +851,18 @@ CREATE TABLE `chatgpt_chat_models` ( -- 转存表中的数据 `chatgpt_chat_models` -- -INSERT INTO `chatgpt_chat_models` (`id`, `platform`, `name`, `value`, `sort_num`, `enabled`, `weight`, `created_at`, `updated_at`) VALUES -(1, 'OpenAI', 'GPT-3.5', 'gpt-3.5-turbo-16k', 7, 1, 1, '2023-08-23 12:06:36', '2023-10-25 08:59:45'), -(2, 'Azure', 'Azure-3.5', 'gpt-3.5-turbo', 9, 1, 1, '2023-08-23 12:15:30', '2023-10-25 08:59:45'), -(3, 'ChatGLM', 'ChatGML-Pro', 'chatglm_pro', 6, 1, 1, '2023-08-23 13:35:45', '2023-10-25 08:59:45'), -(5, 'ChatGLM', 'ChatGLM-Std', 'chatglm_std', 5, 1, 1, '2023-08-24 15:05:38', '2023-10-25 08:59:45'), -(6, 'ChatGLM', 'ChatGLM-Lite', 'chatglm_lite', 4, 1, 1, '2023-08-24 15:06:15', '2023-10-25 08:59:45'), -(7, 'Baidu', '文心一言3.0', 'eb-instant', 0, 1, 1, '2023-10-11 11:29:28', '2023-10-25 08:59:45'), -(8, 'XunFei', '星火V1.5', 'general', 2, 1, 1, '2023-10-11 15:48:30', '2023-10-25 08:59:45'), -(9, 'XunFei', '星火V2.0', 'generalv2', 3, 1, 1, '2023-10-11 15:48:45', '2023-10-25 08:59:45'), -(10, 'Baidu', '文心一言4.0', 'completions_pro', 1, 1, 3, '2023-10-25 08:31:37', '2023-10-25 10:41:08'), -(11, 'OpenAI', 'GPT-4.0', 'gpt-4', 8, 1, 15, '2023-10-25 08:45:15', '2023-10-25 10:40:53'); +INSERT INTO `chatgpt_chat_models` (`id`, `platform`, `name`, `value`, `sort_num`, `enabled`, `weight`, `open`, `created_at`, `updated_at`) VALUES +(1, 'OpenAI', 'GPT-3.5', 'gpt-3.5-turbo-16k', 8, 1, 1, 1, '2023-08-23 12:06:36', '2023-11-23 09:20:53'), +(2, 'Azure', 'Azure-3.5', 'gpt-3.5-turbo', 10, 0, 1, 0, '2023-08-23 12:15:30', '2023-11-23 09:20:53'), +(3, 'ChatGLM', 'ChatGML-Pro', 'chatglm_pro', 7, 1, 1, 1, '2023-08-23 13:35:45', '2023-11-23 09:20:53'), +(5, 'ChatGLM', 'ChatGLM-Std', 'chatglm_std', 6, 1, 1, 1, '2023-08-24 15:05:38', '2023-11-23 09:20:53'), +(6, 'ChatGLM', 'ChatGLM-Lite', 'chatglm_lite', 5, 1, 1, 1, '2023-08-24 15:06:15', '2023-11-23 09:20:53'), +(7, 'Baidu', '文心一言3.0', 'eb-instant', 0, 1, 1, 1, '2023-10-11 11:29:28', '2023-11-23 09:20:53'), +(8, 'XunFei', '星火V1.5', 'general', 2, 1, 1, 1, '2023-10-11 15:48:30', '2023-11-23 09:20:53'), +(9, 'XunFei', '星火V2.0', 'generalv2', 3, 1, 1, 1, '2023-10-11 15:48:45', '2023-11-23 09:20:53'), +(10, 'Baidu', '文心一言4.0', 'completions_pro', 1, 1, 3, 1, '2023-10-25 08:31:37', '2023-11-23 09:20:53'), +(11, 'OpenAI', 'GPT-4.0', 'gpt-4', 9, 1, 15, 0, '2023-10-25 08:45:15', '2023-11-23 09:20:53'), +(12, 'XunFei', '星火v3.0', 'generalv3', 4, 1, 3, 1, '2023-11-23 09:20:33', '2023-11-23 09:20:53'); -- -------------------------------------------------------- @@ -875,7 +925,7 @@ CREATE TABLE `chatgpt_configs` ( -- INSERT INTO `chatgpt_configs` (`id`, `marker`, `config_json`) VALUES -(1, 'system', '{\"admin_title\":\"ChatPlus 控制台\",\"default_models\":[\"eb-instant\",\"completions_pro\",\"generalv2\",\"general\",\"chatglm_pro\",\"gpt-3.5-turbo-16k\",\"chatglm_lite\",\"chatglm_std\"],\"enabled_alipay\":true,\"enabled_draw\":true,\"enabled_function\":true,\"enabled_msg\":false,\"enabled_msg_service\":false,\"enabled_register\":true,\"enabled_reward\":true,\"init_calls\":1000,\"init_img_calls\":0,\"models\":[\"gpt-3.5-turbo-16k\",\"gpt-3.5-turbo\",\"gpt-4\",\"gpt-4-32k\"],\"order_pay_timeout\":1800,\"reward_img\":\"http://nk.img.r9it.com/chatgpt-plus/1697685171129266.png\",\"title\":\"ChatPlus AI 智能助手\",\"user_init_calls\":10}'), +(1, 'system', '{\"admin_title\":\"ChatPlus 控制台\",\"default_models\":[\"eb-instant\",\"completions_pro\",\"generalv2\",\"general\",\"chatglm_pro\",\"gpt-3.5-turbo-16k\",\"chatglm_lite\",\"chatglm_std\"],\"enabled_alipay\":true,\"enabled_draw\":true,\"enabled_function\":true,\"enabled_msg\":true,\"enabled_msg_service\":false,\"enabled_register\":true,\"enabled_reward\":true,\"init_calls\":1000,\"init_img_calls\":0,\"models\":[\"gpt-3.5-turbo-16k\",\"gpt-3.5-turbo\",\"gpt-4\",\"gpt-4-32k\"],\"order_pay_info_text\":\"成为本站会员后每月有500次对话额度,50次 AI 绘画额度,限制下月1号解除,若在期间超过次数后可单独购买点卡。当月充值的点卡有效期可以延期到下个月底。\",\"order_pay_timeout\":1800,\"reward_img\":\"http://nk.img.r9it.com/chatgpt-plus/1697685171129266.png\",\"title\":\"ChatPlus AI 智能助手\",\"user_init_calls\":10,\"vip_month_calls\":500}'), (2, 'chat', '{\"azure\":{\"api_url\":\"https://chat-bot-api.openai.azure.com/openai/deployments/{model}/chat/completions?api-version=2023-05-15\",\"max_tokens\":1024,\"temperature\":1},\"baidu\":{\"api_url\":\"https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/{model}\",\"max_tokens\":1024,\"temperature\":0.95},\"chat_gml\":{\"api_url\":\"https://open.bigmodel.cn/api/paas/v3/model-api/{model}/sse-invoke\",\"max_tokens\":1024,\"temperature\":0.95},\"context_deep\":4,\"enable_context\":true,\"enable_history\":true,\"open_ai\":{\"api_url\":\"https://api.openai.com/v1/chat/completions\",\"max_tokens\":1024,\"temperature\":1},\"xun_fei\":{\"api_url\":\"wss://spark-api.xf-yun.com/{version}/chat\",\"max_tokens\":1024,\"temperature\":0.5}}'); -- -------------------------------------------------------- @@ -1179,17 +1229,22 @@ INSERT INTO `chatgpt_orders` (`id`, `user_id`, `product_id`, `mobile`, `order_no (185, 4, 2, '18575670125', '202311107128631634525421568', '会员3个月', '110.00', 0, '{\"days\":90,\"calls\":0,\"name\":\"会员3个月\",\"price\":140,\"discount\":30}', 0, '支付宝', '2023-11-10 14:37:05', '2023-11-10 14:37:05', '2023-11-10 16:10:32'), (186, 4, 3, '18575670125', '202311107128631694583660544', '会员6个月', '190.00', 0, '{\"days\":180,\"calls\":0,\"name\":\"会员6个月\",\"price\":290,\"discount\":100}', 0, '支付宝', '2023-11-10 14:37:20', '2023-11-10 14:37:20', '2023-11-10 16:10:32'), (187, 4, 5, '18575670125', '202311107128631753945645056', '100次点卡', '7.00', 2, '{\"days\":0,\"calls\":100,\"name\":\"100次点卡\",\"price\":10,\"discount\":3}', 1699598305, '支付宝', '2023-11-10 14:37:34', '2023-11-10 14:38:25', NULL), -(188, 4, 1, '18575670125', '202311107128655528590311424', '会员1个月', '9.90', 0, '{\"days\":30,\"calls\":0,\"name\":\"会员1个月\",\"price\":19.9,\"discount\":10}', 0, '支付宝', '2023-11-10 16:12:02', '2023-11-10 16:12:02', NULL), -(189, 4, 2, '18575670125', '202311107128655556104945664', '会员3个月', '110.00', 0, '{\"days\":90,\"calls\":0,\"name\":\"会员3个月\",\"price\":140,\"discount\":30}', 0, '支付宝', '2023-11-10 16:12:09', '2023-11-10 16:12:09', NULL), -(190, 4, 3, '18575670125', '202311107128655569233117184', '会员6个月', '190.00', 0, '{\"days\":180,\"calls\":0,\"name\":\"会员6个月\",\"price\":290,\"discount\":100}', 0, '支付宝', '2023-11-10 16:12:12', '2023-11-10 16:12:12', NULL), -(191, 4, 4, '18575670125', '202311107128655589369970688', '会员12个月', '380.00', 0, '{\"days\":365,\"calls\":0,\"name\":\"会员12个月\",\"price\":580,\"discount\":200}', 0, '支付宝', '2023-11-10 16:12:17', '2023-11-10 16:12:17', NULL), -(192, 4, 3, '18575670125', '202311107128659173117526016', '会员6个月', '190.00', 0, '{\"days\":180,\"calls\":0,\"name\":\"会员6个月\",\"price\":290,\"discount\":100}', 0, '支付宝', '2023-11-10 16:26:31', '2023-11-10 16:26:31', NULL), -(193, 4, 4, '18575670125', '202311107128659184177905664', '会员12个月', '380.00', 0, '{\"days\":365,\"calls\":0,\"name\":\"会员12个月\",\"price\":580,\"discount\":200}', 0, '支付宝', '2023-11-10 16:26:34', '2023-11-10 16:26:34', NULL), +(188, 4, 1, '18575670125', '202311107128655528590311424', '会员1个月', '9.90', 0, '{\"days\":30,\"calls\":0,\"name\":\"会员1个月\",\"price\":19.9,\"discount\":10}', 0, '支付宝', '2023-11-10 16:12:02', '2023-11-10 16:12:02', '2023-11-10 17:00:00'), +(189, 4, 2, '18575670125', '202311107128655556104945664', '会员3个月', '110.00', 0, '{\"days\":90,\"calls\":0,\"name\":\"会员3个月\",\"price\":140,\"discount\":30}', 0, '支付宝', '2023-11-10 16:12:09', '2023-11-10 16:12:09', '2023-11-10 17:00:00'), +(190, 4, 3, '18575670125', '202311107128655569233117184', '会员6个月', '190.00', 0, '{\"days\":180,\"calls\":0,\"name\":\"会员6个月\",\"price\":290,\"discount\":100}', 0, '支付宝', '2023-11-10 16:12:12', '2023-11-10 16:12:12', '2023-11-10 17:00:00'), +(191, 4, 4, '18575670125', '202311107128655589369970688', '会员12个月', '380.00', 0, '{\"days\":365,\"calls\":0,\"name\":\"会员12个月\",\"price\":580,\"discount\":200}', 0, '支付宝', '2023-11-10 16:12:17', '2023-11-10 16:12:17', '2023-11-10 17:00:00'), +(192, 4, 3, '18575670125', '202311107128659173117526016', '会员6个月', '190.00', 0, '{\"days\":180,\"calls\":0,\"name\":\"会员6个月\",\"price\":290,\"discount\":100}', 0, '支付宝', '2023-11-10 16:26:31', '2023-11-10 16:26:31', '2023-11-10 17:00:00'), +(193, 4, 4, '18575670125', '202311107128659184177905664', '会员12个月', '380.00', 0, '{\"days\":365,\"calls\":0,\"name\":\"会员12个月\",\"price\":580,\"discount\":200}', 0, '支付宝', '2023-11-10 16:26:34', '2023-11-10 16:26:34', '2023-11-10 17:00:00'), (194, 4, 5, '18575670125', '202311107128659242826858496', '100次点卡', '7.00', 2, '{\"days\":0,\"calls\":100,\"name\":\"100次点卡\",\"price\":10,\"discount\":3}', 1699604851, '支付宝', '2023-11-10 16:26:48', '2023-11-10 16:27:31', NULL), -(195, 4, 1, '18575670125', '202311107128662585213190144', '会员1个月', '9.90', 0, '{\"days\":30,\"calls\":0,\"name\":\"会员1个月\",\"price\":19.9,\"discount\":10}', 0, '支付宝', '2023-11-10 16:40:04', '2023-11-10 16:40:04', NULL), -(196, 4, 3, '18575670125', '202311107128662595220799488', '会员6个月', '190.00', 0, '{\"days\":180,\"calls\":0,\"name\":\"会员6个月\",\"price\":290,\"discount\":100}', 0, '支付宝', '2023-11-10 16:40:07', '2023-11-10 16:40:07', NULL), -(197, 4, 5, '18575670125', '202311107128662612828487680', '100次点卡', '7.00', 0, '{\"days\":0,\"calls\":100,\"name\":\"100次点卡\",\"price\":10,\"discount\":3}', 0, '支付宝', '2023-11-10 16:40:11', '2023-11-10 16:40:11', NULL), -(198, 4, 4, '18575670125', '202311107128662625310736384', '会员12个月', '380.00', 0, '{\"days\":365,\"calls\":0,\"name\":\"会员12个月\",\"price\":580,\"discount\":200}', 0, '支付宝', '2023-11-10 16:40:14', '2023-11-10 16:40:14', NULL); +(195, 4, 1, '18575670125', '202311107128662585213190144', '会员1个月', '9.90', 0, '{\"days\":30,\"calls\":0,\"name\":\"会员1个月\",\"price\":19.9,\"discount\":10}', 0, '支付宝', '2023-11-10 16:40:04', '2023-11-10 16:40:04', '2023-11-10 17:20:00'), +(196, 4, 3, '18575670125', '202311107128662595220799488', '会员6个月', '190.00', 0, '{\"days\":180,\"calls\":0,\"name\":\"会员6个月\",\"price\":290,\"discount\":100}', 0, '支付宝', '2023-11-10 16:40:07', '2023-11-10 16:40:07', '2023-11-10 17:20:00'), +(197, 4, 5, '18575670125', '202311107128662612828487680', '100次点卡', '7.00', 0, '{\"days\":0,\"calls\":100,\"name\":\"100次点卡\",\"price\":10,\"discount\":3}', 0, '支付宝', '2023-11-10 16:40:11', '2023-11-10 16:40:11', '2023-11-10 17:20:00'), +(198, 4, 4, '18575670125', '202311107128662625310736384', '会员12个月', '380.00', 0, '{\"days\":365,\"calls\":0,\"name\":\"会员12个月\",\"price\":580,\"discount\":200}', 0, '支付宝', '2023-11-10 16:40:14', '2023-11-10 16:40:14', '2023-11-10 17:20:00'), +(199, 4, 4, '18575670125', '202311107128681572579934208', '会员12个月', '380.00', 2, '{\"days\":365,\"calls\":0,\"name\":\"会员12个月\",\"price\":580,\"discount\":200}', 1699610157, '支付宝', '2023-11-10 17:55:31', '2023-11-10 17:55:58', NULL), +(200, 4, 5, '18575670125', '202311137129653026687549440', '100次点卡', '7.00', 0, '{\"days\":0,\"calls\":100,\"name\":\"100次点卡\",\"price\":10,\"discount\":3}', 0, '支付宝', '2023-11-13 10:15:44', '2023-11-13 10:15:44', NULL), +(201, 4, 4, '18575670125', '202311137129653078571089920', '会员12个月', '380.00', 0, '{\"days\":365,\"calls\":0,\"name\":\"会员12个月\",\"price\":580,\"discount\":200}', 0, '支付宝', '2023-11-13 10:15:56', '2023-11-13 10:15:56', NULL), +(202, 4, 4, '18575670125', '202311137129727072624181248', '会员12个月', '380.00', 1, '{\"days\":365,\"calls\":0,\"name\":\"会员12个月\",\"price\":580,\"discount\":200}', 0, '支付宝', '2023-11-13 15:09:58', '2023-11-13 15:09:58', NULL), +(203, 4, 5, '18575670125', '202311137129727622161891328', '100次点卡', '7.00', 0, '{\"days\":0,\"calls\":100,\"name\":\"100次点卡\",\"price\":10,\"discount\":3}', 0, '支付宝', '2023-11-13 15:12:09', '2023-11-13 15:12:09', NULL); -- -------------------------------------------------------- @@ -1220,7 +1275,7 @@ INSERT INTO `chatgpt_products` (`id`, `name`, `price`, `discount`, `days`, `call (1, '会员1个月', '19.90', '10.00', 30, 0, 1, 2, 0, '2023-08-28 10:48:57', '2023-11-08 17:22:07'), (2, '会员3个月', '140.00', '30.00', 90, 0, 1, 1, 0, '2023-08-28 10:52:22', '2023-08-31 16:24:31'), (3, '会员6个月', '290.00', '100.00', 180, 0, 1, 1, 0, '2023-08-28 10:53:39', '2023-08-31 16:24:36'), -(4, '会员12个月', '580.00', '200.00', 365, 0, 1, 0, 0, '2023-08-28 10:54:15', '2023-08-31 16:24:42'), +(4, '会员12个月', '580.00', '200.00', 365, 0, 1, 1, 0, '2023-08-28 10:54:15', '2023-08-31 16:24:42'), (5, '100次点卡', '10.00', '3.00', 0, 100, 1, 6, 0, '2023-08-28 10:55:08', '2023-11-08 17:32:42'); -- -------------------------------------------------------- @@ -1306,9 +1361,9 @@ INSERT INTO `chatgpt_sd_jobs` (`id`, `user_id`, `type`, `task_id`, `prompt`, `im (94, 4, 'image', 'task(wpla7374zavn9da)', 'a cute tiger', 'http://nk.img.r9it.com/chatgpt-plus/1699413401715507.png', '{\"task_id\":\"task(wpla7374zavn9da)\",\"prompt\":\"a cute tiger\",\"negative_prompt\":\"nsfw, paintings, cartoon, anime, sketches, low quality,easynegative,ng_deepnegative _v1 75t,(worst quality:2),(low quality:2),(normalquality:2),lowres,bad anatomy,bad hands,normal quality,((monochrome)),((grayscale)),((watermark))\",\"steps\":20,\"sampler\":\"DPM++ SDE Karras\",\"face_fix\":false,\"cfg_scale\":7,\"seed\":2732385070,\"height\":512,\"width\":512,\"hd_fix\":false,\"hd_redraw_rate\":0.3,\"hd_scale\":2,\"hd_scale_alg\":\"ESRGAN_4x\",\"hd_steps\":0}', 100, 1, '2023-11-08 11:16:27'), (96, 4, 'image', 'task(t0ea9nbw8heji5y)', 'a cute tiger', 'http://nk.img.r9it.com/chatgpt-plus/1699413535111187.png', '{\"task_id\":\"task(t0ea9nbw8heji5y)\",\"prompt\":\"a cute tiger\",\"negative_prompt\":\"nsfw, paintings, cartoon, anime, sketches, low quality,easynegative,ng_deepnegative _v1 75t,(worst quality:2),(low quality:2),(normalquality:2),lowres,bad anatomy,bad hands,normal quality,((monochrome)),((grayscale)),((watermark))\",\"steps\":20,\"sampler\":\"DPM++ SDE Karras\",\"face_fix\":false,\"cfg_scale\":7,\"seed\":3232274573,\"height\":512,\"width\":512,\"hd_fix\":false,\"hd_redraw_rate\":0.3,\"hd_scale\":2,\"hd_scale_alg\":\"ESRGAN_4x\",\"hd_steps\":0}', 100, 1, '2023-11-08 11:18:50'), (97, 4, 'image', 'task(uy2zhxvn36cb339)', 'a cute tiger', 'http://nk.img.r9it.com/chatgpt-plus/1699413581994016.png', '{\"task_id\":\"task(uy2zhxvn36cb339)\",\"prompt\":\"a cute tiger\",\"negative_prompt\":\"nsfw, paintings, cartoon, anime, sketches, low quality,easynegative,ng_deepnegative _v1 75t,(worst quality:2),(low quality:2),(normalquality:2),lowres,bad anatomy,bad hands,normal quality,((monochrome)),((grayscale)),((watermark))\",\"steps\":20,\"sampler\":\"DPM++ SDE Karras\",\"face_fix\":false,\"cfg_scale\":7,\"seed\":934497998,\"height\":512,\"width\":512,\"hd_fix\":true,\"hd_redraw_rate\":0.3,\"hd_scale\":2,\"hd_scale_alg\":\"ESRGAN_4x\",\"hd_steps\":0}', 100, 1, '2023-11-08 11:19:13'), -(98, 4, 'image', 'task(15ob5k455hyddhi)', 'a cute tiger', 'http://nk.img.r9it.com/chatgpt-plus/1699413600281784.png', '{\"task_id\":\"task(15ob5k455hyddhi)\",\"prompt\":\"a cute tiger\",\"negative_prompt\":\"nsfw, paintings, cartoon, anime, sketches, low quality,easynegative,ng_deepnegative _v1 75t,(worst quality:2),(low quality:2),(normalquality:2),lowres,bad anatomy,bad hands,normal quality,((monochrome)),((grayscale)),((watermark))\",\"steps\":30,\"sampler\":\"DPM++ SDE Karras\",\"face_fix\":false,\"cfg_scale\":7,\"seed\":564596111,\"height\":512,\"width\":512,\"hd_fix\":true,\"hd_redraw_rate\":0.3,\"hd_scale\":2,\"hd_scale_alg\":\"ESRGAN_4x\",\"hd_steps\":10}', 100, 1, '2023-11-08 11:19:28'), -(99, 4, 'image', 'task(ehfc1sxy19jou0g)', 'a cute chinese girl', 'http://nk.img.r9it.com/chatgpt-plus/1699413795343210.png', '{\"task_id\":\"task(ehfc1sxy19jou0g)\",\"prompt\":\"a cute chinese girl\",\"negative_prompt\":\"nsfw, paintings, cartoon, anime, sketches, low quality,easynegative,ng_deepnegative _v1 75t,(worst quality:2),(low quality:2),(normalquality:2),lowres,bad anatomy,bad hands,normal quality,((monochrome)),((grayscale)),((watermark))\",\"steps\":30,\"sampler\":\"DPM++ SDE Karras\",\"face_fix\":false,\"cfg_scale\":7,\"seed\":527088643,\"height\":512,\"width\":512,\"hd_fix\":true,\"hd_redraw_rate\":0.3,\"hd_scale\":2,\"hd_scale_alg\":\"ESRGAN_4x\",\"hd_steps\":10}', 100, 1, '2023-11-08 11:22:55'), -(100, 4, 'image', 'task(6z74occ58rb2s8c)', 'a cute chinese girl', 'http://nk.img.r9it.com/chatgpt-plus/1699413862256086.png', '{\"task_id\":\"task(6z74occ58rb2s8c)\",\"prompt\":\"a cute chinese girl\",\"negative_prompt\":\"nsfw, paintings, cartoon, anime, sketches, low quality,easynegative,ng_deepnegative _v1 75t,(worst quality:2),(low quality:2),(normalquality:2),lowres,bad anatomy,bad hands,normal quality,((monochrome)),((grayscale)),((watermark))\",\"steps\":30,\"sampler\":\"DPM++ SDE Karras\",\"face_fix\":false,\"cfg_scale\":7,\"seed\":4282123789,\"height\":768,\"width\":512,\"hd_fix\":true,\"hd_redraw_rate\":0.3,\"hd_scale\":2,\"hd_scale_alg\":\"ESRGAN_4x\",\"hd_steps\":10}', 100, 1, '2023-11-08 11:23:44'); +(98, 4, 'image', 'task(15ob5k455hyddhi)', 'a cute tiger', 'http://nk.img.r9it.com/chatgpt-plus/1699413600281784.png', '{\"task_id\":\"task(15ob5k455hyddhi)\",\"prompt\":\"a cute tiger\",\"negative_prompt\":\"nsfw, paintings, cartoon, anime, sketches, low quality,easynegative,ng_deepnegative _v1 75t,(worst quality:2),(low quality:2),(normalquality:2),lowres,bad anatomy,bad hands,normal quality,((monochrome)),((grayscale)),((watermark))\",\"steps\":30,\"sampler\":\"DPM++ SDE Karras\",\"face_fix\":false,\"cfg_scale\":7,\"seed\":564596111,\"height\":512,\"width\":512,\"hd_fix\":true,\"hd_redraw_rate\":0.3,\"hd_scale\":2,\"hd_scale_alg\":\"ESRGAN_4x\",\"hd_steps\":10}', 80, 1, '2023-11-08 11:19:28'), +(99, 4, 'image', 'task(ehfc1sxy19jou0g)', 'a cute chinese girl', 'http://nk.img.r9it.com/chatgpt-plus/1699413795343210.png', '{\"task_id\":\"task(ehfc1sxy19jou0g)\",\"prompt\":\"a cute chinese girl\",\"negative_prompt\":\"nsfw, paintings, cartoon, anime, sketches, low quality,easynegative,ng_deepnegative _v1 75t,(worst quality:2),(low quality:2),(normalquality:2),lowres,bad anatomy,bad hands,normal quality,((monochrome)),((grayscale)),((watermark))\",\"steps\":30,\"sampler\":\"DPM++ SDE Karras\",\"face_fix\":false,\"cfg_scale\":7,\"seed\":527088643,\"height\":512,\"width\":512,\"hd_fix\":true,\"hd_redraw_rate\":0.3,\"hd_scale\":2,\"hd_scale_alg\":\"ESRGAN_4x\",\"hd_steps\":10}', 0, 1, '2023-11-08 11:22:55'), +(100, 4, 'image', 'task(6z74occ58rb2s8c)', 'a cute chinese girl', 'http://nk.img.r9it.com/chatgpt-plus/1699413862256086.png', '{\"task_id\":\"task(6z74occ58rb2s8c)\",\"prompt\":\"a cute chinese girl\",\"negative_prompt\":\"nsfw, paintings, cartoon, anime, sketches, low quality,easynegative,ng_deepnegative _v1 75t,(worst quality:2),(low quality:2),(normalquality:2),lowres,bad anatomy,bad hands,normal quality,((monochrome)),((grayscale)),((watermark))\",\"steps\":30,\"sampler\":\"DPM++ SDE Karras\",\"face_fix\":false,\"cfg_scale\":7,\"seed\":4282123789,\"height\":768,\"width\":512,\"hd_fix\":true,\"hd_redraw_rate\":0.3,\"hd_scale\":2,\"hd_scale_alg\":\"ESRGAN_4x\",\"hd_steps\":10}', 0, 1, '2023-11-08 11:23:44'); -- -------------------------------------------------------- @@ -1344,8 +1399,8 @@ CREATE TABLE `chatgpt_users` ( -- INSERT INTO `chatgpt_users` (`id`, `mobile`, `password`, `avatar`, `salt`, `total_tokens`, `tokens`, `calls`, `img_calls`, `expired_time`, `status`, `chat_config_json`, `chat_roles_json`, `chat_models_json`, `last_login_at`, `vip`, `last_login_ip`, `created_at`, `updated_at`) VALUES -(4, '18575670125', 'ccc3fb7ab61b8b5d096a4a166ae21d121fc38c71bbd1be6173d9ab973214a63b', 'http://img.r9it.com/chatgpt-plus/1693981355719469.png', 'ueedue5l', 44850, 1013, 5650, 58, 1756456236, 1, '{\"api_keys\":{\"Azure\":\"\",\"ChatGLM\":\"\",\"OpenAI\":\"\"}}', '[\"elon_musk\",\"girl_friend\",\"lu_xun\",\"red_book\",\"psychiatrist\",\"translator\",\"weekly_report\",\"artist\",\"dou_yin\",\"english_trainer\",\"gpt\",\"kong_zi\",\"programmer\",\"seller\",\"steve_jobs\",\"teacher\"]', '[\"completions_pro\",\"eb-instant\",\"general\",\"generalv2\",\"chatglm_pro\",\"chatglm_lite\",\"chatglm_std\",\"gpt-3.5-turbo-16k\",\"gpt-4\"]', 1699603918, 1, '::1', '2023-06-12 16:47:17', '2023-11-10 16:27:31'), -(91, '18575670126', '5e4050b8dd403f593260395d9edeb9f273dbe92d15dfdd929c4a182e95da10c4', '/images/avatar/user.png', '6fj0otl8', 0, 0, 10, 0, 0, 1, '{\"api_keys\":{\"Azure\":\"\",\"ChatGLM\":\"\",\"OpenAI\":\"\"}}', '[\"gpt\"]', '[\"completions_pro\",\"eb-instant\",\"general\",\"generalv2\",\"chatglm_pro\",\"chatglm_lite\",\"chatglm_std\",\"gpt-3.5-turbo-16k\"]', 1697184324, 0, '::1', '2023-10-13 16:01:56', '2023-11-09 18:07:27'), +(4, '18575670125', 'ccc3fb7ab61b8b5d096a4a166ae21d121fc38c71bbd1be6173d9ab973214a63b', 'http://img.r9it.com/chatgpt-plus/1693981355719469.png', 'ueedue5l', 56182, 12345, 5623, 58, 1787992236, 1, '{\"api_keys\":{\"Azure\":\"\",\"ChatGLM\":\"\",\"OpenAI\":\"\"}}', '[\"elon_musk\",\"girl_friend\",\"lu_xun\",\"red_book\",\"psychiatrist\",\"translator\",\"weekly_report\",\"artist\",\"dou_yin\",\"english_trainer\",\"gpt\",\"kong_zi\",\"programmer\",\"seller\",\"steve_jobs\",\"teacher\"]', '[\"completions_pro\",\"eb-instant\",\"general\",\"generalv2\",\"chatglm_pro\",\"chatglm_lite\",\"chatglm_std\",\"gpt-3.5-turbo-16k\",\"gpt-4\"]', 1700702329, 1, '::1', '2023-06-12 16:47:17', '2023-11-23 09:18:49'), +(91, '18575670126', '5e4050b8dd403f593260395d9edeb9f273dbe92d15dfdd929c4a182e95da10c4', '/images/avatar/user.png', '6fj0otl8', 0, 0, 10, 0, 0, 1, '{\"api_keys\":{\"Azure\":\"\",\"ChatGLM\":\"\",\"OpenAI\":\"\"}}', '[\"gpt\"]', '[\"completions_pro\",\"eb-instant\",\"general\",\"generalv2\",\"chatglm_pro\",\"chatglm_lite\",\"chatglm_std\",\"gpt-3.5-turbo-16k\"]', 1697184324, 1, '::1', '2023-10-13 16:01:56', '2023-11-22 11:29:38'), (92, '13888888888', 'afc6c65155e34e4a785b8e1e027b92178efa87474a657d5dc2811891e08b7101', '/images/avatar/user.png', 'txkb2mx5', 0, 0, 10, 0, 0, 1, '{\"api_keys\":{\"Azure\":\"\",\"ChatGLM\":\"\",\"OpenAI\":\"\"}}', '[\"gpt\",\"psychiatrist\",\"programmer\",\"artist\",\"lu_xun\",\"kong_zi\",\"elon_musk\",\"teacher\"]', '[\"completions_pro\",\"eb-instant\",\"general\",\"generalv2\",\"chatglm_pro\",\"chatglm_lite\",\"chatglm_std\",\"gpt-3.5-turbo-16k\"]', 1697184800, 0, '::1', '2023-10-13 16:05:48', '2023-10-13 16:13:21'), (93, '13888888889', 'bc3f6918b1d652c42a204ba709f8dbaa4dc8ee657c6f0b0c19aabdb919b77872', '/images/avatar/user.png', 'sczbklqt', 0, 0, 10, 0, 0, 1, '{\"api_keys\":{\"Azure\":\"\",\"ChatGLM\":\"\",\"OpenAI\":\"\"}}', '[\"gpt\"]', '[\"completions_pro\",\"eb-instant\",\"general\",\"generalv2\",\"chatglm_pro\",\"chatglm_lite\",\"chatglm_std\",\"gpt-3.5-turbo-16k\"]', 0, 0, '', '2023-10-13 16:07:11', '2023-10-13 16:07:11'), (94, '13899999999', 'a2e9e362f3217d8aa924ceaee2847bea7a86b735bea0a479057c4842d5d5205b', '/images/avatar/user.png', 'ys2oyhj0', 0, 0, 10, 0, 0, 1, '{\"api_keys\":{\"Azure\":\"\",\"ChatGLM\":\"\",\"OpenAI\":\"\"}}', '[\"gpt\"]', '[\"completions_pro\",\"eb-instant\",\"general\",\"generalv2\",\"chatglm_pro\",\"chatglm_lite\",\"chatglm_std\",\"gpt-3.5-turbo-16k\"]', 0, 0, '', '2023-10-13 16:07:32', '2023-10-13 16:07:32'), @@ -1474,19 +1529,19 @@ ALTER TABLE `chatgpt_api_keys` -- 使用表AUTO_INCREMENT `chatgpt_chat_history` -- ALTER TABLE `chatgpt_chat_history` - MODIFY `id` bigint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=755; + MODIFY `id` bigint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=793; -- -- 使用表AUTO_INCREMENT `chatgpt_chat_items` -- ALTER TABLE `chatgpt_chat_items` - MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=45; + MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=54; -- -- 使用表AUTO_INCREMENT `chatgpt_chat_models` -- ALTER TABLE `chatgpt_chat_models` - MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12; + MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13; -- -- 使用表AUTO_INCREMENT `chatgpt_chat_roles` @@ -1510,7 +1565,7 @@ ALTER TABLE `chatgpt_mj_jobs` -- 使用表AUTO_INCREMENT `chatgpt_orders` -- ALTER TABLE `chatgpt_orders` - MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=199; + MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=204; -- -- 使用表AUTO_INCREMENT `chatgpt_products`