Преглед изворни кода

【修复】重构配置文件结构

- 修复部分配置项的嵌套关系,提高配置文件的可读性和易维护性
PJ568 пре 1 година
родитељ
комит
e815cc2c58
2 измењених фајлова са 40 додато и 38 уклоњено
  1. 1 1
      VERSION
  2. 39 37
      configs/Config.example.json

+ 1 - 1
VERSION

@@ -1 +1 @@
-0.3.0
+0.3.1

+ 39 - 37
configs/Config.example.json

@@ -1,44 +1,46 @@
 {
 {
-    "yaa": {
-        "stream": false
-    },
-    "llm_api": {
-        "provider": {
-            "api_url": "https://api.openai.com/v1/chat/completions",
-            "api_key": "",
-            "model_name": "gpt-4",
-            "model_type": {
-                "is_function_call": false,
-                "is_reasoning": false
+    "config": {
+        "yaa": {
+            "stream": false
+        },
+        "llm_api": {
+            "provider": {
+                "api_url": "https://api.openai.com/v1/chat/completions",
+                "api_key": "",
+                "model_name": "gpt-4",
+                "model_type": {
+                    "is_function_call": false,
+                    "is_reasoning": false
+                },
+                "cost_per_ktoken": 0.03,
+                "cost_unit": "USD",
+                "max_tokens": 2000,
+                "model_settings": {
+                    "use_custom_temp": false,
+                    "temperature": 0.7
+                }
             },
             },
-            "cost_per_ktoken": 0.03,
-            "cost_unit": "USD",
-            "max_tokens": 2000,
-            "model_settings": {
-                "use_custom_temp": false,
-                "temperature": 0.7
+            "stream": true,
+            "request_timeout": 360,
+            "interval": 0,
+            "retry": {
+                "times": 3,
+                "delay": 5
             }
             }
         },
         },
-        "stream": true,
-        "request_timeout": 360,
-        "interval": 0,
-        "retry": {
-            "times": 3,
-            "delay": 5
-        }
-    },
-    "prompt": {
-        "function": "TODO",
-        "system": "TODO",
-        "error": "TODO:{error}"
-    },
-    "tool": {
-        "base_tool": {
-            "auto_approve": false,
-            "timeout": 30,
-            "max_memory": "512MB",
-            "cpu_threshold": 0.8,
-            "interrupt_monitor": true
+        "prompt": {
+            "function": "TODO",
+            "system": "TODO",
+            "error": "TODO:{error}"
+        },
+        "tool": {
+            "base_tool": {
+                "auto_approve": false,
+                "timeout": 30,
+                "max_memory": "512MB",
+                "cpu_threshold": 0.8,
+                "interrupt_monitor": true
+            }
         }
         }
     }
     }
 }
 }