Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ckt1031/cohere2openai-cf-worker
This is a simple Cloudflare Worker that transform Cohere API to OpenAI API, easily deployable to Cloudflare Workers.
https://github.com/ckt1031/cohere2openai-cf-worker
Last synced: 13 days ago
JSON representation
This is a simple Cloudflare Worker that transform Cohere API to OpenAI API, easily deployable to Cloudflare Workers.
- Host: GitHub
- URL: https://github.com/ckt1031/cohere2openai-cf-worker
- Owner: ckt1031
- License: mit
- Created: 2024-04-21T06:03:17.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-09-03T06:06:14.000Z (2 months ago)
- Last Synced: 2024-10-13T02:44:11.728Z (27 days ago)
- Language: TypeScript
- Homepage:
- Size: 9.77 KB
- Stars: 40
- Watchers: 1
- Forks: 42
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-cloudflare - cohere2openai-cf-worker
README
# 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)
## Features
- [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`
2. Run `npm install` to install dependencies
3. Run `npm run deploy` to deploy to Cloudflare Workers## License
This project is licensed under the [MIT License](LICENSE).