From 7fa213cdf0e95d7f8e0d41ad1edcee29c401f8c6 Mon Sep 17 00:00:00 2001 From: ckt1031 <65409152+ckt1031@users.noreply.github.com> Date: Mon, 29 Apr 2024 22:42:20 +0800 Subject: [PATCH] Add support for Internet connector in chatbot models --- README.md | 9 +++++++++ docs/README-zh-CN.md | 23 +++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 docs/README-zh-CN.md diff --git a/README.md b/README.md index 042b57d..8598de9 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Cohere To OpenAI (Cloudflare Worker) +[简体中文](./docs/README-zh-CN.md) + This is a simple Cloudflare Worker that transform Cohere API to OpenAI API, easily deployable to Cloudflare Workers. [![Deploy to Cloudflare Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/ckt1031/cohere2openai-cf-worker) @@ -9,8 +11,15 @@ This is a simple Cloudflare Worker that transform Cohere API to OpenAI API, easi - [x] Transform Cohere API to OpenAI API - [x] Model listing endpoint (GET /models) - [x] Chat completion endpoint (POST /chat/completions) +- [x] Detect `-internet` in model to use Internet connector - [ ] Tool Calling feature +## Special Internet Model + +To enable the use of the Internet connector in any chatbot client, we support models with `-internet` in their name. While this is an unofficial feature, it helps reduce additional costs associated with using the Internet connector. + +To utilize the Internet connector, simply append `-internet` to the model name. For example, `command-r-plus` would become `command-r-plus-internet`. + ## How to Deploy 1. Clone this repository: `git clone https://github.com/ckt1031/cohere2openai-cf-worker.git --depth=1` diff --git a/docs/README-zh-CN.md b/docs/README-zh-CN.md new file mode 100644 index 0000000..78ee308 --- /dev/null +++ b/docs/README-zh-CN.md @@ -0,0 +1,23 @@ +# Cohere To OpenAI (Cloudflare Worker) + +[English](../README.md) + +这是一个简单的 Cloudflare Worker,可以将 Cohere API 转换为 OpenAI API,并且可以轻松部署到 Cloudflare Workers。 + +[![部署到 Cloudflare Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/ckt1031/cohere2openai-cf-worker) + +## 特殊的 Internet 模型 + +为了在任何聊天机器人客户端中启用 Internet 连接器的使用,我们支持在模型名称中包含 `-internet` 的模型。虽然这是一个非官方功能,但它有助于减少使用 Internet 连接器相关的额外成本。 + +要使用 Internet 连接器,只需在模型名称后面添加 `-internet` 即可。例如,`command-r-plus` 将变成 `command-r-plus-internet`。 + +## 如何部署 + +1. 克隆此仓库:`git clone https://github.com/ckt1031/cohere2openai-cf-worker.git --depth=1` +2. 运行 `npm install` 安装依赖项 +3. 运行 `npm run deploy` 部署到 Cloudflare Workers + +## 许可证 + +本项目采用 [MIT 许可证](../LICENSE)。