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:
Danny Avila 2023-07-06 21:03:31 -04:00 committed by GitHub
parent 69d192bac3
commit 2607f157d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 19 additions and 289 deletions

View file

@ -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;