Browse Source

更新示例

Pchen. 3 months ago
parent
commit
d5854e7d37
3 changed files with 45 additions and 3 deletions
  1. 9 3
      README.md
  2. 11 0
      base_config_example.py
  3. 25 0
      db_config_example.py

+ 9 - 3
README.md

@@ -1,5 +1,11 @@
-### TO DO :
+# GitNexus-Core
 
 
-修改数据库内时间为13位毫秒时间戳
+先前往阿里云百炼平台创建应用并收集apikey等信息。
+
+编辑数据库及大模型配置文件:
+
+```
+cp db_config_example.py db_config.py
+cp base_config_example.py base_config.py
+```
 
 
-提取所有配置(apikey、appid)到统一的配置文件 并取消跟踪

+ 11 - 0
base_config_example.py

@@ -0,0 +1,11 @@
+path = "/www/gitnexus_repos/"
+avatar_url = "https://cravatar.cn/avatar/"
+
+ai_key = "sk-xxxxxxxxxxx"
+file_summary_app_id = "ef50d7xxxxxxxxx"
+commit_summary_app_id="88426cxxxxxxxxx"
+filter_code_files_app_id = "b0725a23eaxxxxx"
+analysis_results_app_id = "b6edbxxxxxx"
+
+mcp_key = "sk-xxxxxxxxx"
+mcp_app_id = "aeee454xxxxxxxx"

+ 25 - 0
db_config_example.py

@@ -0,0 +1,25 @@
+TORTOISE_ORM = {
+    "connections": {
+        "default": {
+            "engine": "tortoise.backends.mysql",
+            "credentials": {
+                "host": "127.0.0.1",
+                "port": 3306,
+                "user": "gitnexus",
+                "password": "",
+                "database": "gitnexus",
+                "minsize": 3,    # 最小连接数
+                "maxsize": 20,   # 最大连接数
+                "charset": "utf8mb4"
+            }
+        }
+    },
+    "apps": {
+        "models": {
+            "models": ["models.gitModels"],  # 包含模型文件
+            "default_connection": "default"
+        }
+    },
+    "use_tz": False,
+    "timezone": "Asia/Shanghai"
+}