diff --git a/docs/products/apis/3d/index.md b/docs/products/apis/3d/index.md index 95861be299a6a28fbeb8fdd79bb58c45d825c93e..a899a7b11012c6d3bddb884182bf06a988fa8643 100644 --- a/docs/products/apis/3d/index.md +++ b/docs/products/apis/3d/index.md @@ -139,6 +139,8 @@ if __name__ == "__main__": 模型生成的 3D 文件是 `.glb` 格式的,您可以使用 3D 查看工具(如 [glTF Viewer](https://gltf-viewer.donmccurdy.com/))来查看生成的 3D 模型。 +更多示例代码您可参考 [模力方舟示例代码仓库](https://gitee.com/moark/examples/tree/master/3D) 。 + ## 使用场景 #### 🎮 游戏开发 diff --git a/docs/products/apis/documents/ocr.md b/docs/products/apis/documents/ocr.md index 5254e2b1cbe57e652e883b3781bfd795773a6063..80c1ce834e6ac2ae85cc707187e2eed536e98a76 100644 --- a/docs/products/apis/documents/ocr.md +++ b/docs/products/apis/documents/ocr.md @@ -83,3 +83,5 @@ GOT-OCR2_0 提供功能强大的 OCR 解决方案,能够高精度、快速、 [GOT-OCR2_0]({{SITE_URL}}/serverless-api?model=GOT-OCR2_0)在线体验效果如下: ![image-20250114152442007](../../ocr.assets/image-20250114152442007.png) + +更多示例代码您可参考 [模力方舟示例代码仓库](https://gitee.com/moark/examples/tree/master/ocr) 。 diff --git a/docs/products/apis/documents/pdf.md b/docs/products/apis/documents/pdf.md index a99df1c9cb199f5d51f89467b1050195a47562af..bfd09f33b1e7d6cb005f94eb3959ccd565e4f4b7 100644 --- a/docs/products/apis/documents/pdf.md +++ b/docs/products/apis/documents/pdf.md @@ -116,3 +116,5 @@ curl {{SITE_URL}}/v1/task/AAC2KETEYJVKER04U6RNMHJTOGLVEG1B/ ``` 当响应中的 `status` 变为 `success`,即解析成功。`output` 为解析结果,`segments` 为解析结果分段,分段基于分页或语义逻辑进行划分。 + +更多示例代码您可参考 [模力方舟示例代码仓库](https://gitee.com/moark/examples/tree/master/documents) 。 diff --git a/docs/products/apis/embeddings/index.md b/docs/products/apis/embeddings/index.md index 577b270d9da1894674f9a6ab849590b6bbc27eda..a53ffae25bbc00c52d0856fa34f1f939a24a112a 100644 --- a/docs/products/apis/embeddings/index.md +++ b/docs/products/apis/embeddings/index.md @@ -69,6 +69,8 @@ response = client.embeddings.create( ) ``` +更多示例代码您可参考 [模力方舟示例代码仓库](https://gitee.com/moark/examples/tree/master/embeddings-and-reranker) 。 + ## 重排模型 重排模型通过对搜索结果进行再排序,提高信息检索的准确性和相关性。这些模型通常基于用户的历史行为和偏好,结合向量化技术,来优化搜索结果的展示顺序。 diff --git a/docs/products/apis/images-vision/fuzzy.md b/docs/products/apis/images-vision/fuzzy.md index fdd48dbe74bad3e524ab2b90e306f3e20497fd33..2acd1efcf3aa9eb0eaa6db10cd86b3f0f8c0c810 100644 --- a/docs/products/apis/images-vision/fuzzy.md +++ b/docs/products/apis/images-vision/fuzzy.md @@ -127,6 +127,8 @@ img.save("img_style.png") img.show() ``` +更多示例代码您可参考 [模力方舟示例代码仓库](https://gitee.com/moark/examples/tree/master/image-generation-processing) 。 + ## 使用场景 #### 🎨 艺术创作 diff --git a/docs/products/apis/images-vision/inpainting.md b/docs/products/apis/images-vision/inpainting.md index 157637a0b340b759cbdd55e7dbfa351a653dcecb..9349bc21df39a55791a7fa076597848ee8d13122 100644 --- a/docs/products/apis/images-vision/inpainting.md +++ b/docs/products/apis/images-vision/inpainting.md @@ -30,6 +30,10 @@ sidebar_position: 2 | ![Image](https://foruda.gitee.com/images/1729492513893163648/03bd7fd3_14415575.png) | 穿着黑色的T恤衫,上面中文绿色大写着“hello” | ![Image](https://gitee-ai-testing.su.bcebos.com/v1/uploads/img/news_cover_9-user-guide3.png) | | ![Image](https://foruda.gitee.com/images/1729492538626036018/5fe7bace_14415575.png) | 一只微笑的兔子奔跑 | ![Image](https://gitee-ai-testing.su.bcebos.com/v1/uploads/img/news_cover_10-user-guide5.png) | +您可前往 [模力方舟示例代码仓库](https://gitee.com/moark/examples/blob/master/image-generation-processing) 参考示例代码。 + +![Image](/img/serverless-api/example01.png) + ## 使用场景 #### 🎨 风格转换 diff --git a/docs/products/apis/images-vision/partial-repaint.md b/docs/products/apis/images-vision/partial-repaint.md index 3738160c63272d7c6d0d522001dbf229f0f4676b..85fda350e3ae6dbf9fcad6801bf290153cd0fd6a 100644 --- a/docs/products/apis/images-vision/partial-repaint.md +++ b/docs/products/apis/images-vision/partial-repaint.md @@ -29,6 +29,10 @@ sidebar_position: 4 | ![Image](https://foruda.gitee.com/images/1729492589364653082/4af32ae7_14415575.png) | ![Image](https://foruda.gitee.com/images/1729492604658575880/02103d7d_14415575.png) | 穿着美少女战士的衣服,一件类似于水手服风格的衣服,包括一个白色紧身上衣,前胸搭配一个大大的红色蝴蝶结。衣服的领子部分呈蓝色,并且有白色条纹。她还穿着一条蓝色百褶裙,超高清,辛烷渲染,高级质感,32k,高分辨率,最好的质量,超级细节,景深 | ![Image](https://foruda.gitee.com/images/1729510320514796520/affd853e_14415575.jpeg) | | ![Image](https://foruda.gitee.com/images/1729492724529895938/8039019e_14415575.png) | ![Image](https://foruda.gitee.com/images/1729492743609546551/870abb50_14415575.png) | 这是一幅令人垂涎欲滴的火锅画面,各种美味的食材在翻滚的锅中煮着,散发出的热气和香气令人陶醉。火红的辣椒和鲜艳的辣椒油熠熠生辉,具有诱人的招人入胜之色彩。锅内肉质细腻的薄切牛肉、爽口的豆腐皮、鲍汁浓郁的金针菇、爽脆的蔬菜,融合在一起,营造出五彩斑斓的视觉呈现 | ![Image](https://foruda.gitee.com/images/1729510496525173718/68e75386_14415575.jpeg) | +您可前往 [模力方舟示例代码仓库](https://gitee.com/moark/examples/blob/master/image-generation-processing) 查看示例代码。 + +![Image](/img/serverless-api/example02.png) + ## 使用场景 #### 🎨 风格转换 diff --git a/docs/products/apis/images-vision/text2image.md b/docs/products/apis/images-vision/text2image.md index 528f25aab818872cade9b1df18aba5307858eb51..ce7e3ff315363bbbf8d2dda3a11ed508b441ad90 100644 --- a/docs/products/apis/images-vision/text2image.md +++ b/docs/products/apis/images-vision/text2image.md @@ -100,3 +100,5 @@ else: ``` 其他编程语言可以参考 [接口文档]({{SITE_URL}}/docs/openapi/v1#tag/图像生成/post/async/images/generations) 中的示例代码。 + +您也可前往 [模力方舟示例代码仓库](https://gitee.com/moark/examples/blob/master/image-generation-processing/text_to_image.py) 查看更多示例代码。 diff --git a/docs/products/apis/images-vision/visions.md b/docs/products/apis/images-vision/visions.md index f110f8eae55b394e90fd6e02ff284e2038afbbb3..7876b94d8bac62aac8ea2e13c8b38823b2998e26 100644 --- a/docs/products/apis/images-vision/visions.md +++ b/docs/products/apis/images-vision/visions.md @@ -78,6 +78,7 @@ for chunk in response: fullResponse += delta.content print(delta.content, end="", flush=True) ``` +更多示例代码您可参考 [模力方舟示例代码仓库](https://gitee.com/moark/examples/tree/master/vision-models) 。 ## 使用场景 diff --git a/docs/products/apis/moderations/index.md b/docs/products/apis/moderations/index.md index 9a48dba6b5e4b4890a0391432eb6d7f1a9e872a5..1bf30d3c1e13d8e3844de198c7ea09a5d84e7fb7 100644 --- a/docs/products/apis/moderations/index.md +++ b/docs/products/apis/moderations/index.md @@ -63,3 +63,5 @@ response = client.moderations.create( model="nsfw-classifier", ) ``` + +更多示例代码您可参考 [模力方舟示例代码仓库](https://gitee.com/moark/examples/tree/master/risk-control) 。 \ No newline at end of file diff --git a/docs/products/apis/speeches/text-to-speech.md b/docs/products/apis/speeches/text-to-speech.md index 314551e5e39b20ba09b105f101fdea79d27f5048..5d3020bfaa311af137966e11742c4343548f75c6 100644 --- a/docs/products/apis/speeches/text-to-speech.md +++ b/docs/products/apis/speeches/text-to-speech.md @@ -52,3 +52,4 @@ response = client.audio.speech.create( voice="alloy", ) ``` +更多示例代码您可参考 [模力方舟示例代码仓库](https://gitee.com/moark/examples/tree/master/speech-generation-recognition) 。 \ No newline at end of file diff --git a/docs/products/apis/texts/function-calling.md b/docs/products/apis/texts/function-calling.md index 23ad8caa703504b7f730ab98fe2181153856a9c7..368e20c2ba8dd8305903e5c5cca4dc7df7b47fc2 100644 --- a/docs/products/apis/texts/function-calling.md +++ b/docs/products/apis/texts/function-calling.md @@ -229,3 +229,5 @@ print(ai_res_msg) ``` 您将会看到模型实时调用的过程和最新新闻结果,然后 AI 将自行编写代码,将新闻标题保存到 `news.txt` 文件中! + +更多示例代码您可参考 [模力方舟示例代码仓库](https://gitee.com/moark/examples/blob/master/text-generation/function_calling_notes.md) 。 diff --git a/docs/products/apis/texts/text-comlpetion.md b/docs/products/apis/texts/text-comlpetion.md index 6ebeae4bbf654b25be9e9df3ccd4431b4e17ad64..61f162e0a495e6d8370ccc4f947ae581dbc3aeff 100644 --- a/docs/products/apis/texts/text-comlpetion.md +++ b/docs/products/apis/texts/text-comlpetion.md @@ -226,4 +226,6 @@ client.completions.create( ``` **可能的输出:** > "您好,上个月的财务报表我已经准备好,稍后会发送到您的邮箱。如果您有任何疑问,随时可以和我联系。" -通过以上提示工程技巧,可以有效提升文本补全的质量和准确性,使补全内容更好地满足实际需求。 \ No newline at end of file +通过以上提示工程技巧,可以有效提升文本补全的质量和准确性,使补全内容更好地满足实际需求。 + +更多示例代码您可参考 [模力方舟示例代码仓库](https://gitee.com/moark/examples/tree/master/text-completion) 。 \ No newline at end of file diff --git a/docs/products/apis/texts/text-generation.md b/docs/products/apis/texts/text-generation.md index 8a86651883e03260411a51725eab7e9cc82dbb3b..a1df7d076f37e25ef96c5ddf2caeec5ebfa6062f 100644 --- a/docs/products/apis/texts/text-generation.md +++ b/docs/products/apis/texts/text-generation.md @@ -189,6 +189,7 @@ for chunk in stream: print(chunk.choices[0].delta.content, end="") ``` +更多示例代码您可参考 [模力方舟示例代码仓库](https://gitee.com/moark/examples/blob/master/text-generation/stream.py) 。 ### 核心参数说明 - **tool_choice**: 支持 `auto` 由模型自动选择工具,也支持强制选择工具,写法如下: diff --git a/docs/products/apis/videos/index.md b/docs/products/apis/videos/index.md index d0c0c6e0d891ee3b4ddeb7ab594bff8c0e906508..e87193071501c545cdc37180f6f6b8eed0f735f4 100644 --- a/docs/products/apis/videos/index.md +++ b/docs/products/apis/videos/index.md @@ -93,3 +93,5 @@ if __name__ == "__main__": # Do something with the task result here print("Task completed successfully!") ``` + +更多示例代码您可参考 [模力方舟示例代码仓库](https://gitee.com/moark/examples/tree/master/videos) 。 diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 7974dcfab3ccadae8cb6ac1b4b065e4d02581770..c05ae8353c65ac49a4573280c8d1904ba25e2017 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -10,8 +10,8 @@ const SITE_URL = process.env.DOCS_SITE_URL; envCheck(); const config: Config = { - title: '模力方舟(Gitee AI)', - tagline: '开发 AI 应用从此简单', + title: 'MoArk', + tagline: 'Building AI Applications Made Simple', favicon: `${CDN_PREFIX}/img/favicon.ico`, // Set the production url of your site here @@ -32,8 +32,20 @@ const config: Config = { // useful metadata like html lang. For example, if your site is Chinese, you // may want to replace "en" with "zh-Hans". i18n: { - defaultLocale: 'zh-Hans', - locales: ['zh-Hans'], + defaultLocale: 'en', // 默认语言设为英文 + locales: ['en', 'zh-Hans'], // 支持英文和简体中文 + localeConfigs: { + en: { + label: 'English', // 语言选择器中显示的标签 + direction: 'ltr', // 文本方向(左到右) + htmlLang: 'en-US', // HTML 的 lang 属性 + }, + 'zh-Hans': { + label: '简体中文', + direction: 'ltr', + htmlLang: 'zh-CN', + }, + }, }, presets: [ @@ -46,12 +58,14 @@ const config: Config = { // Please change this to your repo. // Remove this to remove the "edit this page" links. editUrl: 'https://gitee.com/moark/docs/edit/main/', + editLocalizedFiles: true, }, blog: { showReadingTime: true, // Please change this to your repo. // Remove this to remove the "edit this page" links. editUrl: 'https://gitee.com/moark/docs/edit/main/', + editLocalizedFiles: true, }, theme: { customCss: './src/css/custom.css', @@ -191,6 +205,10 @@ const config: Config = { className: 'gai-navbar-item', activeBaseRegex: '^/docs.*', }, + { + type: 'localeDropdown', + position: 'right', + }, ], }, footer: { diff --git a/src/pages/getting-started/intro.tsx b/src/pages/getting-started/intro.tsx index 268a5307a5393b0f62f5821ba201035334710c7f..7888c2ddac25e776b7941dd5a3414d3ede516860 100644 --- a/src/pages/getting-started/intro.tsx +++ b/src/pages/getting-started/intro.tsx @@ -1,5 +1,6 @@ import { Redirect } from '@docusaurus/router'; + //为了解决文档链接问题,重定向到 /docs?old // 这个文件是为了兼容旧版本的文档链接,避免用户访问时出现404错误 // 旧版本的文档链接是 /docs/getting-started/intro diff --git a/static/img/serverless-api/example01.png b/static/img/serverless-api/example01.png new file mode 100644 index 0000000000000000000000000000000000000000..ec855fc9bbadc20347076eaf1395a920f9cf029d Binary files /dev/null and b/static/img/serverless-api/example01.png differ diff --git a/static/img/serverless-api/example02.png b/static/img/serverless-api/example02.png new file mode 100644 index 0000000000000000000000000000000000000000..2ca2461c386c78921ef8d97f00d5e603dac70324 Binary files /dev/null and b/static/img/serverless-api/example02.png differ