Skip to content

Commit 2607f15

Browse files
authored
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
1 parent 69d192b commit 2607f15

File tree

10 files changed

+19
-289
lines changed

10 files changed

+19
-289
lines changed

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ module.exports = {
3636
}
3737
],
3838
'linebreak-style': 0,
39+
'object-curly-spacing': ['error', 'always'],
3940
'no-trailing-spaces': 'error',
4041
'no-multiple-empty-lines': ['error', { 'max': 1 }],
4142
// "arrow-parens": [2, "as-needed", { requireForBlockBody: true }],

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,4 @@ data.ms/*
7575
auth.json
7676

7777
/packages/ux-shared/
78+
/images

api/app/clients/OpenAIClient.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ class OpenAIClient extends BaseClient {
245245
// TODO: need to handle interleaving instructions better
246246
if (this.contextStrategy) {
247247
({ payload, tokenCountMap, promptTokens, messages } =
248-
await this.handleContextStrategy({instructions, orderedMessages, formattedMessages}));
248+
await this.handleContextStrategy({ instructions, orderedMessages, formattedMessages }));
249249
}
250250

251251
const result = {

api/app/clients/PluginsClient.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const { CallbackManager } = require('langchain/callbacks');
44
const { initializeCustomAgent, initializeFunctionsAgent } = require('./agents/');
55
const { loadTools } = require('./tools/util');
66
const { SelfReflectionTool } = require('./tools/');
7-
const { HumanMessage, AIMessage } = require('langchain/schema');
7+
const { HumanChatMessage, AIChatMessage } = require('langchain/schema');
88
const {
99
instructions,
1010
imageInstructions,
@@ -237,8 +237,8 @@ Only respond with your conversational reply to the following User Message:
237237
// Map Messages to Langchain format
238238
const pastMessages = this.currentMessages.slice(0, -1).map(
239239
msg => msg?.isCreatedByUser || msg?.role?.toLowerCase() === 'user'
240-
? new HumanMessage(msg.text)
241-
: new AIMessage(msg.text));
240+
? new HumanChatMessage(msg.text)
241+
: new AIChatMessage(msg.text));
242242

243243
// initialize agent
244244
const initializer = this.functionsAgent ? initializeFunctionsAgent : initializeCustomAgent;

api/package.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
11
{
22
"name": "@librechat/backend",
3-
"version": "0.5.2",
3+
"version": "0.5.3",
44
"description": "",
55
"scripts": {
66
"start": "echo 'please run this from the root directory'",
77
"server-dev": "echo 'please run this from the root directory'",
88
"test": "cross-env NODE_ENV=test jest",
9-
"test:ci": "jest --ci",
10-
"test2": "node --inspect app/langchain/test2.js",
11-
"test3": "node --inspect app/langchain/test3.js",
12-
"test4": "node --inspect app/langchain/test4.js",
13-
"test5": "node --inspect app/langchain/test5.js",
14-
"test8": "node --inspect app/langchain/test8.js",
15-
"langchain": "node app/langchain/test2.js"
9+
"test:ci": "jest --ci"
1610
},
1711
"repository": {
1812
"type": "git",

client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@librechat/frontend",
3-
"version": "0.5.2",
3+
"version": "0.5.3",
44
"description": "",
55
"scripts": {
66
"data-provider": "cd .. && npm run build:data-provider",

client/src/components/Endpoints/EndpointOptionsDialog.jsx

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,20 @@
11
import exportFromJSON from 'export-from-json';
22
import { useEffect, useState } from 'react';
33
import { useRecoilValue } from 'recoil';
4-
import { Dialog, DialogButton, DialogTemplate } from '~/components/';
4+
import { Dialog, DialogButton, DialogTemplate } from '~/components';
55
import SaveAsPresetDialog from './SaveAsPresetDialog';
66
import cleanupPreset from '~/utils/cleanupPreset';
7-
7+
import { alternateName } from '~/utils';
88
import Settings from './Settings';
99

1010
import store from '~/store';
1111

1212
// A preset dialog to show readonly preset values.
1313
const EndpointOptionsDialog = ({ open, onOpenChange, preset: _preset, title }) => {
1414
const [preset, setPreset] = useState(_preset);
15-
const [endpointName, setEndpointName] = useState(preset?.endpoint);
16-
1715
const [saveAsDialogShow, setSaveAsDialogShow] = useState(false);
1816
const endpointsConfig = useRecoilValue(store.endpointsConfig);
19-
20-
if (endpointName === 'google') {
21-
setEndpointName('PaLM');
22-
}
23-
24-
if (endpointName === 'gptPlugins') {
25-
setEndpointName('Plugins');
26-
}
17+
const endpointName = alternateName[preset?.endpoint] ?? 'Endpoint';
2718

2819
const setOption = (param) => (newValue) => {
2920
let update = {};

client/src/components/Input/SetTokenDialog/SetTokenDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState }from 'react';
1+
import React, { useState } from 'react';
22
import HelpText from './HelpText';
33
import GoogleConfig from './GoogleConfig';
44
import OpenAIConfig from './OpenAIConfig';

0 commit comments

Comments
 (0)