mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-09-22 08:12:00 +02:00
✨ v0.7.1 (#2502)
* chore: make openai package definition explicit
* ✨ v0.7.1
* chore: gpt-4-vision correct context length
* add `llava` to vision models list
This commit is contained in:
parent
0ae98ff011
commit
3df4fac118
14 changed files with 31 additions and 15 deletions
|
@ -1,4 +1,4 @@
|
||||||
# v0.7.0
|
# v0.7.1
|
||||||
|
|
||||||
# Base node image
|
# Base node image
|
||||||
FROM node:18-alpine3.18 AS node
|
FROM node:18-alpine3.18 AS node
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# v0.7.0
|
# v0.7.1
|
||||||
|
|
||||||
# Build API, Client and Data Provider
|
# Build API, Client and Data Provider
|
||||||
FROM node:20-alpine AS base
|
FROM node:20-alpine AS base
|
||||||
|
@ -33,7 +33,6 @@ COPY config/ ./
|
||||||
RUN mkdir -p /app/api/node_modules/librechat-data-provider/
|
RUN mkdir -p /app/api/node_modules/librechat-data-provider/
|
||||||
RUN cp -R /app/packages/data-provider/* /app/api/node_modules/librechat-data-provider/
|
RUN cp -R /app/packages/data-provider/* /app/api/node_modules/librechat-data-provider/
|
||||||
RUN npm install
|
RUN npm install
|
||||||
RUN npm install openai@4.36.0
|
|
||||||
COPY --from=client-build /app/client/dist /app/client/dist
|
COPY --from=client-build /app/client/dist /app/client/dist
|
||||||
EXPOSE 3080
|
EXPOSE 3080
|
||||||
ENV HOST=0.0.0.0
|
ENV HOST=0.0.0.0
|
||||||
|
|
|
@ -52,6 +52,8 @@ const getValueKey = (model, endpoint) => {
|
||||||
return 'gpt-3.5-turbo-1106';
|
return 'gpt-3.5-turbo-1106';
|
||||||
} else if (modelName.includes('gpt-3.5')) {
|
} else if (modelName.includes('gpt-3.5')) {
|
||||||
return '4k';
|
return '4k';
|
||||||
|
} else if (modelName.includes('gpt-4-vision')) {
|
||||||
|
return 'gpt-4-1106';
|
||||||
} else if (modelName.includes('gpt-4-1106')) {
|
} else if (modelName.includes('gpt-4-1106')) {
|
||||||
return 'gpt-4-1106';
|
return 'gpt-4-1106';
|
||||||
} else if (modelName.includes('gpt-4-0125')) {
|
} else if (modelName.includes('gpt-4-0125')) {
|
||||||
|
|
|
@ -34,6 +34,13 @@ describe('getValueKey', () => {
|
||||||
expect(getValueKey('openai/gpt-4-1106')).toBe('gpt-4-1106');
|
expect(getValueKey('openai/gpt-4-1106')).toBe('gpt-4-1106');
|
||||||
expect(getValueKey('gpt-4-1106/openai/')).toBe('gpt-4-1106');
|
expect(getValueKey('gpt-4-1106/openai/')).toBe('gpt-4-1106');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should return "gpt-4-1106" for model type of "gpt-4-1106"', () => {
|
||||||
|
expect(getValueKey('gpt-4-vision-preview')).toBe('gpt-4-1106');
|
||||||
|
expect(getValueKey('openai/gpt-4-1106')).toBe('gpt-4-1106');
|
||||||
|
expect(getValueKey('gpt-4-turbo')).toBe('gpt-4-1106');
|
||||||
|
expect(getValueKey('gpt-4-0125')).toBe('gpt-4-1106');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('getMultiplier', () => {
|
describe('getMultiplier', () => {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@librechat/backend",
|
"name": "@librechat/backend",
|
||||||
"version": "0.7.0",
|
"version": "0.7.1",
|
||||||
"description": "",
|
"description": "",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "echo 'please run this from the root directory'",
|
"start": "echo 'please run this from the root directory'",
|
||||||
|
@ -74,7 +74,7 @@
|
||||||
"multer": "^1.4.5-lts.1",
|
"multer": "^1.4.5-lts.1",
|
||||||
"nodejs-gpt": "^1.37.4",
|
"nodejs-gpt": "^1.37.4",
|
||||||
"nodemailer": "^6.9.4",
|
"nodemailer": "^6.9.4",
|
||||||
"openai": "^4.36.0",
|
"openai": "4.36.0",
|
||||||
"openai-chat-tokens": "^0.2.8",
|
"openai-chat-tokens": "^0.2.8",
|
||||||
"openid-client": "^5.4.2",
|
"openid-client": "^5.4.2",
|
||||||
"passport": "^0.6.0",
|
"passport": "^0.6.0",
|
||||||
|
|
|
@ -49,6 +49,7 @@ const openAIModels = {
|
||||||
'gpt-4-1106': 127990, // -10 from max
|
'gpt-4-1106': 127990, // -10 from max
|
||||||
'gpt-4-0125': 127990, // -10 from max
|
'gpt-4-0125': 127990, // -10 from max
|
||||||
'gpt-4-turbo': 127990, // -10 from max
|
'gpt-4-turbo': 127990, // -10 from max
|
||||||
|
'gpt-4-vision': 127990, // -10 from max
|
||||||
'gpt-3.5-turbo': 16375, // -10 from max
|
'gpt-3.5-turbo': 16375, // -10 from max
|
||||||
'gpt-3.5-turbo-0613': 4092, // -5 from max
|
'gpt-3.5-turbo-0613': 4092, // -5 from max
|
||||||
'gpt-3.5-turbo-0301': 4092, // -5 from max
|
'gpt-3.5-turbo-0301': 4092, // -5 from max
|
||||||
|
|
|
@ -59,6 +59,12 @@ describe('getModelMaxTokens', () => {
|
||||||
expect(getModelMaxTokens('gpt-4-1106')).toBe(maxTokensMap[EModelEndpoint.openAI]['gpt-4-1106']);
|
expect(getModelMaxTokens('gpt-4-1106')).toBe(maxTokensMap[EModelEndpoint.openAI]['gpt-4-1106']);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('should return correct tokens for gpt-4-vision exact match', () => {
|
||||||
|
expect(getModelMaxTokens('gpt-4-vision')).toBe(
|
||||||
|
maxTokensMap[EModelEndpoint.openAI]['gpt-4-vision'],
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
test('should return correct tokens for gpt-3.5-turbo-1106 partial match', () => {
|
test('should return correct tokens for gpt-3.5-turbo-1106 partial match', () => {
|
||||||
expect(getModelMaxTokens('something-/gpt-3.5-turbo-1106')).toBe(
|
expect(getModelMaxTokens('something-/gpt-3.5-turbo-1106')).toBe(
|
||||||
maxTokensMap[EModelEndpoint.openAI]['gpt-3.5-turbo-1106'],
|
maxTokensMap[EModelEndpoint.openAI]['gpt-3.5-turbo-1106'],
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@librechat/frontend",
|
"name": "@librechat/frontend",
|
||||||
"version": "0.7.0",
|
"version": "0.7.1",
|
||||||
"description": "",
|
"description": "",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"overrides": {
|
"overrides": {
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
// v0.7.0
|
// v0.7.1
|
||||||
// See .env.test.example for an example of the '.env.test' file.
|
// See .env.test.example for an example of the '.env.test' file.
|
||||||
require('dotenv').config({ path: './e2e/.env.test' });
|
require('dotenv').config({ path: './e2e/.env.test' });
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<!-- v0.7.0 -->
|
<!-- v0.7.1 -->
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
|
8
package-lock.json
generated
8
package-lock.json
generated
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "LibreChat",
|
"name": "LibreChat",
|
||||||
"version": "0.7.0",
|
"version": "0.7.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "LibreChat",
|
"name": "LibreChat",
|
||||||
"version": "0.7.0",
|
"version": "0.7.1",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"api",
|
"api",
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
},
|
},
|
||||||
"api": {
|
"api": {
|
||||||
"name": "@librechat/backend",
|
"name": "@librechat/backend",
|
||||||
"version": "0.7.0",
|
"version": "0.7.1",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@anthropic-ai/sdk": "^0.16.1",
|
"@anthropic-ai/sdk": "^0.16.1",
|
||||||
|
@ -136,7 +136,7 @@
|
||||||
},
|
},
|
||||||
"client": {
|
"client": {
|
||||||
"name": "@librechat/frontend",
|
"name": "@librechat/frontend",
|
||||||
"version": "0.7.0",
|
"version": "0.7.1",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ariakit/react": "^0.4.5",
|
"@ariakit/react": "^0.4.5",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "LibreChat",
|
"name": "LibreChat",
|
||||||
"version": "0.7.0",
|
"version": "0.7.1",
|
||||||
"description": "",
|
"description": "",
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"api",
|
"api",
|
||||||
|
|
|
@ -397,6 +397,7 @@ export const supportsBalanceCheck = {
|
||||||
|
|
||||||
export const visionModels = [
|
export const visionModels = [
|
||||||
'gpt-4-vision',
|
'gpt-4-vision',
|
||||||
|
'llava',
|
||||||
'llava-13b',
|
'llava-13b',
|
||||||
'gemini-pro-vision',
|
'gemini-pro-vision',
|
||||||
'claude-3',
|
'claude-3',
|
||||||
|
@ -610,7 +611,7 @@ export enum Constants {
|
||||||
/**
|
/**
|
||||||
* Key for the app's version.
|
* Key for the app's version.
|
||||||
*/
|
*/
|
||||||
VERSION = 'v0.7.0',
|
VERSION = 'v0.7.1',
|
||||||
/**
|
/**
|
||||||
* Key for the Custom Config's version (librechat.yaml).
|
* Key for the Custom Config's version (librechat.yaml).
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// v0.7.0
|
// v0.7.1
|
||||||
module.exports = {
|
module.exports = {
|
||||||
tailwindConfig: './client/tailwind.config.cjs',
|
tailwindConfig: './client/tailwind.config.cjs',
|
||||||
printWidth: 100,
|
printWidth: 100,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue