mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-19 09:50:15 +01:00
🧠 feat: Cohere support as Custom Endpoint (#2328)
* chore: bump cohere-ai, fix firebase vulnerabilities by going down versions * feat: cohere rates and context windows * feat(createCoherePayload): transform openai payload for cohere compatibility * feat: cohere backend support * refactor(UnknownIcon): optimize icon render and add cohere * docs: add cohere to Compatible AI Endpoints * Update ai_endpoints.md
This commit is contained in:
parent
daa5f43ac6
commit
cd7f3a51e1
18 changed files with 1007 additions and 622 deletions
|
|
@ -238,6 +238,7 @@ export enum KnownEndpoints {
|
|||
ollama = 'ollama',
|
||||
perplexity = 'perplexity',
|
||||
'together.ai' = 'together.ai',
|
||||
cohere = 'cohere',
|
||||
}
|
||||
|
||||
export enum FetchTokenConfig {
|
||||
|
|
@ -532,6 +533,32 @@ export enum Constants {
|
|||
NO_PARENT = '00000000-0000-0000-0000-000000000000',
|
||||
}
|
||||
|
||||
/**
|
||||
* Enum for Cohere related constants
|
||||
*/
|
||||
export enum CohereConstants {
|
||||
/**
|
||||
* Cohere API Endpoint, for special handling
|
||||
*/
|
||||
API_URL = 'https://api.cohere.ai/v1',
|
||||
/**
|
||||
* Role for "USER" messages
|
||||
*/
|
||||
ROLE_USER = 'USER',
|
||||
/**
|
||||
* Role for "SYSTEM" messages
|
||||
*/
|
||||
ROLE_SYSTEM = 'SYSTEM',
|
||||
/**
|
||||
* Role for "CHATBOT" messages
|
||||
*/
|
||||
ROLE_CHATBOT = 'CHATBOT',
|
||||
/**
|
||||
* Title message as required by Cohere
|
||||
*/
|
||||
TITLE_MESSAGE = 'TITLE:',
|
||||
}
|
||||
|
||||
export const defaultOrderQuery: {
|
||||
order: 'desc';
|
||||
limit: 100;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue