mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-30 23:28:52 +01:00
Release: 0.5.3 (#599)
* release: 0.5.3, add extra linting rule and minor fix for EndpointDialog * chore: revert to deprecated Message Classes as weird behavior seen in linux * chore(api): remove unused test scripts chore(package.json): remove unused langchain dependency * chore(.gitignore): add /images directory to the ignore list
This commit is contained in:
parent
69d192bac3
commit
2607f157d3
10 changed files with 19 additions and 289 deletions
|
|
@ -4,7 +4,7 @@ const { CallbackManager } = require('langchain/callbacks');
|
|||
const { initializeCustomAgent, initializeFunctionsAgent } = require('./agents/');
|
||||
const { loadTools } = require('./tools/util');
|
||||
const { SelfReflectionTool } = require('./tools/');
|
||||
const { HumanMessage, AIMessage } = require('langchain/schema');
|
||||
const { HumanChatMessage, AIChatMessage } = require('langchain/schema');
|
||||
const {
|
||||
instructions,
|
||||
imageInstructions,
|
||||
|
|
@ -237,8 +237,8 @@ Only respond with your conversational reply to the following User Message:
|
|||
// Map Messages to Langchain format
|
||||
const pastMessages = this.currentMessages.slice(0, -1).map(
|
||||
msg => msg?.isCreatedByUser || msg?.role?.toLowerCase() === 'user'
|
||||
? new HumanMessage(msg.text)
|
||||
: new AIMessage(msg.text));
|
||||
? new HumanChatMessage(msg.text)
|
||||
: new AIChatMessage(msg.text));
|
||||
|
||||
// initialize agent
|
||||
const initializer = this.functionsAgent ? initializeFunctionsAgent : initializeCustomAgent;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue