docs: 更新droid教程部分

This commit is contained in:
shaw
2025-10-10 21:06:02 +08:00
parent 6b02dbf040
commit c9ad287587
2 changed files with 257 additions and 257 deletions

View File

@@ -104,10 +104,7 @@ router.post('/claude/v1/messages/count_tokens', authenticateApiKey, async (req,
})
// OpenAI 端点 - /v1/responses
router.post(
['/openai/v1/responses', '/openai/responses'],
authenticateApiKey,
async (req, res) => {
router.post(['/openai/v1/responses', '/openai/responses'], authenticateApiKey, async (req, res) => {
try {
const sessionId =
req.headers['session_id'] ||
@@ -151,8 +148,7 @@ router.post(
message: error.message
})
}
}
)
})
// 模型列表端点(兼容性)
router.get('/*/v1/models', authenticateApiKey, async (req, res) => {

View File

@@ -604,10 +604,10 @@
<p class="mb-3 text-sm text-gray-700 dark:text-gray-300 sm:mb-4 sm:text-base">
Droid CLI 使用
<code class="rounded bg-gray-100 px-1 dark:bg-gray-800">~/.factory/config.json</code>
保存自定义模型Windows 路径为
保存自定义模型 Windows 中可直接编辑
<code class="rounded bg-gray-100 px-1 dark:bg-gray-800"
>C:\Users\你的用户名\.factory\config.json</code
>
>
</p>
<div
class="rounded-lg border border-blue-200 bg-blue-50 p-3 dark:border-blue-500/40 dark:bg-blue-950/30 sm:p-4"
@@ -624,7 +624,7 @@
<div
v-for="(line, index) in droidCliConfigLines"
:key="line + index"
class="whitespace-nowrap text-gray-300"
class="whitespace-pre text-gray-300"
>
{{ line }}
</div>
@@ -634,91 +634,6 @@
</p>
</div>
</div>
<!-- Droid CLI 配置 -->
<div class="mt-8">
<h5
class="mb-2 flex items-center text-base font-semibold text-gray-800 dark:text-gray-200 sm:mb-3 sm:text-lg"
>
<i class="fas fa-terminal mr-2 text-blue-600" />
配置 Droid CLI
</h5>
<p class="mb-3 text-sm text-gray-700 dark:text-gray-300 sm:mb-4 sm:text-base">
Droid CLI 使用
<code class="rounded bg-gray-100 px-1 dark:bg-gray-800">~/.factory/config.json</code>
保存自定义模型Windows 路径为
<code class="rounded bg-gray-100 px-1 dark:bg-gray-800"
>C:\Users\你的用户名\.factory\config.json</code
>
</p>
<div
class="rounded-lg border border-blue-200 bg-blue-50 p-3 dark:border-blue-500/40 dark:bg-blue-950/30 sm:p-4"
>
<h6 class="mb-2 text-sm font-medium text-blue-800 dark:text-blue-200 sm:text-base">
配置文件示例
</h6>
<p class="mb-3 text-sm text-blue-700 dark:text-blue-200">
将以下内容追加到配置文件中并替换示例中的域名和 API 密钥
</p>
<div
class="overflow-x-auto rounded bg-gray-900 p-2 font-mono text-xs text-green-400 sm:p-3 sm:text-sm"
>
<div
v-for="(line, index) in droidCliConfigLines"
:key="line + index"
class="whitespace-nowrap text-gray-300"
>
{{ line }}
</div>
</div>
<p class="mt-3 text-xs text-blue-700 dark:text-blue-200 sm:text-sm">
💡 Droid CLI 中选择自定义模型即可使用新的 Droid 账号池确保服务地址可被本地访问
</p>
</div>
</div>
<!-- Droid CLI 配置 -->
<div class="mt-8">
<h5
class="mb-2 flex items-center text-base font-semibold text-gray-800 dark:text-gray-200 sm:mb-3 sm:text-lg"
>
<i class="fas fa-terminal mr-2 text-blue-600" />
配置 Droid CLI
</h5>
<p class="mb-3 text-sm text-gray-700 dark:text-gray-300 sm:mb-4 sm:text-base">
Droid CLI 使用
<code class="rounded bg-gray-100 px-1 dark:bg-gray-800">~/.factory/config.json</code>
保存自定义模型Windows 路径为
<code class="rounded bg-gray-100 px-1 dark:bg-gray-800"
>C:\Users\你的用户名\.factory\config.json</code
>
</p>
<div
class="rounded-lg border border-blue-200 bg-blue-50 p-3 dark:border-blue-500/40 dark:bg-blue-950/30 sm:p-4"
>
<h6 class="mb-2 text-sm font-medium text-blue-800 dark:text-blue-200 sm:text-base">
配置文件示例
</h6>
<p class="mb-3 text-sm text-blue-700 dark:text-blue-200">
将以下内容追加到配置文件中并替换示例中的域名和 API 密钥
</p>
<div
class="overflow-x-auto rounded bg-gray-900 p-2 font-mono text-xs text-green-400 sm:p-3 sm:text-sm"
>
<div
v-for="(line, index) in droidCliConfigLines"
:key="line + index"
class="whitespace-nowrap text-gray-300"
>
{{ line }}
</div>
</div>
<p class="mt-3 text-xs text-blue-700 dark:text-blue-200 sm:text-sm">
💡 Droid CLI 中选择自定义模型即可使用新的 Droid 账号池确保服务地址可被本地访问
</p>
</div>
</div>
<!-- 第四步开始使用 -->
<div class="mb-6 sm:mb-8">
<h4
@@ -1349,6 +1264,49 @@
</div>
</div>
<!-- Droid CLI 配置 -->
<div class="mt-8">
<h5
class="mb-2 flex items-center text-base font-semibold text-gray-800 dark:text-gray-200 sm:mb-3 sm:text-lg"
>
<i class="fas fa-terminal mr-2 text-blue-600" />
配置 Droid CLI
</h5>
<p class="mb-3 text-sm text-gray-700 dark:text-gray-300 sm:mb-4 sm:text-base">
Droid CLI 使用
<code class="rounded bg-gray-100 px-1 dark:bg-gray-800">~/.factory/config.json</code>
保存自定义模型你可以在 Finder 中按
<code class="rounded bg-gray-100 px-1 dark:bg-gray-800"> + Shift + G</code>
并输入路径或运行
<code class="rounded bg-gray-100 px-1 dark:bg-gray-800">open ~/.factory</code>
快速打开配置目录
</p>
<div
class="rounded-lg border border-blue-200 bg-blue-50 p-3 dark:border-blue-500/40 dark:bg-blue-950/30 sm:p-4"
>
<h6 class="mb-2 text-sm font-medium text-blue-800 dark:text-blue-200 sm:text-base">
配置文件示例
</h6>
<p class="mb-3 text-sm text-blue-700 dark:text-blue-200">
将以下内容追加到配置文件中并替换示例中的域名和 API 密钥
</p>
<div
class="overflow-x-auto rounded bg-gray-900 p-2 font-mono text-xs text-green-400 sm:p-3 sm:text-sm"
>
<div
v-for="(line, index) in droidCliConfigLines"
:key="line + index"
class="whitespace-pre text-gray-300"
>
{{ line }}
</div>
</div>
<p class="mt-3 text-xs text-blue-700 dark:text-blue-200 sm:text-sm">
💡 Droid CLI 中选择自定义模型即可使用新的 Droid 账号池确保服务地址可被本地访问
</p>
</div>
</div>
<!-- 第四步开始使用 -->
<div class="mb-8">
<h4
@@ -1937,7 +1895,6 @@
</div>
</div>
</div>
<!-- VSCode 插件配置 (Linux) -->
<div
class="mt-6 rounded-lg border border-indigo-200 bg-indigo-50 p-3 dark:border-indigo-500/40 dark:bg-indigo-950/30 sm:p-4"
@@ -1967,6 +1924,50 @@
<div class="whitespace-nowrap text-gray-300">}</div>
</div>
</div>
<!-- Droid CLI 配置 -->
<div class="mt-8">
<h5
class="mb-2 flex items-center text-base font-semibold text-gray-800 dark:text-gray-200 sm:mb-3 sm:text-lg"
>
<i class="fas fa-terminal mr-2 text-blue-600" />
配置 Droid CLI
</h5>
<p class="mb-3 text-sm text-gray-700 dark:text-gray-300 sm:mb-4 sm:text-base">
Droid CLI 使用
<code class="rounded bg-gray-100 px-1 dark:bg-gray-800">~/.factory/config.json</code>
保存自定义模型 Linux WSL2 可直接编辑
<code class="rounded bg-gray-100 px-1 dark:bg-gray-800"
>/home/你的用户名/.factory/config.json</code
>
或在终端运行
<code class="rounded bg-gray-100 px-1 dark:bg-gray-800">xdg-open ~/.factory</code>
打开目录
</p>
<div
class="rounded-lg border border-blue-200 bg-blue-50 p-3 dark:border-blue-500/40 dark:bg-blue-950/30 sm:p-4"
>
<h6 class="mb-2 text-sm font-medium text-blue-800 dark:text-blue-200 sm:text-base">
配置文件示例
</h6>
<p class="mb-3 text-sm text-blue-700 dark:text-blue-200">
将以下内容追加到配置文件中并替换示例中的域名和 API 密钥
</p>
<div
class="overflow-x-auto rounded bg-gray-900 p-2 font-mono text-xs text-green-400 sm:p-3 sm:text-sm"
>
<div
v-for="(line, index) in droidCliConfigLines"
:key="line + index"
class="whitespace-pre text-gray-300"
>
{{ line }}
</div>
</div>
<p class="mt-3 text-xs text-blue-700 dark:text-blue-200 sm:text-sm">
💡 Droid CLI 中选择自定义模型即可使用新的 Droid 账号池确保服务地址可被本地访问
</p>
</div>
</div>
<!-- 第四步开始使用 -->
@@ -2072,7 +2073,9 @@
class="overflow-x-auto rounded bg-gray-900 p-2 font-mono text-xs text-green-400 sm:p-3 sm:text-sm"
>
<div class="mb-2"># Ubuntu/Debian</div>
<div class="whitespace-nowrap text-gray-300">sudo apt install build-essential</div>
<div class="whitespace-nowrap text-gray-300">
sudo apt install build-essential
</div>
<div class="mb-2 mt-2"># CentOS/RHEL</div>
<div class="whitespace-nowrap text-gray-300">
sudo dnf groupinstall "Development Tools"
@@ -2125,6 +2128,7 @@
</p>
</div>
</div>
</div>
</template>
<script setup>