Skip to content

Commit

Permalink
Merge pull request d-run#225 from samzong/add-model-useguide
Browse files Browse the repository at this point in the history
Add model useguide
  • Loading branch information
samzong authored Feb 8, 2025
2 parents b4df6bc + 869872b commit b700ab3
Show file tree
Hide file tree
Showing 22 changed files with 179 additions and 0 deletions.
Binary file added docs/zh/docs/models/images/bobtranslate-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/zh/docs/models/images/bobtranslate-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/zh/docs/models/images/bobtranslate-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/zh/docs/models/images/bobtranslate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/zh/docs/models/images/cherry-studio-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/zh/docs/models/images/cherry-studio-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/zh/docs/models/images/cherry-studio-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/zh/docs/models/images/cherry-studio-5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/zh/docs/models/images/cherry-studio.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/zh/docs/models/images/cline-in-vscode-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/zh/docs/models/images/cline-in-vscode-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/zh/docs/models/images/cline-in-vscode-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/zh/docs/models/images/cline-in-vscode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/zh/docs/models/images/lobe-chat-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/zh/docs/models/images/lobe-chat-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/zh/docs/models/images/lobe-chat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions docs/zh/docs/models/user-guides/bob-translate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# 在 Bob 翻译中使用

## Bob Translate 介绍

Bob 是一款 macOS 平台的翻译和 OCR 软件,您可以在任何应用程序中使用 Bob 进行翻译和 OCR,即用即走,简单、快捷、高效!

![Bob Translate](../images/bobtranslate.png)

## 安装 Bob Translate

