Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/beanqi/cohere2openai
A cloudflare worker to covert cohere api to openai API
https://github.com/beanqi/cohere2openai
Last synced: 11 days ago
JSON representation
A cloudflare worker to covert cohere api to openai API
- Host: GitHub
- URL: https://github.com/beanqi/cohere2openai
- Owner: beanqi
- Created: 2024-04-18T08:10:35.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-05-07T00:52:28.000Z (6 months ago)
- Last Synced: 2024-08-01T08:08:30.445Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 12.7 KB
- Stars: 35
- Watchers: 1
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-cloudflare - cohere2openai
README
# cohere2openai
A cloudflare worker to covert cohere api to openai api
[中文文档](./README_ZH.md)# How to use
1. Create a new worker in cloudflare
2. Copy the code in `worker.js` to the worker
3. Setting environment variables in the worker
- `API_AUTH_TOKEN`: your cohere api key
4. Deploy the worker
5. Use the worker url as the api endpoint
6. Band custom domain to the worker if needed (Optional)# Something you must know
I force the worker to use `command-r-plus` model, the code is [here](https://github.com/beanqi/cohere2openai/blob/8880315a0ead2f62c8243c249e06374de7ce77d3/worker.js#L52), you can annotate it if you want to use other models.