Skip to content

Commit 4e654ea

Browse files
authored
⛅ docs: intro for kimi moonshot (#18)
1 parent da582f8 commit 4e654ea

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

README.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,17 @@ __[🌈 Live Demo 在线体验](https://pdsuwwz.github.io/chatgpt-vue3-light-mvp
1919
* 🌍 **大语言模型 API**:兼容 Spark 星火认知大模型、Kimi Moonshot 月之暗面大模型、SiliconFlow、Ollama 等,允许自由扩展
2020
* 🚀 **灵活扩展**:轻量级模块化 MVP 设计,纯前端开发,项目结构清晰,快速搭建 AI 对话原型
2121

22+
### 🧠 已支持的模型
23+
24+
详见 [这里](#-大模型响应处理)
25+
26+
- **(默认类型)模拟数据模型**`standard`
27+
- **Spark 星火大模型**`spark`
28+
- **llama 3 大模型**`ollama3`
29+
- **SiliconFlow 硅基流动大模型**`siliconflow`
30+
- **Kimi Moonshot 月之暗面大模型**`moonshot`
31+
32+
2233

2334
## 前置条件
2435

@@ -104,11 +115,12 @@ export const isMockDevelopment = isDev
104115

105116
### 接口函数修改
106117

107-
请求的函数同样需要修改,找到([src/store/business/index.ts](https://github.com/pdsuwwz/chatgpt-vue3-light-mvp/blob/4887f64a1167051647e54bf8cc23e484ead77b4a/src/store/business/index.ts#L39))的 [`createAssistantWriterStylized`](https://github.com/pdsuwwz/chatgpt-vue3-light-mvp/blob/4887f64a1167051647e54bf8cc23e484ead77b4a/src/store/business/index.ts#L39) 函数,可以发现默认会调用 `Kimi Moonshot` 模型接口
118+
请求的函数同样需要修改,找到([src/store/business/index.ts](https://github.com/pdsuwwz/chatgpt-vue3-light-mvp/blob/main/src/store/business/index.ts#L39))的 [`createAssistantWriterStylized`](https://github.com/pdsuwwz/chatgpt-vue3-light-mvp/blob/main/src/store/business/index.ts#L39) 函数,可以发现默认会调用 `Kimi Moonshot` 模型接口
108119

109120
改成你需要的模型接口调用即可:
110121

111-
![image](https://github.com/user-attachments/assets/16557cbc-701c-4082-bb62-4fc29c74edd0)
122+
![image](https://github.com/user-attachments/assets/a9f4fb47-e704-45eb-a806-df9ab9af2e2c)
123+
112124

113125

114126

@@ -150,13 +162,15 @@ export const isMockDevelopment = isDev
150162
- **注册**:访问 [Moonshot 开放平台控制台](https://platform.moonshot.cn/console) 进行注册登录
151163
- **创建 API 密钥**:访问 [账户信息 - API Key 管理](https://platform.moonshot.cn/console/api-keys) 新建 API 密钥
152164

153-
![image](https://github.com/user-attachments/assets/31e1ef13-869a-4695-a7c0-054d2c3e877f)
165+
![image](https://github.com/user-attachments/assets/718994f4-c05f-49e3-af4f-f36358413215)
166+
154167

155168
- **接口说明**:[官方示例代码 Chat Completion](https://platform.moonshot.cn/docs/api/chat#chat-completion)
156169
- **配置到本仓库**:将创建的 API 密钥填入 `.env` 文件中的 `VITE_MOONSHOT_KEY` 环境变量
157170
- **Moonshot现已支持的大模型**:[模型列表](https://platform.moonshot.cn/docs/api/chat#list-models)
158171

159-
![image](https://github.com/user-attachments/assets/f320f495-cb17-48ff-99c4-aaedbf87fc84)
172+
![image](https://github.com/user-attachments/assets/5d615123-20c3-44cd-a7cb-17f4ed42ced9)
173+
160174

161175

162176
### 使用本地 Ollama 大模型
@@ -210,7 +224,7 @@ export const isMockDevelopment = isDev
210224
```ts
211225
const defaultLLMTypeName: TransformStreamModelTypes = isMockDevelopment
212226
? 'standard'
213-
: 'kimi'
227+
: 'moonshot'
214228
```
215229

216230
默认情况下,会处理 `kimi` 模型,在模拟开发环境下,使用 standard 模型。具体的模型类型可以根据需求进行配置。

0 commit comments

Comments
 (0)