可以去 Mac App Store 下载安装 Bob Translate,[Appstore](https://apps.apple.com/cn/app/bob-%E7%BF%BB%E8%AF%91%E5%92%8C-ocr-%E5%B7%A5%E5%85%B7/id1630034110)

## 配置 Bob Translate

打开 Bob Translate 的配置页面,添加翻译服务,选择服务类型为 `OpenAI`

![Bob Translate](../images/bobtranslate-2.png)

添加 API Key 和 API Host。

- API Key: 输入您的 API Key
- API Host:
- MaaS 输入使用 `https://chat.d.run`
- 独立部署的模型服务,查看模型实例详情,一般是 `https://<region>.d.run`
- 配置自定义模型:如 `public/deepseek-r1`

![Bob Translate](../images/bobtranslate-3.png)

## 使用 Bob Translate

![Bob Translate](../images/bobtranslate-4.png)
36 changes: 36 additions & 0 deletions docs/zh/docs/models/user-guides/cherry-studio.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 在 Cherry Studio 中使用

## Cherry Studio 介绍

🍒 Cherry Studio 是一个 LLM 桌面客户端,支持多个 LLM 服务提供商,支持多种 LLM 服务提供商,包括 OpenAI, GPT-3, D.run 等。

![Cherry Studio](../images/cherry-studio.jpg)

## 安装 Cherry Studio

可以访问 Cherry Studio 官网下载安装包,[https://cherry-ai.com/](https://cherry-ai.com/)

支持 MacOS, Windows, Linux 三端版本。

## 配置 Cherry Studio

打开 Cherry Studio 的配置页面,添加模型服务商,命名为 `D.run`,服务商类型为 `OpenAI`

![Cherry Studio](../images/cherry-studio-2.png)

添加 API Key 和 API Host。

- API Key: 输入您的 API Key
- API Host:
- MaaS 输入使用 `https://chat.d.run`
- 独立部署的模型服务,查看模型实例详情,一般是 `https://<region>.d.run`

### 管理可用的模型

在 Cherry Studio 中,会自动检测模型列表,您可以在模型列表中启用您需要的模型。

![Cherry Studio](../images/cherry-studio-4.png)

## 使用 Cherry Studio

![Cherry Studio](../images/cherry-studio-5.png)
39 changes: 39 additions & 0 deletions docs/zh/docs/models/user-guides/cline-in-vscode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 在 VSCode 和 Cline 中使用

## Cline 介绍

Cline 是一个 VSCode 插件,它可以帮助您在 VSCode 中使用 D.run 的模型服务。

## 安装 Cline

在 VSCode 中搜索 Cline 插件并安装。

![Cline](../images/cline-in-vscode.png)

在这里也可以下载使用 RooCode 插件,它是 Cline 的分支。

> Cline 的前身是 Claude Dev, RooCode(RooCline) 是基于 Cline 的分支。
如果您的网络无法直接下载插件,可以考虑去 VSCode 插件市场下载插件的 `.vsix` 文件,然后在 VSCode 中选择 `Install from VSIX` 安装。

- [Cline](https://marketplace.visualstudio.com/items?itemName=saoudrizwan.claude-dev)
- [RooCode](https://marketplace.visualstudio.com/items?itemName=RooVeterinaryInc.roo-cline)

## 配置 Cline

打开 Cline 的配置页面

![Cline](../images/cline-in-vscode-2.png)

- API Provider: 选择 OpenAI Compatible
- Base URL: 输入 `https://chat.d.run`
- API Key: 输入您的 API Key
- Model ID: 输入您的 Model ID
- 可以从 D.run 的模型广场获取,MaaS 模型开头为 public/deeepseek-r1
- 独立部署的模型服务,可以从模型服务列表获取

![Cline](../images/cline-in-vscode-3.png)

## 使用 Cline

![Cline](../images/cline-in-vscode-4.png)
23 changes: 23 additions & 0 deletions docs/zh/docs/models/user-guides/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# 使用示例场景

您可以参考以下示例场景,在您的开发工作中配置并使用 D.run 提供的模型服务。

## 模型调用示例

- 参考 [模型调用示例](../api-call.md) ,获取模型调用的方式。
- 参考 [获取 APIKey](../apikey.md) ,获取密钥。

## 场景列表

场景介绍如下:

| 应用 | 介绍 | 操作说明 |
| ------------------------------------------------- | ------------------------------------------------------ | -------------------------------- |
| [Cline in VSCode](https://github.com/cline/cline) | 在 VSCode 中通过 Cline/RooCode 使用 D.run 的模型服务。 | [操作说明](./cline-in-vscode.md) |
| [Cherry Studio](https://cherry-ai.com) | 在 Cherry Studio 中使用 D.run 的模型服务。 | [操作说明](./cherry-studio.md) |
| [Bob Translate](https://bobtranslate.com) | 在 Bob Translate 中使用 D.run 的模型服务。 | [操作说明](./bob-translate.md) |
| [Lobe Chat](https://github.com/lobehub/lobe-chat) | 在 Lobe Chat 中使用 D.run 的模型服务。 | [操作说明](./lobe-chat.md) |

## 贡献说明

如果您有更多的使用场景,欢迎您通过 [Github PR](https://github.com/d-run/drun-docs) 告诉我们。
44 changes: 44 additions & 0 deletions docs/zh/docs/models/user-guides/lobe-chat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# 在 Lobe Chat 翻译中使用

## Lobe Chat 介绍

Lobe Chat - 一个开源的现代设计 AI 聊天框架。支持多 AI 提供商(OpenAI/Claude 3/Gemini/Ollama/Qwen/DeepSeek)、知识库(文件上传/知识管理/RAG)、多模态(视觉/TTS/插件/艺术品)。一键免费部署您的私有 ChatGPT/ Claude 应用。

![Lobe Chat](../images/lobe-chat.png)

## 安装 Lobe Chat

可以去参考 Lobe Chat 的文档进行下载安装,Lobe Chat 提供了多种部署的安装方式。

> [https://lobehub.com/zh/docs/self-hosting/start](https://lobehub.com/zh/docs/self-hosting/start)
本文档以 Docker 为例,主要介绍如何使用 D.run 的模型服务。

```bash
# lobechat 支持在部署时直接配置 API Key 和 API Host
$ docker run -d -p 3210:3210 \
-e OPENAI_API_KEY=sk-xxxx \ # 输入您的 API Key
-e OPENAI_PROXY_URL=https://chat.d.run/v1 \ # 输入您的 API Host
-e ENABLED_OLLAMA=0 \
-e ACCESS_CODE=drun \
--name lobe-chat \
lobehub/lobe-chat:latest
```

## 配置 Lobe Chat

Lobe Chat 也支持在部署后,用户自行去添加模型服务商配置。

![Lobe Chat](../images/lobe-chat-2.png)

添加 API Key 和 API Host。

- API Key: 输入您的 API Key
- API Host:
- MaaS 输入使用 `https://chat.d.run`
- 独立部署的模型服务,查看模型实例详情,一般是 `https://<region>.d.run`
- 配置自定义模型:如 `public/deepseek-r1`

## 使用 Lobe Chat

![Lobe Chat](../images/lobe-chat-3.png)
6 changes: 6 additions & 0 deletions docs/zh/navigation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ nav:
- 模型体验: models/exp.md
- 模型调用: models/api-call.md
- API Key 管理: models/apikey.md
- 使用示例场景:
- 示例场景介绍: models/user-guides/index.md
- 在 VSCode 和 Cline 中使用: models/user-guides/cline-in-vscode.md
- 在 Cherry Studio 中使用: models/user-guides/cherry-studio.md
- 在 Bob 翻译中使用: models/user-guides/bob-translate.md
- 在 LobeChat 中使用: models/user-guides/lobe-chat.md
- AI 应用:
- 功能列表: dak/features.md
- 应用中心:
Expand Down

0 comments on commit b700ab3

Please sign in to comment.