From b130466c8f6da2e4f07ddba8d2119d06f9bafae5 Mon Sep 17 00:00:00 2001 From: RockYang Date: Mon, 6 May 2024 14:41:27 +0800 Subject: [PATCH] chore: change module name to geekai, add copyright in source code --- LICENSE | 214 ++++++++++++++++++++-- README.md | 31 +++- api/core/app_server.go | 15 +- api/core/config.go | 13 +- api/core/types/chat.go | 7 + api/core/types/client.go | 7 + api/core/types/config.go | 7 + api/core/types/function.go | 7 + api/core/types/locked_map.go | 7 + api/core/types/order.go | 7 + api/core/types/oss.go | 7 + api/core/types/session.go | 7 + api/core/types/sms.go | 7 + api/core/types/task.go | 7 + api/core/types/web.go | 7 + api/go.mod | 2 +- api/handler/admin/admin_handler.go | 23 ++- api/handler/admin/api_key_handler.go | 21 ++- api/handler/admin/captcha_handler.go | 13 +- api/handler/admin/chat_handler.go | 21 ++- api/handler/admin/chat_model_handler.go | 21 ++- api/handler/admin/chat_role_handler.go | 21 ++- api/handler/admin/config_handler.go | 23 ++- api/handler/admin/dashboard_handler.go | 17 +- api/handler/admin/function_handler.go | 21 ++- api/handler/admin/menu_handler.go | 21 ++- api/handler/admin/order_handler.go | 21 ++- api/handler/admin/power_log_handler.go | 21 ++- api/handler/admin/product_handler.go | 21 ++- api/handler/admin/reward_handler.go | 21 ++- api/handler/admin/upload_handler.go | 17 +- api/handler/admin/user_handler.go | 23 ++- api/handler/base_handler.go | 17 +- api/handler/captcha_handler.go | 13 +- api/handler/chat_model_handler.go | 17 +- api/handler/chat_role_handler.go | 19 +- api/handler/chatimpl/azure_handler.go | 15 +- api/handler/chatimpl/baidu_handler.go | 15 +- api/handler/chatimpl/chat_handler.go | 27 ++- api/handler/chatimpl/chat_item_handler.go | 17 +- api/handler/chatimpl/chatglm_handler.go | 15 +- api/handler/chatimpl/openai_handler.go | 15 +- api/handler/chatimpl/qwen_handler.go | 15 +- api/handler/chatimpl/xunfei_handler.go | 15 +- api/handler/config_handler.go | 15 +- api/handler/dalle_handler.go | 23 ++- api/handler/function_handler.go | 21 ++- api/handler/invite_handler.go | 19 +- api/handler/markmap_handler.go | 15 +- api/handler/menu_handler.go | 17 +- api/handler/mj_handler.go | 25 ++- api/handler/order_handler.go | 19 +- api/handler/payment_handler.go | 21 ++- api/handler/power_log_handler.go | 19 +- api/handler/product_handler.go | 17 +- api/handler/reward_handler.go | 19 +- api/handler/sd_handler.go | 27 ++- api/handler/sms_handler.go | 19 +- api/handler/test_handler.go | 4 +- api/handler/upload_handler.go | 19 +- api/handler/user_handler.go | 21 ++- api/logger/logger.go | 7 + api/main.go | 37 ++-- api/service/captcha_service.go | 9 +- api/service/dalle/service.go | 23 ++- api/service/license_service.go | 13 +- api/service/mj/client.go | 9 +- api/service/mj/plus_client.go | 11 +- api/service/mj/pool.go | 21 ++- api/service/mj/proxy_client.go | 11 +- api/service/mj/service.go | 19 +- api/service/oss/aliyun_oss.go | 11 +- api/service/oss/localstorage.go | 11 +- api/service/oss/minio_oss.go | 11 +- api/service/oss/qiniu_oss.go | 11 +- api/service/oss/uploader.go | 7 + api/service/oss/uploader_manager.go | 9 +- api/service/payment/alipay_service.go | 11 +- api/service/payment/hupipay_serive.go | 11 +- api/service/payment/payjs_service.go | 11 +- api/service/sd/pool.go | 15 +- api/service/sd/service.go | 19 +- api/service/sd/types.go | 9 +- api/service/sms/aliyun.go | 9 +- api/service/sms/bao.go | 11 +- api/service/sms/service.go | 7 + api/service/sms/service_manager.go | 11 +- api/service/smtp_sms_service.go | 9 +- api/service/snowflake.go | 7 + api/service/wx/bot.go | 11 +- api/service/wx/tranaction.go | 7 + api/service/xxl_job_service.go | 15 +- api/store/leveldb.go | 7 + api/store/model/order.go | 2 +- api/store/model/power_log.go | 2 +- api/store/mysql.go | 9 +- api/store/redis.go | 9 +- api/store/redis_queue.go | 9 +- api/store/vo/chat_role.go | 2 +- api/store/vo/config.go | 2 +- api/store/vo/order.go | 2 +- api/store/vo/power_log.go | 2 +- api/store/vo/sd_job.go | 2 +- api/test/test.go | 2 +- api/utils/common.go | 7 + api/utils/crypto.go | 7 + api/utils/net.go | 11 +- api/utils/openai.go | 11 +- api/utils/resp/response.go | 9 +- api/utils/strings.go | 7 + api/utils/upload.go | 7 + web/src/main.js | 7 + web/src/router.js | 7 + web/src/store/system.js | 7 + web/src/utils/http.js | 7 + web/src/utils/libs.js | 7 + 116 files changed, 1322 insertions(+), 403 deletions(-) diff --git a/LICENSE b/LICENSE index e0839217..29f81d81 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,201 @@ -MIT License + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ -Copyright (c) 2023 RockYang + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + 1. Definitions. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/README.md b/README.md index 9342f687..dc7d09dd 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,29 @@ # ChatGPT-Plus **ChatGPT-PLUS** 基于 AI 大语言模型 API 实现的 AI 助手全套开源解决方案,自带运营管理后台,开箱即用。集成了 OpenAI, Azure, -ChatGLM,讯飞星火,文心一言等多个平台的大语言模型。集成了 MidJourney 和 Stable Diffusion AI绘画功能。主要有如下特性: +ChatGLM,讯飞星火,文心一言等多个平台的大语言模型。集成了 MidJourney 和 Stable Diffusion AI绘画功能。 -* 完整的开源系统,前端应用和后台管理系统皆可开箱即用。 -* 基于 Websocket 实现,完美的打字机体验。 -* 内置了各种预训练好的角色应用,比如小红书写手,英语翻译大师,苏格拉底,孔子,乔布斯,周报助手等。轻松满足你的各种聊天和应用需求。 -* 支持 OPenAI,Azure,文心一言,讯飞星火,清华 ChatGLM等多个大语言模型。 -* 支持 MidJourney / Stable Diffusion AI 绘画集成,开箱即用。 -* 支持使用个人微信二维码作为充值收费的支付渠道,无需企业支付通道。 -* 已集成支付宝支付功能,微信支付,支持多种会员套餐和点卡购买功能。 -* 集成插件 API 功能,可结合大语言模型的 function 功能开发各种强大的插件,已内置实现了微博热搜,今日头条,今日早报和 AI +主要特性: + +- 完整的开源系统,前端应用和后台管理系统皆可开箱即用。 +- 基于 Websocket 实现,完美的打字机体验。 +- 内置了各种预训练好的角色应用,比如小红书写手,英语翻译大师,苏格拉底,孔子,乔布斯,周报助手等。轻松满足你的各种聊天和应用需求。 +- 支持 OPenAI,Azure,文心一言,讯飞星火,清华 ChatGLM等多个大语言模型。 +- 支持 Suno 文生音乐 +- 支持 MidJourney / Stable Diffusion AI 绘画集成,文生图,图生图,换脸,融图。开箱即用。 +- 支持使用个人微信二维码作为充值收费的支付渠道,无需企业支付通道。 +- 已集成支付宝支付功能,微信支付,支持多种会员套餐和点卡购买功能。 +- 集成插件 API 功能,可结合大语言模型的 function 功能开发各种强大的插件,已内置实现了微博热搜,今日头条,今日早报和 AI 绘画函数插件。 +### 🚀 更多功能请查看 [Geek-AI](https://github.com/yangjian102621/geek-ai) + +- [x] 更友好的 UI 界面 +- [x] 支持 Dall-E 文生图功能 +- [x] 支持文生思维导图 +- [x] 支持为模型绑定指定的 API KEY,支持为角色绑定指定的模型等功能 +- [x] 支持网站 Logo 版权等信息的修改 + ## 功能截图 ### PC 端聊天界面 @@ -96,7 +107,7 @@ KEY。 ## 使用须知 -1. 本项目基于 MIT 协议,免费开放全部源代码,可以作为个人学习使用或者商用。 +1. 本项目基于 Apache2.0 协议,免费开放全部源代码,可以作为个人学习使用或者商用。 2. 如需商用必须保留版权信息,请自觉遵守。确保合法合规使用,在运营过程中产生的一切任何后果自负,与作者无关。 ## 项目地址 diff --git a/api/core/app_server.go b/api/core/app_server.go index d40feb90..0b8932aa 100644 --- a/api/core/app_server.go +++ b/api/core/app_server.go @@ -1,11 +1,18 @@ package core +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( "bytes" - "chatplus/core/types" - "chatplus/store/model" - "chatplus/utils" - "chatplus/utils/resp" + "geekai/core/types" + "geekai/store/model" + "geekai/utils" + "geekai/utils/resp" "context" "fmt" "github.com/gin-gonic/gin" diff --git a/api/core/config.go b/api/core/config.go index 74f7e305..04160490 100644 --- a/api/core/config.go +++ b/api/core/config.go @@ -1,10 +1,17 @@ package core +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( "bytes" - "chatplus/core/types" - logger2 "chatplus/logger" - "chatplus/utils" + "geekai/core/types" + logger2 "geekai/logger" + "geekai/utils" "os" "github.com/BurntSushi/toml" diff --git a/api/core/types/chat.go b/api/core/types/chat.go index b6b63aa2..4e90afaa 100644 --- a/api/core/types/chat.go +++ b/api/core/types/chat.go @@ -1,5 +1,12 @@ package types +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + // ApiRequest API 请求实体 type ApiRequest struct { Model string `json:"model,omitempty"` // 兼容百度文心一言 diff --git a/api/core/types/client.go b/api/core/types/client.go index 6988a60b..5f65ac59 100644 --- a/api/core/types/client.go +++ b/api/core/types/client.go @@ -1,5 +1,12 @@ package types +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( "errors" "github.com/gorilla/websocket" diff --git a/api/core/types/config.go b/api/core/types/config.go index 33c0ece8..355b08e6 100644 --- a/api/core/types/config.go +++ b/api/core/types/config.go @@ -1,5 +1,12 @@ package types +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( "fmt" ) diff --git a/api/core/types/function.go b/api/core/types/function.go index 09808461..30ac03cf 100644 --- a/api/core/types/function.go +++ b/api/core/types/function.go @@ -1,5 +1,12 @@ package types +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + type ToolCall struct { Type string `json:"type"` Function struct { diff --git a/api/core/types/locked_map.go b/api/core/types/locked_map.go index 26ed6f46..5ae764bb 100644 --- a/api/core/types/locked_map.go +++ b/api/core/types/locked_map.go @@ -1,5 +1,12 @@ package types +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( "context" "sync" diff --git a/api/core/types/order.go b/api/core/types/order.go index 78a7c40b..90cc0cb1 100644 --- a/api/core/types/order.go +++ b/api/core/types/order.go @@ -1,5 +1,12 @@ package types +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + type OrderStatus int const ( diff --git a/api/core/types/oss.go b/api/core/types/oss.go index 596ec3df..9bc93b41 100644 --- a/api/core/types/oss.go +++ b/api/core/types/oss.go @@ -1,5 +1,12 @@ package types +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + type OSSConfig struct { Active string Local LocalStorageConfig diff --git a/api/core/types/session.go b/api/core/types/session.go index c756df66..9108e51a 100644 --- a/api/core/types/session.go +++ b/api/core/types/session.go @@ -1,5 +1,12 @@ package types +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + const LoginUserID = "LOGIN_USER_ID" const LoginUserCache = "LOGIN_USER_CACHE" diff --git a/api/core/types/sms.go b/api/core/types/sms.go index 31d129af..510e8071 100644 --- a/api/core/types/sms.go +++ b/api/core/types/sms.go @@ -1,5 +1,12 @@ package types +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + type SMSConfig struct { Active string Ali SmsConfigAli diff --git a/api/core/types/task.go b/api/core/types/task.go index bb1f7689..fbae9a3a 100644 --- a/api/core/types/task.go +++ b/api/core/types/task.go @@ -1,5 +1,12 @@ package types +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + // TaskType 任务类别 type TaskType string diff --git a/api/core/types/web.go b/api/core/types/web.go index 041a9859..08f5ee90 100644 --- a/api/core/types/web.go +++ b/api/core/types/web.go @@ -1,5 +1,12 @@ package types +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + // BizVo 业务返回 VO type BizVo struct { Code BizCode `json:"code"` diff --git a/api/go.mod b/api/go.mod index dcc8c8dc..095eb217 100644 --- a/api/go.mod +++ b/api/go.mod @@ -1,4 +1,4 @@ -module chatplus +module geekai go 1.19 diff --git a/api/handler/admin/admin_handler.go b/api/handler/admin/admin_handler.go index d9d3e988..3fceab8e 100644 --- a/api/handler/admin/admin_handler.go +++ b/api/handler/admin/admin_handler.go @@ -1,14 +1,21 @@ package admin +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core" - "chatplus/core/types" - "chatplus/handler" - logger2 "chatplus/logger" - "chatplus/store/model" - "chatplus/store/vo" - "chatplus/utils" - "chatplus/utils/resp" + "geekai/core" + "geekai/core/types" + "geekai/handler" + logger2 "geekai/logger" + "geekai/store/model" + "geekai/store/vo" + "geekai/utils" + "geekai/utils/resp" "context" "fmt" "github.com/go-redis/redis/v8" diff --git a/api/handler/admin/api_key_handler.go b/api/handler/admin/api_key_handler.go index 7935d0ba..87eab556 100644 --- a/api/handler/admin/api_key_handler.go +++ b/api/handler/admin/api_key_handler.go @@ -1,13 +1,20 @@ package admin +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core" - "chatplus/core/types" - "chatplus/handler" - "chatplus/store/model" - "chatplus/store/vo" - "chatplus/utils" - "chatplus/utils/resp" + "geekai/core" + "geekai/core/types" + "geekai/handler" + "geekai/store/model" + "geekai/store/vo" + "geekai/utils" + "geekai/utils/resp" "github.com/gin-gonic/gin" "gorm.io/gorm" diff --git a/api/handler/admin/captcha_handler.go b/api/handler/admin/captcha_handler.go index 2377f027..e6b81cbf 100644 --- a/api/handler/admin/captcha_handler.go +++ b/api/handler/admin/captcha_handler.go @@ -1,9 +1,16 @@ package admin +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core" - "chatplus/handler" - "chatplus/utils/resp" + "geekai/core" + "geekai/handler" + "geekai/utils/resp" "github.com/gin-gonic/gin" "github.com/mojocn/base64Captcha" ) diff --git a/api/handler/admin/chat_handler.go b/api/handler/admin/chat_handler.go index 64fb5587..af76e76e 100644 --- a/api/handler/admin/chat_handler.go +++ b/api/handler/admin/chat_handler.go @@ -1,13 +1,20 @@ package admin +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core" - "chatplus/core/types" - "chatplus/handler" - "chatplus/store/model" - "chatplus/store/vo" - "chatplus/utils" - "chatplus/utils/resp" + "geekai/core" + "geekai/core/types" + "geekai/handler" + "geekai/store/model" + "geekai/store/vo" + "geekai/utils" + "geekai/utils/resp" "github.com/gin-gonic/gin" "gorm.io/gorm" ) diff --git a/api/handler/admin/chat_model_handler.go b/api/handler/admin/chat_model_handler.go index ad0ce3c2..c5efe78d 100644 --- a/api/handler/admin/chat_model_handler.go +++ b/api/handler/admin/chat_model_handler.go @@ -1,13 +1,20 @@ package admin +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core" - "chatplus/core/types" - "chatplus/handler" - "chatplus/store/model" - "chatplus/store/vo" - "chatplus/utils" - "chatplus/utils/resp" + "geekai/core" + "geekai/core/types" + "geekai/handler" + "geekai/store/model" + "geekai/store/vo" + "geekai/utils" + "geekai/utils/resp" "github.com/gin-gonic/gin" "gorm.io/gorm" ) diff --git a/api/handler/admin/chat_role_handler.go b/api/handler/admin/chat_role_handler.go index caec61b9..9ca2d3df 100644 --- a/api/handler/admin/chat_role_handler.go +++ b/api/handler/admin/chat_role_handler.go @@ -1,13 +1,20 @@ package admin +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core" - "chatplus/core/types" - "chatplus/handler" - "chatplus/store/model" - "chatplus/store/vo" - "chatplus/utils" - "chatplus/utils/resp" + "geekai/core" + "geekai/core/types" + "geekai/handler" + "geekai/store/model" + "geekai/store/vo" + "geekai/utils" + "geekai/utils/resp" "time" "github.com/gin-gonic/gin" diff --git a/api/handler/admin/config_handler.go b/api/handler/admin/config_handler.go index a597d374..303632a0 100644 --- a/api/handler/admin/config_handler.go +++ b/api/handler/admin/config_handler.go @@ -1,14 +1,21 @@ package admin +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core" - "chatplus/core/types" - "chatplus/handler" - "chatplus/service" - "chatplus/store" - "chatplus/store/model" - "chatplus/utils" - "chatplus/utils/resp" + "geekai/core" + "geekai/core/types" + "geekai/handler" + "geekai/service" + "geekai/store" + "geekai/store/model" + "geekai/utils" + "geekai/utils/resp" "github.com/gin-gonic/gin" "github.com/shirou/gopsutil/host" "gorm.io/gorm" diff --git a/api/handler/admin/dashboard_handler.go b/api/handler/admin/dashboard_handler.go index 82a875a5..536cd497 100644 --- a/api/handler/admin/dashboard_handler.go +++ b/api/handler/admin/dashboard_handler.go @@ -1,11 +1,18 @@ package admin +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core" - "chatplus/core/types" - "chatplus/handler" - "chatplus/store/model" - "chatplus/utils/resp" + "geekai/core" + "geekai/core/types" + "geekai/handler" + "geekai/store/model" + "geekai/utils/resp" "github.com/gin-gonic/gin" "github.com/shopspring/decimal" "gorm.io/gorm" diff --git a/api/handler/admin/function_handler.go b/api/handler/admin/function_handler.go index d9eed1fc..474f32b7 100644 --- a/api/handler/admin/function_handler.go +++ b/api/handler/admin/function_handler.go @@ -1,13 +1,20 @@ package admin +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core" - "chatplus/core/types" - "chatplus/handler" - "chatplus/store/model" - "chatplus/store/vo" - "chatplus/utils" - "chatplus/utils/resp" + "geekai/core" + "geekai/core/types" + "geekai/handler" + "geekai/store/model" + "geekai/store/vo" + "geekai/utils" + "geekai/utils/resp" "github.com/golang-jwt/jwt/v5" diff --git a/api/handler/admin/menu_handler.go b/api/handler/admin/menu_handler.go index 7358ffa9..ef1991e2 100644 --- a/api/handler/admin/menu_handler.go +++ b/api/handler/admin/menu_handler.go @@ -1,13 +1,20 @@ package admin +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core" - "chatplus/core/types" - "chatplus/handler" - "chatplus/store/model" - "chatplus/store/vo" - "chatplus/utils" - "chatplus/utils/resp" + "geekai/core" + "geekai/core/types" + "geekai/handler" + "geekai/store/model" + "geekai/store/vo" + "geekai/utils" + "geekai/utils/resp" "github.com/gin-gonic/gin" "gorm.io/gorm" ) diff --git a/api/handler/admin/order_handler.go b/api/handler/admin/order_handler.go index 1183e01f..a64fa281 100644 --- a/api/handler/admin/order_handler.go +++ b/api/handler/admin/order_handler.go @@ -1,13 +1,20 @@ package admin +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core" - "chatplus/core/types" - "chatplus/handler" - "chatplus/store/model" - "chatplus/store/vo" - "chatplus/utils" - "chatplus/utils/resp" + "geekai/core" + "geekai/core/types" + "geekai/handler" + "geekai/store/model" + "geekai/store/vo" + "geekai/utils" + "geekai/utils/resp" "github.com/gin-gonic/gin" "gorm.io/gorm" diff --git a/api/handler/admin/power_log_handler.go b/api/handler/admin/power_log_handler.go index 3f15108e..56f63c84 100644 --- a/api/handler/admin/power_log_handler.go +++ b/api/handler/admin/power_log_handler.go @@ -1,13 +1,20 @@ package admin +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core" - "chatplus/core/types" - "chatplus/handler" - "chatplus/store/model" - "chatplus/store/vo" - "chatplus/utils" - "chatplus/utils/resp" + "geekai/core" + "geekai/core/types" + "geekai/handler" + "geekai/store/model" + "geekai/store/vo" + "geekai/utils" + "geekai/utils/resp" "github.com/gin-gonic/gin" "gorm.io/gorm" diff --git a/api/handler/admin/product_handler.go b/api/handler/admin/product_handler.go index 42eff03f..92f0d228 100644 --- a/api/handler/admin/product_handler.go +++ b/api/handler/admin/product_handler.go @@ -1,13 +1,20 @@ package admin +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core" - "chatplus/core/types" - "chatplus/handler" - "chatplus/store/model" - "chatplus/store/vo" - "chatplus/utils" - "chatplus/utils/resp" + "geekai/core" + "geekai/core/types" + "geekai/handler" + "geekai/store/model" + "geekai/store/vo" + "geekai/utils" + "geekai/utils/resp" "github.com/gin-gonic/gin" "gorm.io/gorm" "time" diff --git a/api/handler/admin/reward_handler.go b/api/handler/admin/reward_handler.go index a2c44cb9..50daa21d 100644 --- a/api/handler/admin/reward_handler.go +++ b/api/handler/admin/reward_handler.go @@ -1,13 +1,20 @@ package admin +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core" - "chatplus/core/types" - "chatplus/handler" - "chatplus/store/model" - "chatplus/store/vo" - "chatplus/utils" - "chatplus/utils/resp" + "geekai/core" + "geekai/core/types" + "geekai/handler" + "geekai/store/model" + "geekai/store/vo" + "geekai/utils" + "geekai/utils/resp" "github.com/gin-gonic/gin" "gorm.io/gorm" ) diff --git a/api/handler/admin/upload_handler.go b/api/handler/admin/upload_handler.go index 17bbf9f4..64674329 100644 --- a/api/handler/admin/upload_handler.go +++ b/api/handler/admin/upload_handler.go @@ -1,11 +1,18 @@ package admin +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core" - "chatplus/handler" - "chatplus/service/oss" - "chatplus/store/model" - "chatplus/utils/resp" + "geekai/core" + "geekai/handler" + "geekai/service/oss" + "geekai/store/model" + "geekai/utils/resp" "github.com/gin-gonic/gin" "gorm.io/gorm" "time" diff --git a/api/handler/admin/user_handler.go b/api/handler/admin/user_handler.go index 6f534d7b..4148edd8 100644 --- a/api/handler/admin/user_handler.go +++ b/api/handler/admin/user_handler.go @@ -1,14 +1,21 @@ package admin +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core" - "chatplus/core/types" - "chatplus/handler" - "chatplus/service" - "chatplus/store/model" - "chatplus/store/vo" - "chatplus/utils" - "chatplus/utils/resp" + "geekai/core" + "geekai/core/types" + "geekai/handler" + "geekai/service" + "geekai/store/model" + "geekai/store/vo" + "geekai/utils" + "geekai/utils/resp" "fmt" "time" diff --git a/api/handler/base_handler.go b/api/handler/base_handler.go index 2991b5d3..406b9b53 100644 --- a/api/handler/base_handler.go +++ b/api/handler/base_handler.go @@ -1,11 +1,18 @@ package handler +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core" - "chatplus/core/types" - logger2 "chatplus/logger" - "chatplus/store/model" - "chatplus/utils" + "geekai/core" + "geekai/core/types" + logger2 "geekai/logger" + "geekai/store/model" + "geekai/utils" "errors" "fmt" "gorm.io/gorm" diff --git a/api/handler/captcha_handler.go b/api/handler/captcha_handler.go index fe186d15..57852b4a 100644 --- a/api/handler/captcha_handler.go +++ b/api/handler/captcha_handler.go @@ -1,9 +1,16 @@ package handler +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core/types" - "chatplus/service" - "chatplus/utils/resp" + "geekai/core/types" + "geekai/service" + "geekai/utils/resp" "github.com/gin-gonic/gin" ) diff --git a/api/handler/chat_model_handler.go b/api/handler/chat_model_handler.go index e852fc23..baf3e471 100644 --- a/api/handler/chat_model_handler.go +++ b/api/handler/chat_model_handler.go @@ -1,11 +1,18 @@ package handler +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core" - "chatplus/store/model" - "chatplus/store/vo" - "chatplus/utils" - "chatplus/utils/resp" + "geekai/core" + "geekai/store/model" + "geekai/store/vo" + "geekai/utils" + "geekai/utils/resp" "github.com/gin-gonic/gin" "gorm.io/gorm" ) diff --git a/api/handler/chat_role_handler.go b/api/handler/chat_role_handler.go index a555256d..f246cb37 100644 --- a/api/handler/chat_role_handler.go +++ b/api/handler/chat_role_handler.go @@ -1,12 +1,19 @@ package handler +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core" - "chatplus/core/types" - "chatplus/store/model" - "chatplus/store/vo" - "chatplus/utils" - "chatplus/utils/resp" + "geekai/core" + "geekai/core/types" + "geekai/store/model" + "geekai/store/vo" + "geekai/utils" + "geekai/utils/resp" "github.com/gin-gonic/gin" "gorm.io/gorm" diff --git a/api/handler/chatimpl/azure_handler.go b/api/handler/chatimpl/azure_handler.go index 11b3b69a..30e19a59 100644 --- a/api/handler/chatimpl/azure_handler.go +++ b/api/handler/chatimpl/azure_handler.go @@ -1,11 +1,18 @@ package chatimpl +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( "bufio" - "chatplus/core/types" - "chatplus/store/model" - "chatplus/store/vo" - "chatplus/utils" + "geekai/core/types" + "geekai/store/model" + "geekai/store/vo" + "geekai/utils" "context" "encoding/json" "fmt" diff --git a/api/handler/chatimpl/baidu_handler.go b/api/handler/chatimpl/baidu_handler.go index 08809dfe..4917d28b 100644 --- a/api/handler/chatimpl/baidu_handler.go +++ b/api/handler/chatimpl/baidu_handler.go @@ -1,11 +1,18 @@ package chatimpl +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( "bufio" - "chatplus/core/types" - "chatplus/store/model" - "chatplus/store/vo" - "chatplus/utils" + "geekai/core/types" + "geekai/store/model" + "geekai/store/vo" + "geekai/utils" "context" "encoding/json" "fmt" diff --git a/api/handler/chatimpl/chat_handler.go b/api/handler/chatimpl/chat_handler.go index 80077ea9..b81f530b 100644 --- a/api/handler/chatimpl/chat_handler.go +++ b/api/handler/chatimpl/chat_handler.go @@ -1,17 +1,24 @@ package chatimpl +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( "bytes" - "chatplus/core" - "chatplus/core/types" - "chatplus/handler" - logger2 "chatplus/logger" - "chatplus/service" - "chatplus/service/oss" - "chatplus/store/model" - "chatplus/store/vo" - "chatplus/utils" - "chatplus/utils/resp" + "geekai/core" + "geekai/core/types" + "geekai/handler" + logger2 "geekai/logger" + "geekai/service" + "geekai/service/oss" + "geekai/store/model" + "geekai/store/vo" + "geekai/utils" + "geekai/utils/resp" "context" "encoding/json" "errors" diff --git a/api/handler/chatimpl/chat_item_handler.go b/api/handler/chatimpl/chat_item_handler.go index c04dab19..3e04bf6e 100644 --- a/api/handler/chatimpl/chat_item_handler.go +++ b/api/handler/chatimpl/chat_item_handler.go @@ -1,11 +1,18 @@ package chatimpl +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core/types" - "chatplus/store/model" - "chatplus/store/vo" - "chatplus/utils" - "chatplus/utils/resp" + "geekai/core/types" + "geekai/store/model" + "geekai/store/vo" + "geekai/utils" + "geekai/utils/resp" "github.com/gin-gonic/gin" "gorm.io/gorm" diff --git a/api/handler/chatimpl/chatglm_handler.go b/api/handler/chatimpl/chatglm_handler.go index 5f391b3f..1094d9ce 100644 --- a/api/handler/chatimpl/chatglm_handler.go +++ b/api/handler/chatimpl/chatglm_handler.go @@ -1,11 +1,18 @@ package chatimpl +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( "bufio" - "chatplus/core/types" - "chatplus/store/model" - "chatplus/store/vo" - "chatplus/utils" + "geekai/core/types" + "geekai/store/model" + "geekai/store/vo" + "geekai/utils" "context" "encoding/json" "fmt" diff --git a/api/handler/chatimpl/openai_handler.go b/api/handler/chatimpl/openai_handler.go index d743e7d9..cf41ab1e 100644 --- a/api/handler/chatimpl/openai_handler.go +++ b/api/handler/chatimpl/openai_handler.go @@ -1,11 +1,18 @@ package chatimpl +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( "bufio" - "chatplus/core/types" - "chatplus/store/model" - "chatplus/store/vo" - "chatplus/utils" + "geekai/core/types" + "geekai/store/model" + "geekai/store/vo" + "geekai/utils" "context" "encoding/json" "fmt" diff --git a/api/handler/chatimpl/qwen_handler.go b/api/handler/chatimpl/qwen_handler.go index 340f00de..49e0a5d3 100644 --- a/api/handler/chatimpl/qwen_handler.go +++ b/api/handler/chatimpl/qwen_handler.go @@ -1,11 +1,18 @@ package chatimpl +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( "bufio" - "chatplus/core/types" - "chatplus/store/model" - "chatplus/store/vo" - "chatplus/utils" + "geekai/core/types" + "geekai/store/model" + "geekai/store/vo" + "geekai/utils" "context" "encoding/json" "fmt" diff --git a/api/handler/chatimpl/xunfei_handler.go b/api/handler/chatimpl/xunfei_handler.go index 36a5b785..00bbc35b 100644 --- a/api/handler/chatimpl/xunfei_handler.go +++ b/api/handler/chatimpl/xunfei_handler.go @@ -1,10 +1,17 @@ package chatimpl +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core/types" - "chatplus/store/model" - "chatplus/store/vo" - "chatplus/utils" + "geekai/core/types" + "geekai/store/model" + "geekai/store/vo" + "geekai/utils" "context" "crypto/hmac" "crypto/sha256" diff --git a/api/handler/config_handler.go b/api/handler/config_handler.go index ee58a94a..0b8fdb03 100644 --- a/api/handler/config_handler.go +++ b/api/handler/config_handler.go @@ -1,10 +1,17 @@ package handler +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core" - "chatplus/store/model" - "chatplus/utils" - "chatplus/utils/resp" + "geekai/core" + "geekai/store/model" + "geekai/utils" + "geekai/utils/resp" "github.com/gin-gonic/gin" "gorm.io/gorm" diff --git a/api/handler/dalle_handler.go b/api/handler/dalle_handler.go index 9401d610..ede79696 100644 --- a/api/handler/dalle_handler.go +++ b/api/handler/dalle_handler.go @@ -1,14 +1,21 @@ package handler +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core" - "chatplus/core/types" - "chatplus/service/dalle" - "chatplus/service/oss" - "chatplus/store/model" - "chatplus/store/vo" - "chatplus/utils" - "chatplus/utils/resp" + "geekai/core" + "geekai/core/types" + "geekai/service/dalle" + "geekai/service/oss" + "geekai/store/model" + "geekai/store/vo" + "geekai/utils" + "geekai/utils/resp" "net/http" "github.com/gorilla/websocket" diff --git a/api/handler/function_handler.go b/api/handler/function_handler.go index 0941db08..f1702079 100644 --- a/api/handler/function_handler.go +++ b/api/handler/function_handler.go @@ -1,13 +1,20 @@ package handler +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core" - "chatplus/core/types" - "chatplus/service/dalle" - "chatplus/service/oss" - "chatplus/store/model" - "chatplus/utils" - "chatplus/utils/resp" + "geekai/core" + "geekai/core/types" + "geekai/service/dalle" + "geekai/service/oss" + "geekai/store/model" + "geekai/utils" + "geekai/utils/resp" "errors" "fmt" "strings" diff --git a/api/handler/invite_handler.go b/api/handler/invite_handler.go index 37bb82d7..3e4fdb53 100644 --- a/api/handler/invite_handler.go +++ b/api/handler/invite_handler.go @@ -1,12 +1,19 @@ package handler +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core" - "chatplus/core/types" - "chatplus/store/model" - "chatplus/store/vo" - "chatplus/utils" - "chatplus/utils/resp" + "geekai/core" + "geekai/core/types" + "geekai/store/model" + "geekai/store/vo" + "geekai/utils" + "geekai/utils/resp" "github.com/gin-gonic/gin" "gorm.io/gorm" "strings" diff --git a/api/handler/markmap_handler.go b/api/handler/markmap_handler.go index c9465486..f5034758 100644 --- a/api/handler/markmap_handler.go +++ b/api/handler/markmap_handler.go @@ -1,12 +1,19 @@ package handler +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( "bufio" "bytes" - "chatplus/core" - "chatplus/core/types" - "chatplus/store/model" - "chatplus/utils" + "geekai/core" + "geekai/core/types" + "geekai/store/model" + "geekai/utils" "encoding/json" "errors" "fmt" diff --git a/api/handler/menu_handler.go b/api/handler/menu_handler.go index b922f54c..647ed1e0 100644 --- a/api/handler/menu_handler.go +++ b/api/handler/menu_handler.go @@ -1,11 +1,18 @@ package handler +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core" - "chatplus/store/model" - "chatplus/store/vo" - "chatplus/utils" - "chatplus/utils/resp" + "geekai/core" + "geekai/store/model" + "geekai/store/vo" + "geekai/utils" + "geekai/utils/resp" "github.com/gin-gonic/gin" "gorm.io/gorm" ) diff --git a/api/handler/mj_handler.go b/api/handler/mj_handler.go index e0e0f020..2f210801 100644 --- a/api/handler/mj_handler.go +++ b/api/handler/mj_handler.go @@ -1,15 +1,22 @@ package handler +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core" - "chatplus/core/types" - "chatplus/service" - "chatplus/service/mj" - "chatplus/service/oss" - "chatplus/store/model" - "chatplus/store/vo" - "chatplus/utils" - "chatplus/utils/resp" + "geekai/core" + "geekai/core/types" + "geekai/service" + "geekai/service/mj" + "geekai/service/oss" + "geekai/store/model" + "geekai/store/vo" + "geekai/utils" + "geekai/utils/resp" "encoding/base64" "fmt" "net/http" diff --git a/api/handler/order_handler.go b/api/handler/order_handler.go index a1cecc67..a56daa82 100644 --- a/api/handler/order_handler.go +++ b/api/handler/order_handler.go @@ -1,12 +1,19 @@ package handler +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core" - "chatplus/core/types" - "chatplus/store/model" - "chatplus/store/vo" - "chatplus/utils" - "chatplus/utils/resp" + "geekai/core" + "geekai/core/types" + "geekai/store/model" + "geekai/store/vo" + "geekai/utils" + "geekai/utils/resp" "github.com/gin-gonic/gin" "gorm.io/gorm" diff --git a/api/handler/payment_handler.go b/api/handler/payment_handler.go index 2b8f5dce..b6162784 100644 --- a/api/handler/payment_handler.go +++ b/api/handler/payment_handler.go @@ -1,13 +1,20 @@ package handler +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core" - "chatplus/core/types" - "chatplus/service" - "chatplus/service/payment" - "chatplus/store/model" - "chatplus/utils" - "chatplus/utils/resp" + "geekai/core" + "geekai/core/types" + "geekai/service" + "geekai/service/payment" + "geekai/store/model" + "geekai/utils" + "geekai/utils/resp" "embed" "encoding/base64" "fmt" diff --git a/api/handler/power_log_handler.go b/api/handler/power_log_handler.go index ba2ec4df..77732217 100644 --- a/api/handler/power_log_handler.go +++ b/api/handler/power_log_handler.go @@ -1,12 +1,19 @@ package handler +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core" - "chatplus/core/types" - "chatplus/store/model" - "chatplus/store/vo" - "chatplus/utils" - "chatplus/utils/resp" + "geekai/core" + "geekai/core/types" + "geekai/store/model" + "geekai/store/vo" + "geekai/utils" + "geekai/utils/resp" "github.com/gin-gonic/gin" "gorm.io/gorm" diff --git a/api/handler/product_handler.go b/api/handler/product_handler.go index 3e530896..34959aaf 100644 --- a/api/handler/product_handler.go +++ b/api/handler/product_handler.go @@ -1,11 +1,18 @@ package handler +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core" - "chatplus/store/model" - "chatplus/store/vo" - "chatplus/utils" - "chatplus/utils/resp" + "geekai/core" + "geekai/store/model" + "geekai/store/vo" + "geekai/utils" + "geekai/utils/resp" "github.com/gin-gonic/gin" "gorm.io/gorm" ) diff --git a/api/handler/reward_handler.go b/api/handler/reward_handler.go index f568b09b..ec019e97 100644 --- a/api/handler/reward_handler.go +++ b/api/handler/reward_handler.go @@ -1,12 +1,19 @@ package handler +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core" - "chatplus/core/types" - "chatplus/store/model" - "chatplus/store/vo" - "chatplus/utils" - "chatplus/utils/resp" + "geekai/core" + "geekai/core/types" + "geekai/store/model" + "geekai/store/vo" + "geekai/utils" + "geekai/utils/resp" "fmt" "github.com/gin-gonic/gin" "gorm.io/gorm" diff --git a/api/handler/sd_handler.go b/api/handler/sd_handler.go index 25f122a0..c4a5c3ef 100644 --- a/api/handler/sd_handler.go +++ b/api/handler/sd_handler.go @@ -1,16 +1,23 @@ package handler +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core" - "chatplus/core/types" - "chatplus/service" - "chatplus/service/oss" - "chatplus/service/sd" - "chatplus/store" - "chatplus/store/model" - "chatplus/store/vo" - "chatplus/utils" - "chatplus/utils/resp" + "geekai/core" + "geekai/core/types" + "geekai/service" + "geekai/service/oss" + "geekai/service/sd" + "geekai/store" + "geekai/store/model" + "geekai/store/vo" + "geekai/utils" + "geekai/utils/resp" "fmt" "net/http" "time" diff --git a/api/handler/sms_handler.go b/api/handler/sms_handler.go index 827faeb3..7740a77e 100644 --- a/api/handler/sms_handler.go +++ b/api/handler/sms_handler.go @@ -1,12 +1,19 @@ package handler +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core" - "chatplus/core/types" - "chatplus/service" - "chatplus/service/sms" - "chatplus/utils" - "chatplus/utils/resp" + "geekai/core" + "geekai/core/types" + "geekai/service" + "geekai/service/sms" + "geekai/utils" + "geekai/utils/resp" "strings" "github.com/gin-gonic/gin" diff --git a/api/handler/test_handler.go b/api/handler/test_handler.go index aad47233..35aba79f 100644 --- a/api/handler/test_handler.go +++ b/api/handler/test_handler.go @@ -1,8 +1,8 @@ package handler import ( - "chatplus/service" - "chatplus/service/payment" + "geekai/service" + "geekai/service/payment" "gorm.io/gorm" ) diff --git a/api/handler/upload_handler.go b/api/handler/upload_handler.go index 8c2e0f8e..af37f972 100644 --- a/api/handler/upload_handler.go +++ b/api/handler/upload_handler.go @@ -1,12 +1,19 @@ package handler +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core" - "chatplus/service/oss" - "chatplus/store/model" - "chatplus/store/vo" - "chatplus/utils" - "chatplus/utils/resp" + "geekai/core" + "geekai/service/oss" + "geekai/store/model" + "geekai/store/vo" + "geekai/utils" + "geekai/utils/resp" "github.com/gin-gonic/gin" "gorm.io/gorm" "time" diff --git a/api/handler/user_handler.go b/api/handler/user_handler.go index 4f20acf2..6068f565 100644 --- a/api/handler/user_handler.go +++ b/api/handler/user_handler.go @@ -1,13 +1,20 @@ package handler +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core" - "chatplus/core/types" - "chatplus/service" - "chatplus/store/model" - "chatplus/store/vo" - "chatplus/utils" - "chatplus/utils/resp" + "geekai/core" + "geekai/core/types" + "geekai/service" + "geekai/store/model" + "geekai/store/vo" + "geekai/utils" + "geekai/utils/resp" "fmt" "strings" "time" diff --git a/api/logger/logger.go b/api/logger/logger.go index d744708d..cd50840b 100644 --- a/api/logger/logger.go +++ b/api/logger/logger.go @@ -1,5 +1,12 @@ package logger +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( "go.uber.org/zap" "go.uber.org/zap/zapcore" diff --git a/api/main.go b/api/main.go index b060d675..12a3192c 100644 --- a/api/main.go +++ b/api/main.go @@ -1,23 +1,30 @@ package main +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core" - "chatplus/core/types" - "chatplus/handler" - "chatplus/handler/admin" - "chatplus/handler/chatimpl" - logger2 "chatplus/logger" - "chatplus/service" - "chatplus/service/dalle" - "chatplus/service/mj" - "chatplus/service/oss" - "chatplus/service/payment" - "chatplus/service/sd" - "chatplus/service/sms" - "chatplus/service/wx" - "chatplus/store" "context" "embed" + "geekai/core" + "geekai/core/types" + "geekai/handler" + "geekai/handler/admin" + "geekai/handler/chatimpl" + logger2 "geekai/logger" + "geekai/service" + "geekai/service/dalle" + "geekai/service/mj" + "geekai/service/oss" + "geekai/service/payment" + "geekai/service/sd" + "geekai/service/sms" + "geekai/service/wx" + "geekai/store" "io" "log" "os" diff --git a/api/service/captcha_service.go b/api/service/captcha_service.go index e8cfd39b..864e9395 100644 --- a/api/service/captcha_service.go +++ b/api/service/captcha_service.go @@ -1,9 +1,16 @@ package service +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core/types" "errors" "fmt" + "geekai/core/types" "github.com/imroc/req/v3" "time" ) diff --git a/api/service/dalle/service.go b/api/service/dalle/service.go index 76d7e72e..c1cb148c 100644 --- a/api/service/dalle/service.go +++ b/api/service/dalle/service.go @@ -1,14 +1,21 @@ package dalle +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core/types" - logger2 "chatplus/logger" - "chatplus/service" - "chatplus/service/oss" - "chatplus/service/sd" - "chatplus/store" - "chatplus/store/model" - "chatplus/utils" + "geekai/core/types" + logger2 "geekai/logger" + "geekai/service" + "geekai/service/oss" + "geekai/service/sd" + "geekai/store" + "geekai/store/model" + "geekai/utils" "errors" "fmt" "github.com/go-redis/redis/v8" diff --git a/api/service/license_service.go b/api/service/license_service.go index f30ce098..482ab428 100644 --- a/api/service/license_service.go +++ b/api/service/license_service.go @@ -1,11 +1,18 @@ package service +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core" - "chatplus/core/types" - "chatplus/store" "errors" "fmt" + "geekai/core" + "geekai/core/types" + "geekai/store" "github.com/imroc/req/v3" "github.com/shirou/gopsutil/host" "strings" diff --git a/api/service/mj/client.go b/api/service/mj/client.go index 2b71b007..504553f0 100644 --- a/api/service/mj/client.go +++ b/api/service/mj/client.go @@ -1,6 +1,13 @@ package mj -import "chatplus/core/types" +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +import "geekai/core/types" type Client interface { Imagine(task types.MjTask) (ImageRes, error) diff --git a/api/service/mj/plus_client.go b/api/service/mj/plus_client.go index 822d4b91..7f85fd61 100644 --- a/api/service/mj/plus_client.go +++ b/api/service/mj/plus_client.go @@ -1,11 +1,18 @@ package mj +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core/types" - "chatplus/utils" "encoding/base64" "errors" "fmt" + "geekai/core/types" + "geekai/utils" "github.com/imroc/req/v3" "io" "time" diff --git a/api/service/mj/pool.go b/api/service/mj/pool.go index 48243137..993d5c32 100644 --- a/api/service/mj/pool.go +++ b/api/service/mj/pool.go @@ -1,14 +1,21 @@ package mj +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core/types" - logger2 "chatplus/logger" - "chatplus/service" - "chatplus/service/oss" - "chatplus/service/sd" - "chatplus/store" - "chatplus/store/model" "fmt" + "geekai/core/types" + logger2 "geekai/logger" + "geekai/service" + "geekai/service/oss" + "geekai/service/sd" + "geekai/store" + "geekai/store/model" "github.com/go-redis/redis/v8" "time" diff --git a/api/service/mj/proxy_client.go b/api/service/mj/proxy_client.go index b8df3211..e6a557d4 100644 --- a/api/service/mj/proxy_client.go +++ b/api/service/mj/proxy_client.go @@ -1,11 +1,18 @@ package mj +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core/types" - "chatplus/utils" "encoding/base64" "errors" "fmt" + "geekai/core/types" + "geekai/utils" "github.com/imroc/req/v3" "io" ) diff --git a/api/service/mj/service.go b/api/service/mj/service.go index 0d5f0dea..9a87b5b8 100644 --- a/api/service/mj/service.go +++ b/api/service/mj/service.go @@ -1,13 +1,20 @@ package mj +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core/types" - "chatplus/service" - "chatplus/service/sd" - "chatplus/store" - "chatplus/store/model" - "chatplus/utils" "fmt" + "geekai/core/types" + "geekai/service" + "geekai/service/sd" + "geekai/store" + "geekai/store/model" + "geekai/utils" "strings" "time" diff --git a/api/service/oss/aliyun_oss.go b/api/service/oss/aliyun_oss.go index d713d278..00dcc8d7 100644 --- a/api/service/oss/aliyun_oss.go +++ b/api/service/oss/aliyun_oss.go @@ -1,11 +1,18 @@ package oss +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( "bytes" - "chatplus/core/types" - "chatplus/utils" "encoding/base64" "fmt" + "geekai/core/types" + "geekai/utils" "net/url" "path/filepath" "strings" diff --git a/api/service/oss/localstorage.go b/api/service/oss/localstorage.go index aeff4427..f64ff055 100644 --- a/api/service/oss/localstorage.go +++ b/api/service/oss/localstorage.go @@ -1,10 +1,17 @@ package oss +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core/types" - "chatplus/utils" "encoding/base64" "fmt" + "geekai/core/types" + "geekai/utils" "github.com/gin-gonic/gin" "net/url" "os" diff --git a/api/service/oss/minio_oss.go b/api/service/oss/minio_oss.go index 75a9cfbb..5eaca499 100644 --- a/api/service/oss/minio_oss.go +++ b/api/service/oss/minio_oss.go @@ -1,11 +1,18 @@ package oss +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core/types" - "chatplus/utils" "context" "encoding/base64" "fmt" + "geekai/core/types" + "geekai/utils" "net/url" "path/filepath" "strings" diff --git a/api/service/oss/qiniu_oss.go b/api/service/oss/qiniu_oss.go index 79ea5d1c..703b6d78 100644 --- a/api/service/oss/qiniu_oss.go +++ b/api/service/oss/qiniu_oss.go @@ -1,12 +1,19 @@ package oss +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( "bytes" - "chatplus/core/types" - "chatplus/utils" "context" "encoding/base64" "fmt" + "geekai/core/types" + "geekai/utils" "net/url" "path/filepath" "strings" diff --git a/api/service/oss/uploader.go b/api/service/oss/uploader.go index be6a6f53..435e22d7 100644 --- a/api/service/oss/uploader.go +++ b/api/service/oss/uploader.go @@ -1,5 +1,12 @@ package oss +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import "github.com/gin-gonic/gin" const Local = "LOCAL" diff --git a/api/service/oss/uploader_manager.go b/api/service/oss/uploader_manager.go index 8a6c1359..573891b5 100644 --- a/api/service/oss/uploader_manager.go +++ b/api/service/oss/uploader_manager.go @@ -1,7 +1,14 @@ package oss +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core/types" + "geekai/core/types" "strings" ) diff --git a/api/service/payment/alipay_service.go b/api/service/payment/alipay_service.go index d33d5032..228949d2 100644 --- a/api/service/payment/alipay_service.go +++ b/api/service/payment/alipay_service.go @@ -1,9 +1,16 @@ package payment +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core/types" - logger2 "chatplus/logger" "fmt" + "geekai/core/types" + logger2 "geekai/logger" "github.com/smartwalle/alipay/v3" "log" "net/url" diff --git a/api/service/payment/hupipay_serive.go b/api/service/payment/hupipay_serive.go index 675e0a03..d0d0809a 100644 --- a/api/service/payment/hupipay_serive.go +++ b/api/service/payment/hupipay_serive.go @@ -1,12 +1,19 @@ package payment +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core/types" - "chatplus/utils" "crypto/md5" "encoding/hex" "errors" "fmt" + "geekai/core/types" + "geekai/utils" "io" "net/http" "net/url" diff --git a/api/service/payment/payjs_service.go b/api/service/payment/payjs_service.go index 13774173..1b42406b 100644 --- a/api/service/payment/payjs_service.go +++ b/api/service/payment/payjs_service.go @@ -1,12 +1,19 @@ package payment +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core/types" - "chatplus/utils" "crypto/md5" "encoding/hex" "errors" "fmt" + "geekai/core/types" + "geekai/utils" "io" "net/http" "net/url" diff --git a/api/service/sd/pool.go b/api/service/sd/pool.go index e191eef8..22110f40 100644 --- a/api/service/sd/pool.go +++ b/api/service/sd/pool.go @@ -1,11 +1,18 @@ package sd +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core/types" - "chatplus/service/oss" - "chatplus/store" - "chatplus/store/model" "fmt" + "geekai/core/types" + "geekai/service/oss" + "geekai/store" + "geekai/store/model" "time" "github.com/go-redis/redis/v8" diff --git a/api/service/sd/service.go b/api/service/sd/service.go index 9d6932a2..4f6fb2c7 100644 --- a/api/service/sd/service.go +++ b/api/service/sd/service.go @@ -1,13 +1,20 @@ package sd +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core/types" - "chatplus/service" - "chatplus/service/oss" - "chatplus/store" - "chatplus/store/model" - "chatplus/utils" "fmt" + "geekai/core/types" + "geekai/service" + "geekai/service/oss" + "geekai/store" + "geekai/store/model" + "geekai/utils" "strings" "time" diff --git a/api/service/sd/types.go b/api/service/sd/types.go index eb172bcd..efdb970a 100644 --- a/api/service/sd/types.go +++ b/api/service/sd/types.go @@ -1,6 +1,13 @@ package sd -import logger2 "chatplus/logger" +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +import logger2 "geekai/logger" var logger = logger2.GetLogger() diff --git a/api/service/sms/aliyun.go b/api/service/sms/aliyun.go index 8a876189..d0ea1b97 100644 --- a/api/service/sms/aliyun.go +++ b/api/service/sms/aliyun.go @@ -1,8 +1,15 @@ package sms +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core/types" "fmt" + "geekai/core/types" "github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi" ) diff --git a/api/service/sms/bao.go b/api/service/sms/bao.go index 25201f2b..a00398de 100644 --- a/api/service/sms/bao.go +++ b/api/service/sms/bao.go @@ -1,9 +1,16 @@ package sms +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core/types" - "chatplus/utils" "fmt" + "geekai/core/types" + "geekai/utils" "io" "net/http" "net/url" diff --git a/api/service/sms/service.go b/api/service/sms/service.go index 16166aab..14d12ca9 100644 --- a/api/service/sms/service.go +++ b/api/service/sms/service.go @@ -1,5 +1,12 @@ package sms +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + const Ali = "ALI" const Bao = "BAO" diff --git a/api/service/sms/service_manager.go b/api/service/sms/service_manager.go index c360cc0f..0a4fcac8 100644 --- a/api/service/sms/service_manager.go +++ b/api/service/sms/service_manager.go @@ -1,8 +1,15 @@ package sms +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core/types" - logger2 "chatplus/logger" + "geekai/core/types" + logger2 "geekai/logger" "strings" ) diff --git a/api/service/smtp_sms_service.go b/api/service/smtp_sms_service.go index 256de934..e93e9265 100644 --- a/api/service/smtp_sms_service.go +++ b/api/service/smtp_sms_service.go @@ -1,10 +1,17 @@ package service +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( "bytes" - "chatplus/core/types" "crypto/tls" "fmt" + "geekai/core/types" "mime" "net/smtp" "net/textproto" diff --git a/api/service/snowflake.go b/api/service/snowflake.go index a4c19193..d99caa84 100644 --- a/api/service/snowflake.go +++ b/api/service/snowflake.go @@ -1,5 +1,12 @@ package service +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( "fmt" "sync" diff --git a/api/service/wx/bot.go b/api/service/wx/bot.go index cb62f237..47384581 100644 --- a/api/service/wx/bot.go +++ b/api/service/wx/bot.go @@ -1,8 +1,15 @@ package wx +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - logger2 "chatplus/logger" - "chatplus/store/model" + logger2 "geekai/logger" + "geekai/store/model" "github.com/eatmoreapple/openwechat" "github.com/skip2/go-qrcode" "gorm.io/gorm" diff --git a/api/service/wx/tranaction.go b/api/service/wx/tranaction.go index ca1383af..2dfb529e 100644 --- a/api/service/wx/tranaction.go +++ b/api/service/wx/tranaction.go @@ -1,5 +1,12 @@ package wx +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( "encoding/xml" "net/url" diff --git a/api/service/xxl_job_service.go b/api/service/xxl_job_service.go index 69cb1b79..14fec1db 100644 --- a/api/service/xxl_job_service.go +++ b/api/service/xxl_job_service.go @@ -1,12 +1,19 @@ package service +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core/types" - logger2 "chatplus/logger" - "chatplus/store/model" - "chatplus/utils" "context" "fmt" + "geekai/core/types" + logger2 "geekai/logger" + "geekai/store/model" + "geekai/utils" "github.com/xxl-job/xxl-job-executor-go" "gorm.io/gorm" "time" diff --git a/api/store/leveldb.go b/api/store/leveldb.go index 269653e8..5de00425 100644 --- a/api/store/leveldb.go +++ b/api/store/leveldb.go @@ -1,5 +1,12 @@ package store +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( "encoding/json" diff --git a/api/store/model/order.go b/api/store/model/order.go index a9c6c66d..a1c6929f 100644 --- a/api/store/model/order.go +++ b/api/store/model/order.go @@ -1,7 +1,7 @@ package model import ( - "chatplus/core/types" + "geekai/core/types" "gorm.io/gorm" ) diff --git a/api/store/model/power_log.go b/api/store/model/power_log.go index e0d6a527..fd6c3228 100644 --- a/api/store/model/power_log.go +++ b/api/store/model/power_log.go @@ -1,7 +1,7 @@ package model import ( - "chatplus/core/types" + "geekai/core/types" "time" ) diff --git a/api/store/mysql.go b/api/store/mysql.go index 5e8e6550..70aba960 100644 --- a/api/store/mysql.go +++ b/api/store/mysql.go @@ -1,7 +1,14 @@ package store +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core/types" + "geekai/core/types" "gorm.io/driver/mysql" "gorm.io/gorm" "gorm.io/gorm/logger" diff --git a/api/store/redis.go b/api/store/redis.go index c72521d2..f2e4814f 100644 --- a/api/store/redis.go +++ b/api/store/redis.go @@ -1,8 +1,15 @@ package store +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core/types" "context" + "geekai/core/types" "github.com/go-redis/redis/v8" ) diff --git a/api/store/redis_queue.go b/api/store/redis_queue.go index 71a730a6..3251eb57 100644 --- a/api/store/redis_queue.go +++ b/api/store/redis_queue.go @@ -1,8 +1,15 @@ package store +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/utils" "context" + "geekai/utils" "github.com/go-redis/redis/v8" ) diff --git a/api/store/vo/chat_role.go b/api/store/vo/chat_role.go index e13d5f0c..4bd530f8 100644 --- a/api/store/vo/chat_role.go +++ b/api/store/vo/chat_role.go @@ -1,6 +1,6 @@ package vo -import "chatplus/core/types" +import "geekai/core/types" type ChatRole struct { BaseVo diff --git a/api/store/vo/config.go b/api/store/vo/config.go index 6b07094d..a0e79075 100644 --- a/api/store/vo/config.go +++ b/api/store/vo/config.go @@ -1,6 +1,6 @@ package vo -import "chatplus/core/types" +import "geekai/core/types" type Config struct { Id uint `json:"id"` diff --git a/api/store/vo/order.go b/api/store/vo/order.go index bd7087a7..c076d002 100644 --- a/api/store/vo/order.go +++ b/api/store/vo/order.go @@ -1,7 +1,7 @@ package vo import ( - "chatplus/core/types" + "geekai/core/types" ) type Order struct { diff --git a/api/store/vo/power_log.go b/api/store/vo/power_log.go index f0e598b7..ae19a9d6 100644 --- a/api/store/vo/power_log.go +++ b/api/store/vo/power_log.go @@ -1,6 +1,6 @@ package vo -import "chatplus/core/types" +import "geekai/core/types" type PowerLog struct { Id uint `json:"id"` diff --git a/api/store/vo/sd_job.go b/api/store/vo/sd_job.go index 0fcf95ab..8d521504 100644 --- a/api/store/vo/sd_job.go +++ b/api/store/vo/sd_job.go @@ -1,7 +1,7 @@ package vo import ( - "chatplus/core/types" + "geekai/core/types" "time" ) diff --git a/api/test/test.go b/api/test/test.go index ff31c2f5..46b90764 100644 --- a/api/test/test.go +++ b/api/test/test.go @@ -1,7 +1,7 @@ package main import ( - "chatplus/utils" + "geekai/utils" "fmt" ) diff --git a/api/utils/common.go b/api/utils/common.go index d921a363..142256d8 100644 --- a/api/utils/common.go +++ b/api/utils/common.go @@ -1,5 +1,12 @@ package utils +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( "bytes" "encoding/json" diff --git a/api/utils/crypto.go b/api/utils/crypto.go index 3f885311..30fa07d5 100644 --- a/api/utils/crypto.go +++ b/api/utils/crypto.go @@ -1,5 +1,12 @@ package utils +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( "bytes" "crypto/aes" diff --git a/api/utils/net.go b/api/utils/net.go index 74d05e03..5f02922c 100644 --- a/api/utils/net.go +++ b/api/utils/net.go @@ -1,9 +1,16 @@ package utils +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core/types" - logger2 "chatplus/logger" "encoding/json" + "geekai/core/types" + logger2 "geekai/logger" "io" "net/http" "net/url" diff --git a/api/utils/openai.go b/api/utils/openai.go index 53b61264..4fa3ee0f 100644 --- a/api/utils/openai.go +++ b/api/utils/openai.go @@ -1,9 +1,16 @@ package utils +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core/types" - "chatplus/store/model" "fmt" + "geekai/core/types" + "geekai/store/model" "github.com/imroc/req/v3" "github.com/pkoukk/tiktoken-go" "gorm.io/gorm" diff --git a/api/utils/resp/response.go b/api/utils/resp/response.go index 55c301ed..3d211246 100644 --- a/api/utils/resp/response.go +++ b/api/utils/resp/response.go @@ -1,7 +1,14 @@ package resp +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( - "chatplus/core/types" + "geekai/core/types" "github.com/gin-gonic/gin" "net/http" ) diff --git a/api/utils/strings.go b/api/utils/strings.go index 6a9e7655..ff5c28e6 100644 --- a/api/utils/strings.go +++ b/api/utils/strings.go @@ -1,5 +1,12 @@ package utils +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( "encoding/json" "fmt" diff --git a/api/utils/upload.go b/api/utils/upload.go index 695d9183..5c764d8e 100644 --- a/api/utils/upload.go +++ b/api/utils/upload.go @@ -1,5 +1,12 @@ package utils +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import ( "fmt" "io" diff --git a/web/src/main.js b/web/src/main.js index 2b8ca4cc..2afc5da9 100644 --- a/web/src/main.js +++ b/web/src/main.js @@ -1,3 +1,10 @@ +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import {createApp} from 'vue' import ElementPlus from "element-plus" import "element-plus/dist/index.css" diff --git a/web/src/router.js b/web/src/router.js index 538fc9eb..9c8739d9 100644 --- a/web/src/router.js +++ b/web/src/router.js @@ -1,3 +1,10 @@ +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import {createRouter, createWebHistory} from "vue-router"; const routes = [ diff --git a/web/src/store/system.js b/web/src/store/system.js index 962919bd..eba656b3 100644 --- a/web/src/store/system.js +++ b/web/src/store/system.js @@ -1,3 +1,10 @@ +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import Storage from "good-storage"; const MOBILE_THEME = process.env.VUE_APP_KEY_PREFIX + "MOBILE_THEME" diff --git a/web/src/utils/http.js b/web/src/utils/http.js index 7f5b3caf..665f9a8e 100644 --- a/web/src/utils/http.js +++ b/web/src/utils/http.js @@ -1,3 +1,10 @@ +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + import axios from 'axios' import {getAdminToken, getSessionId, getUserToken} from "@/store/session"; diff --git a/web/src/utils/libs.js b/web/src/utils/libs.js index 49817593..2a2879bb 100644 --- a/web/src/utils/libs.js +++ b/web/src/utils/libs.js @@ -1,3 +1,10 @@ +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// * Copyright 2023 The Geek-AI Authors. All rights reserved. +// * Use of this source code is governed by a Apache-2.0 license +// * that can be found in the LICENSE file. +// * @Author yangjian102621@163.com +// * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + /** * Util lib functions */