mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 17:00:15 +01:00
✨ feat: Enhance token usage computation with improved message handling and context management
This commit is contained in:
parent
e0610b0d14
commit
0420ed2e68
3 changed files with 27 additions and 7 deletions
|
|
@ -806,7 +806,6 @@ class BaseClient {
|
|||
user,
|
||||
);
|
||||
this.savedMessageIds.add(responseMessage.messageId);
|
||||
delete responseMessage.tokenCount;
|
||||
return responseMessage;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue