diff --git a/docs/Serverless API-integration.md b/docs/Serverless API-integration.md index 522fcc85d68a11d449b157a3157fd62a43a71749..a8eefde96c2786e972eb1e90f1931821246add32 100644 --- a/docs/Serverless API-integration.md +++ b/docs/Serverless API-integration.md @@ -2,7 +2,7 @@ -[Serverless API](https://ai.gitee.com/serverless-api) 提供了五大类、数十个模型 API,只需调用 API 就可以将其强大的能力集成到您的应用中。本文为大家推荐了一些可集成 Serverless API 的应用,以及详细的集成配置指南。 +[Serverless API](https://ai.gitee.com/serverless-api) 提供了六大类、数十个模型 API,只需调用 API 就可以将其强大的功能集成到您的应用中。本文为大家推荐了一些可集成 Serverless API 的应用,以及详细的集成配置指南。 @@ -11,23 +11,23 @@ | 分类 | 应用名称 | 简介 | | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | 客户端类 | [Chatbox](https://chatboxai.app/zh) | 一个支持多种流行LLM模型的桌面客户端,可在 Windows、Mac 和 Linux 上使用 | -| | [OpenCat](https://opencat.app/zh-Hans/) | OpenCat 是一个 AI 对话聊天客户端,支持 ios 和 MacOS | -| | [Dify](https://dify.ai/) | 一款开源的大语言模型(LLM) 应用开发平台。它融合了后端即服务和 [LLMOps](https://docs.dify.ai/v/zh-hans/learn-more/extended-reading/what-is-llmops) 的理念,使开发者可以快速搭建生产级的生成式 AI 应用 | +| | [OpenCat](https://opencat.app/zh-Hans/) | OpenCat 是一个 AI 对话聊天客户端,支持 iOS 和 macOS | +| | [Dify](https://dify.ai/) | 一款开源的大语言模型(LLM) 应用开发平台。它融合了后端即服务和 [LLMOps](https://docs.dify.ai/v/zh-hans/learn-more/extended-reading/what-is-llmops) 的理念,使开发者可以快速搭建生产级的生成式 AI 应用 | | | [Nextchat](https://nextchat.dev/) | 只需轻点几下,就能在自己的服务器上搭建聊天服务 | | | [Pal Chat](https://apps.apple.com/us/app/pal-chat-ai-chat-client/id6447545085) | 一款可以在 iPhone 或 iPad 上使用的 AI 助手 | -| | [Enconvo](https://www.enconvo.com/) | Enconvo是 AI 时代的启动器,是所有AI功能的入口,也是一位体贴的智能助理.】 | +| | [Enconvo](https://www.enconvo.com/) | Enconvo 是 AI 时代的启动器,是所有AI功能的入口,也是一位体贴的智能助理.】 | | | [Cherry Studio](https://www.cherrystudios.com/) | 一款为创造者而生的桌面版 AI 助手 | | 浏览器插件 | [沉浸式翻译](https://immersivetranslate.com/zh-Hans/) | 一款双语对照网页翻译插件,简洁,高效 | | | [ChatGPT Box](https://github.com/josStorer/chatGPTBox) | 将 LLM 作为私人助手,整合到你的浏览器中 | | | [划词翻译](https://hcfy.app/) | 整合了多家翻译 API 以及 LLM API 的浏览器翻译插件 | -| | [欧路翻译](https://chromewebstore.google.com/detail/%E6%AC%A7%E8%B7%AF%E7%BF%BB%E8%AF%91-%E7%BD%91%E9%A1%B5%E5%88%92%E8%AF%8D%E7%BF%BB%E8%AF%91%E5%B7%A5%E5%85%B7/djbfechcnkppbknmlhfcaoifgnicolin) | 提供鼠标划词搜索、逐段对照翻译、PDF文献翻译功能。可以使用支持 DeepSeek AI, Bing、GPT、Google 等多种翻译引擎 | +| | [欧路翻译](https://chromewebstore.google.com/detail/%E6%AC%A7%E8%B7%AF%E7%BF%BB%E8%AF%91-%E7%BD%91%E9%A1%B5%E5%88%92%E8%AF%8D%E7%BF%BB%E8%AF%91%E5%B7%A5%E5%85%B7/djbfechcnkppbknmlhfcaoifgnicolin) | 提供鼠标划词搜索、逐段对照翻译、PDF 文献翻译功能。可以使用支持 DeepSeek AI, Bing、GPT、Google 等多种翻译引擎 | | IM 助手 | [茴香豆](https://github.com/InternLM/HuixiangDou/blob/main/README_zh.md) | 一个集成到个人微信群/飞书群的领域知识助手,专注解答问题不闲聊 | | | [QChatGPT](https://github.com/RockChinQ/QChatGPT) | 高稳定性、支持插件、实时联网的 LLM QQ / QQ频道 / One Bot 机器人 | | VScode 插件 | [Continue](https://github.com/continuedev/continue) | 开源 IDE 插件,使用 LLM 做你的编程助手 | -以上应用均支持集成 Serverless API,配置操作也很简单,在选择 API 配置的时候,因为 Serverless API 与 OpenAI API 格式兼容,模型提供方只需要选择 OpenAl APl Compatible 。这个时候通常需要填写 API 调用地址、API key 等信息,下面是操作步骤: +以上应用均支持集成 Serverless API,配置操作也很简单,在选择 API 配置的时候,因为 Serverless API 与 OpenAI API 格式兼容,模型提供方只需要选择 OpenAl APl Compatible。这个时候通常需要填写 API 调用地址、API key 等信息,下面是操作步骤: @@ -37,7 +37,7 @@ 请在 Serverless API 页选择你想要使用的模型,点击调用,获取它的 API 调用地址,如下所示: -_https://ai.gitee.com/api/inference/serverless/__resource__(示例)/chat/completions_ +_https://ai.gitee.com/api/serverless/<Model>/chat/completions_ @@ -48,7 +48,7 @@ _https://ai.gitee.com/api/inference/serverless/__resource__(示例)/chat/complet 2. 通过上面获取的路径,通常需要将路径拆分,填写下方信息: - API Host (Domain):_https://ai.gitee.com/_ -- API Path:_api/inference/serverless/__resource__(示例)/chat/completions_ +- API Path:_api/serverless/<Model>/chat/completions_ @@ -69,7 +69,7 @@ _https://ai.gitee.com/api/inference/serverless/__resource__(示例)/chat/complet ## 集成 OpenCat -OpenCat 是一个 AI 对话聊天客户端,支持 ios 和 MacOS,在对话框内,可以快速的使用 prompt,展开新的对话,通过对接一些主流平台的 API ,可以选择与多种模型聊天。 +OpenCat 是一个 AI 对话聊天客户端,支持 iOS 和 macOS,在对话框内,可以快速的使用 prompt,展开新的对话,通过对接一些主流平台的 API ,可以选择与多种模型聊天。 @@ -83,7 +83,7 @@ OpenCat 是一个 AI 对话聊天客户端,支持 ios 和 MacOS,在对话框 3. 输入 API Domain、API Path、API Key - API Domain:https://ai.gitee.com/ -- API Path:不同模型的路径不同,示例:_api/inference/serverless/__resource__(示例)/chat/completions_ +- API Path:不同模型的路径不同,示例:_api/serverless/<Model>/chat/completions_ - API key: 在 Gitee AI 工作台-设置复制访问令牌(API key) 4. 点击验证,提示 Validate Success 即可 @@ -114,7 +114,7 @@ OpenCat 是一个 AI 对话聊天客户端,支持 ios 和 MacOS,在对话框 2. 在设置页面输入以下关键信息: - 自定义 API 接口地址: _此处填写 Serverless API 完整的调用地址_ -- APIKEY:在 Gitee AI 工作台-设置复制访问令牌(API key) +- APIKEY:在 Gitee AI 工作台 - 设置 - 访问令牌,复制访问令牌(API key) - 每秒最大请求数:1 - 每次请求最大文本长度:1200 - 每次请求最大段落数:8 @@ -128,7 +128,7 @@ OpenCat 是一个 AI 对话聊天客户端,支持 ios 和 MacOS,在对话框 ## 集成 Dify -Dify 是一款开源的大语言模型(LLM) 应用开发平台。它融合了后端即服务(Backend as Service)和 [LLMOps](https://docs.dify.ai/v/zh-hans/learn-more/extended-reading/what-is-llmops) 的理念,使开发者可以快速搭建生产级的生成式 AI 应用。即使是非技术人员,也能参与到 AI 应用的定义和数据运营过程中。 +Dify 是一款开源的大语言模型(LLM))应用开发平台。它融合了后端即服务(Backend as Service)和 [LLMOps](https://docs.dify.ai/v/zh-hans/learn-more/extended-reading/what-is-llmops) 的理念,使开发者可以快速搭建生产级的生成式 AI 应用。即使是非技术人员,也能参与到 AI 应用的定义和数据运营过程中。 ### 配置指南 @@ -169,7 +169,7 @@ Serverless API 支持在 Dify 中调用,使用步骤如下 ### 配置指南 1. 点击设置,并滚动至自定义接口,选择 OpenAI -2. Serverless API 链接,在调用窗口获取,填写完整 URL,示例:_https://ai.gitee.com/api/inference/serverless/ZBQ2F4KXXXX/chat/completions_ +2. Serverless API 链接,在调用窗口获取,填写完整 URL,示例:_https://ai.gitee.com/api/serverless/Qwen2-7B-Instruct/chat/completions_ diff --git a/docs/Serverless API-voice url.md b/docs/Serverless API-voice url.md index 605197f819d60fdfe50d40efee50002c2d7cf381..b04c1d2331a4f9ca2e1064f045a3f13edd386dca 100644 --- a/docs/Serverless API-voice url.md +++ b/docs/Serverless API-voice url.md @@ -2,7 +2,7 @@ ## 基本介绍 -目前 Serverless API 的语音生成模型 [CosyVoice-300M](https://ai.gitee.com/serverless-api?service=720)、[ChatTTS](https://ai.gitee.com/serverless-api?service=135)、[fish-speech-1.2-sft](https://ai.gitee.com/serverless-api?service=865) 支持识别音频的声音数据生成和样本一致的声音。可用于定制化语音助手,虚拟角色声音制作等。 +目前 Serverless API 的语音生成模型 [CosyVoice-300M](https://ai.gitee.com/serverless-api?model=FunAudioLLM-CosyVoice-300M)、[ChatTTS](https://ai.gitee.com/serverless-api?model=ChatTTS)、[fish-speech-1.2-sft](https://ai.gitee.com/serverless-api?model=fish-speech-1.2-sft) 支持识别音频的声音数据,生成和样本一致的声音。可应用于定制化语音助手,虚拟角色声音制作等场景。 ![alt text](/img/serverless-api/voiceurl1.png) @@ -12,8 +12,8 @@ 只需在语音生成模型的参数设置中配置 voice_url ,以 url 的形式传递 .pt 格式的声纹文件给模型,即可生成和文件中声音特征一致的音频。主要包括以下几个关键步骤: 1. 制作.pt 格式的声纹文件,可以通过音频文件转制而成,不同模型所要求的声纹文件不同: -- CosyVoice-300M 和 fish-speech-1.2-sft 模型可使用 Gitee AI 提供的声纹文件接口制作。 -- ChatTTS 可使用 ChatTTS 声音克隆工具 http://region-9.autodl.pro:41137/ 制作。 + - CosyVoice-300M 和 fish-speech-1.2-sft 模型可使用 Gitee AI 提供的声纹文件接口制作。 + - ChatTTS 模型可使用 ChatTTS 声音克隆工具 http://region-9.autodl.pro:41137/ 制作。 2. 将制作好的 .pt 格式的声纹文件,存放在公开可下载的地址,比如放在您的 Gitee 代码仓库中。 @@ -35,10 +35,6 @@ 将音频文件上传至 Gitee AI 提供的声音特征提取接口,下面是接口的详细说明: -**接口名** - -voiceFeatureExtraction - **功能描述** 该接口用于处理音频文件,提取关键音频特征 @@ -53,7 +49,7 @@ voiceFeatureExtraction HTTPS 调用 ``` -POST https://ai.gitee.com/api/inference/serverless/PH5EDMEALV1D/voice-feature-extraction +POST https://ai.gitee.com/api/serverless/FunAudioLLM-CosyVoice-300M/voice-feature-extraction ``` @@ -62,7 +58,7 @@ POST https://ai.gitee.com/api/inference/serverless/PH5EDMEALV1D/voice-feature-ex | 参数位置 | 名称 | 类型 | 必填 | 说明 | |----------|---------------|--------|------|----------------------------------------------------------------------------------------| | Header | Authorization | string | 是 | 访问令牌,可在工作台->设置->访问令牌,进行生成获取。值格式:"Bearer access_token",示例值:"Bearer t-g1044qeGEDXTB6NDJOGV4JQCYDGHRBARFTGT1234" | -| form-data| file | file | 是 | 语音内容。注意:Content-Type为application/octet-stream,示例值: 二进制文件 | +| form-data| file | file | 是 | 语音内容。注意:Content-Type 为 application/octet-stream,示例值为二进制文件。 | | form-data| prompt_text | string | 是 | 提词内容。注意:与录音内容一致的文字描述。 | @@ -75,7 +71,7 @@ HTTP状态码为 200 时,表示成功。返回文件二进制流。 ``` cURL ---location --request POST 'https://ai.gitee.com/api/inference/serverless/PH5EDMEALV1D/voice-feature-extraction' +--location --request POST 'https://ai.gitee.com/api/serverless/FunAudioLLM-CosyVoice-300M/voice-feature-extraction' --header 'Authorization: Bearer 输入你的 Gitee AI 访问令牌 ' --form 'file=@"上传.mp3 或.m4a格式的文件"' --form 'prompt_text="和录音内容一致的文字描述“’ @@ -84,17 +80,15 @@ cURL **使用 APIfox 接口工具请求示例** - 1) 新建接口井输入接口地址。 - - 2) 添加 Authorization 参数,参数值可以在 Gitee Al 工作台-访问令牌获取。 + 1)新建接口井输入接口地址。 - 3) 选择 Body - form-data 。 + 2)添加 Authorization 参数,参数值可以在 Gitee Al 工作台-访问令牌获取。 - 4) 添加 file 参数,并上传音频文件。 + 3)选择 Body -> form-data 。 - 5) 添加 prompt_text 參数,參数值是和录音内容一致的文字描述,添加完成后点击发送。 + 4)添加 file 参数,并上传音频文件;添加 prompt_text 参数,参数值是和录音内容一致的文字描述,添加完成后点击发送。 - 6) 请求成功后,下载接口返回的文件,并修改文件名为 xxxx.pt。 + 5)请求成功后,下载接口返回的文件,并修改文件名为 xxxx.pt。 ![alt text](/img/serverless-api/voiceurl3.png) @@ -108,14 +102,14 @@ cURL 1) 访问 Chattts 的声音克隆工具 http://region-9.autodl.pro:41137/ - ![alt text](/img/serverless-api/voiceurl5-1.png) + ![alt text](/img/serverless-api/voiceurl5-2.png) 2)上传/录制音频,点击 submit 。等待生成 3) 生成成功后,请下载 ChatTTS pypi 版本的 pt 文件 -![alt text](/img/serverless-api/voiceurl5-2.png) +![alt text](/img/serverless-api/voiceurl5-1.png) ### 步骤2:上传声纹文件并获取下载地址 @@ -130,7 +124,7 @@ cURL ### 步骤3:在模型参数中粘贴地址 -根据您生成的 pt 文件类型,选择 [CosyVoice-300M](https://ai.gitee.com/serverless-api?service=720)、[ChatTTS](https://ai.gitee.com/serverless-api?service=135)、[fish-speech-1.2-sft](https://ai.gitee.com/serverless-api?service=865) ,粘贴声纹文件下载地址到 voice_url 参数,输入文字并运行。即可生成和声纹音色一致的声音。 +根据您生成的 pt 文件类型,选择 [CosyVoice-300M](https://ai.gitee.com/serverless-api?model=FunAudioLLM-CosyVoice-300M&operation=11)、[ChatTTS](https://ai.gitee.com/serverless-api?model=ChatTTS)、[fish-speech-1.2-sft](https://ai.gitee.com/serverless-api?model=fish-speech-1.2-sft) ,粘贴声纹文件下载地址到 voice_url 参数,输入文字并运行。即可生成和声纹音色一致的声音。 ![alt text](/img/serverless-api/voiceurl9.png) diff --git a/static/img/serverless-api/integrated/integrate1.png b/static/img/serverless-api/integrated/integrate1.png index f8a6744ca4b2dd95e302ae4faa1fb450a4740cdb..e27e70d384e9cfb06f9cbe5f20b582314f3881d0 100644 Binary files a/static/img/serverless-api/integrated/integrate1.png and b/static/img/serverless-api/integrated/integrate1.png differ diff --git a/static/img/serverless-api/voiceurl1.png b/static/img/serverless-api/voiceurl1.png index ccc19037f80d4e6f442b22c3c37fef093f25244a..cbdea8237b6cf91d3672a31707b2635eceae0afe 100644 Binary files a/static/img/serverless-api/voiceurl1.png and b/static/img/serverless-api/voiceurl1.png differ diff --git a/static/img/serverless-api/voiceurl2.png b/static/img/serverless-api/voiceurl2.png index df636b7359242d3f5eae291a8233da166b41b241..742b30bf18ac2f66bf8ab26112c475cd3f9b6bd5 100644 Binary files a/static/img/serverless-api/voiceurl2.png and b/static/img/serverless-api/voiceurl2.png differ diff --git a/static/img/serverless-api/voiceurl3.png b/static/img/serverless-api/voiceurl3.png index b07544e62de83bee81be9fb65a42de68e375e1a4..cc82e9e2478c7208c4b065288a526a65f13479d7 100644 Binary files a/static/img/serverless-api/voiceurl3.png and b/static/img/serverless-api/voiceurl3.png differ diff --git a/static/img/serverless-api/voiceurl4.png b/static/img/serverless-api/voiceurl4.png index a81e9f4e104003b4140a53f7cc6769df8f72591d..89b81fbbc38d3abb8c1fdf022fa343bfe9efff5c 100644 Binary files a/static/img/serverless-api/voiceurl4.png and b/static/img/serverless-api/voiceurl4.png differ diff --git a/static/img/serverless-api/voiceurl5.png b/static/img/serverless-api/voiceurl5.png index 265956b8c747ebf674e4e7f31e09386199fb85c7..83b772a53908ccb3026aef5b899ceff94f5e70c5 100644 Binary files a/static/img/serverless-api/voiceurl5.png and b/static/img/serverless-api/voiceurl5.png differ