Эх сурвалжийг харах

docs: enhance quick usage documentation with configuration examples and improve mac environment check

myhloli 2 долоо хоног өмнө
parent
commit
14ca71eed0

+ 19 - 0
docs/en/usage/quick_usage.md

@@ -86,6 +86,25 @@ Here are some available configuration options:
     * Compatible with all LLM models supporting `openai protocol`, defaults to using Alibaba Cloud Bailian's `qwen3-next-80b-a3b-instruct` model. 
     * You need to configure your own API key and set `enable` to `true` to enable this feature.
     * If your API provider does not support the `enable_thinking` parameter, please manually remove it.
+        * For example, in your configuration file, the `llm-aided-config` section may look like:
+          ```json
+          "llm-aided-config": {
+             "api_key": "your_api_key",
+             "base_url": "https://dashscope.aliyuncs.com/compatible-mode/v1",
+             "model": "qwen3-next-80b-a3b-instruct",
+             "enable_thinking": false,
+             "enable": false
+          }
+          ```
+        * To remove the `enable_thinking` parameter, simply delete the line containing `"enable_thinking": false`, resulting in:
+          ```json
+          "llm-aided-config": {
+             "api_key": "your_api_key",
+             "base_url": "https://dashscope.aliyuncs.com/compatible-mode/v1",
+             "model": "qwen3-next-80b-a3b-instruct",
+             "enable": false
+          }
+          ```
   
 - `models-dir`: 
     * Used to specify local model storage directory

+ 19 - 0
docs/zh/usage/quick_usage.md

@@ -85,6 +85,25 @@ MinerU 现已实现开箱即用,但也支持通过配置文件扩展功能。
     * 默认使用`阿里云百炼`的`qwen3-next-80b-a3b-instruct`模型
     * 您需要自行配置 API 密钥并将`enable`设置为`true`来启用此功能
     * 如果您的api供应商不支持`enable_thinking`参数,请手动将该参数删除
+        * 例如,在您的配置文件中,`llm-aided-config` 部分可能如下所示:
+          ```json
+          "llm-aided-config": {
+             "api_key": "your_api_key",
+             "base_url": "https://dashscope.aliyuncs.com/compatible-mode/v1",
+             "model": "qwen3-next-80b-a3b-instruct",
+             "enable_thinking": false,
+             "enable": false
+          }
+          ```
+        * 要移除`enable_thinking`参数,只需删除包含`"enable_thinking": false`的那一行,结果如下:
+          ```json
+          "llm-aided-config": {
+             "api_key": "your_api_key",
+             "base_url": "https://dashscope.aliyuncs.com/compatible-mode/v1",
+             "model": "qwen3-next-80b-a3b-instruct",
+             "enable": false
+          }
+          ```
   
 - `models-dir`:
     * 用于指定本地模型存储目录,请为`pipeline`和`vlm`后端分别指定模型目录,

+ 2 - 0
mineru/utils/check_mac_env.py

@@ -19,6 +19,8 @@ def is_mac_os_version_supported(min_version: str = "13.5") -> bool:
     if not is_mac_environment() or not is_apple_silicon_cpu():
         return False
     mac_version = platform.mac_ver()[0]
+    if not mac_version:
+        return False
     # print("Mac OS Version:", mac_version)
     return version.parse(mac_version) >= version.parse(min_version)