mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-16 16:30:15 +01:00
refactor: Consolidate imports from librechat-data-provider in tokens files
This commit is contained in:
parent
2c86a5dcc7
commit
0452594b00
3 changed files with 3 additions and 26 deletions
|
|
@ -1,5 +1,4 @@
|
|||
const { maxTokensMap } = require('@librechat/api');
|
||||
const { EModelEndpoint } = require('librechat-data-provider');
|
||||
const { EModelEndpoint, maxTokensMap } = require('librechat-data-provider');
|
||||
const {
|
||||
defaultRate,
|
||||
tokenValues,
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
const { EModelEndpoint } = require('librechat-data-provider');
|
||||
const { EModelEndpoint, maxTokensMap, maxOutputTokensMap } = require('librechat-data-provider');
|
||||
const {
|
||||
maxTokensMap,
|
||||
matchModelName,
|
||||
processModelData,
|
||||
getModelMaxTokens,
|
||||
maxOutputTokensMap,
|
||||
findMatchingPattern,
|
||||
} = require('@librechat/api');
|
||||
|
||||
|
|
|
|||
|
|
@ -1,27 +1,7 @@
|
|||
import z from 'zod';
|
||||
import {
|
||||
EModelEndpoint,
|
||||
maxTokensMap,
|
||||
maxOutputTokensMap,
|
||||
TOKEN_DEFAULTS,
|
||||
findMatchingPattern as findMatchingPatternSimple,
|
||||
getModelMaxTokens as getModelMaxTokensSimple,
|
||||
getModelMaxOutputTokens as getModelMaxOutputTokensSimple,
|
||||
matchModelName as matchModelNameSimple,
|
||||
} from 'librechat-data-provider';
|
||||
import { EModelEndpoint, maxTokensMap, maxOutputTokensMap } from 'librechat-data-provider';
|
||||
import type { EndpointTokenConfig, TokenConfig } from '~/types';
|
||||
|
||||
// Re-export from data-provider for backwards compatibility
|
||||
export { maxTokensMap, maxOutputTokensMap, TOKEN_DEFAULTS };
|
||||
|
||||
// Re-export simple versions (for use without EndpointTokenConfig)
|
||||
export {
|
||||
findMatchingPatternSimple,
|
||||
getModelMaxTokensSimple,
|
||||
getModelMaxOutputTokensSimple,
|
||||
matchModelNameSimple,
|
||||
};
|
||||
|
||||
/**
|
||||
* Finds the first matching pattern in the tokens map.
|
||||
* @param {string} modelName
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue