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

@ -245,7 +245,7 @@ class OpenAIClient extends BaseClient {
// TODO: need to handle interleaving instructions better
if (this.contextStrategy) {
({ payload, tokenCountMap, promptTokens, messages } =
await this.handleContextStrategy({instructions, orderedMessages, formattedMessages}));
await this.handleContextStrategy({ instructions, orderedMessages, formattedMessages }));
}
const result = {

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;

View file

@ -1,18 +1,12 @@
{
"name": "@librechat/backend",
"version": "0.5.2",
"version": "0.5.3",
"description": "",
"scripts": {
"start": "echo 'please run this from the root directory'",
"server-dev": "echo 'please run this from the root directory'",
"test": "cross-env NODE_ENV=test jest",
"test:ci": "jest --ci",
"test2": "node --inspect app/langchain/test2.js",
"test3": "node --inspect app/langchain/test3.js",
"test4": "node --inspect app/langchain/test4.js",
"test5": "node --inspect app/langchain/test5.js",
"test8": "node --inspect app/langchain/test8.js",
"langchain": "node app/langchain/test2.js"
"test:ci": "jest --ci"
},
"repository": {
"type": "git",