mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
🪙 feat: Use OpenRouter Model Data for Token Cost and Context (#1703)
* feat: use openrouter data for model token cost/context * chore: add ttl for tokenConfig and refetch models if cache expired
This commit is contained in:
parent
f1d974c513
commit
30e143e96d
14 changed files with 146 additions and 16 deletions
|
|
@ -385,3 +385,18 @@
|
|||
* @property {string} [azureOpenAIApiVersion] - The Azure OpenAI API version.
|
||||
* @memberof typedefs
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {Object} TokenConfig
|
||||
* A configuration object mapping model keys to their respective prompt, completion rates, and context limit.
|
||||
* @property {number} prompt - The prompt rate
|
||||
* @property {number} completion - The completion rate
|
||||
* @property {number} context - The maximum context length supported by the model.
|
||||
* @memberof typedefs
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {Record<string, TokenConfig>} EndpointTokenConfig
|
||||
* An endpoint's config object mapping model keys to their respective prompt, completion rates, and context limit.
|
||||
* @memberof typedefs
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue