LostRuins / lite.koboldai.net

A zero dependency web UI for KoboldAI Horde
GNU Affero General Public License v3.0
69 stars 34 forks source link

Adding Cohere API to the list of API providers #68

Closed lucasberti closed 5 months ago

lucasberti commented 5 months ago

Cohere has recently launched a new, very good 104B LLM called Command R+ with 128k context length which is available via their API.

It's possible to use Cohere's models via OpenRouter which is already supported, but you need to buy credits to use them.

At the time of writing this PR, it's possible to use Cohere's API for free indefinitely if you use a Trial API key for non-commercial purposes and stay within its rate-limit.

This PR adds Cohere API as a new option in the API providers dropdown menu, with the possibility to use 3 of their models (Command, Command R and Command R+). It's also possible to define a preamble, which is basically a SYSTEM prompt that is sent every request natively and can be used for jailbreaks.

API reference: https://docs.cohere.com/reference/chat

LostRuins commented 5 months ago

Thanks for this PR. I will review it shortly