mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-25 20:58:50 +01:00
Merge 9c61d73076 into 5bfebc7c9d
This commit is contained in:
commit
c91bc818aa
18 changed files with 1111 additions and 357 deletions
|
|
@ -806,7 +806,6 @@ class BaseClient {
|
|||
user,
|
||||
);
|
||||
this.savedMessageIds.add(responseMessage.messageId);
|
||||
delete responseMessage.tokenCount;
|
||||
return responseMessage;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
const { getModelMaxTokens } = require('@librechat/api');
|
||||
const { TOKEN_DEFAULTS } = require('librechat-data-provider');
|
||||
const BaseClient = require('../BaseClient');
|
||||
|
||||
class FakeClient extends BaseClient {
|
||||
|
|
@ -41,7 +42,9 @@ class FakeClient extends BaseClient {
|
|||
}
|
||||
|
||||
this.maxContextTokens =
|
||||
this.options.maxContextTokens ?? getModelMaxTokens(this.modelOptions.model) ?? 4097;
|
||||
this.options.maxContextTokens ??
|
||||
getModelMaxTokens(this.modelOptions.model) ??
|
||||
TOKEN_DEFAULTS.LEGACY_CONTEXT_FALLBACK;
|
||||
}
|
||||
buildMessages() {}
|
||||
getTokenCount(str) {
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -240,6 +240,8 @@ class AgentClient extends BaseClient {
|
|||
Object.assign(
|
||||
{
|
||||
endpoint: this.options.endpoint,
|
||||
endpointType: this.options.endpointType,
|
||||
model: this.options.agent?.model_parameters?.model,
|
||||
agent_id: this.options.agent.id,
|
||||
modelLabel: this.options.modelLabel,
|
||||
maxContextTokens: this.options.maxContextTokens,
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue