Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
/ cohere-to-openai Public archive

This is a simple Cloudflare Worker that transform Cohere API to OpenAI API, easily deployable to Cloudflare Workers.

License

Notifications You must be signed in to change notification settings

ckt1031/cohere-to-openai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cohere To OpenAI (Cloudflare Worker)

Status: Deprecated, no longer updating until further notice.

Thanks for your support ☺️, Cohere has released it's own OpenAI compatibility API, you can directly migrate to the new compatibility API (docs).


简体中文

This is a simple Cloudflare Worker that transform Cohere API to OpenAI API, easily deployable to Cloudflare Workers.

Deploy to Cloudflare Workers

Features

  • Transform Cohere API to OpenAI API
  • Model listing endpoint (GET /models)
  • Chat completion endpoint (POST /chat/completions)
  • 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/cohere-to-openai.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.

About

This is a simple Cloudflare Worker that transform Cohere API to OpenAI API, easily deployable to Cloudflare Workers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published