Skip to content

Commit

Permalink
✨ v0.7.1 (#2502)
Browse files Browse the repository at this point in the history
* chore: make openai package definition explicit

* ✨ v0.7.1

* chore: gpt-4-vision correct context length

* add `llava` to vision models list
  • Loading branch information
danny-avila committed Aug 5, 2024
1 parent 20fd4f5 commit a2cb463
Show file tree
Hide file tree
Showing 14 changed files with 31 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# v0.7.0
# v0.7.1

# Base node image
FROM node:18-alpine3.18 AS node
Expand Down
3 changes: 1 addition & 2 deletions Dockerfile.multi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# v0.7.0
# v0.7.1

# Build API, Client and Data Provider
FROM node:20-alpine AS base
Expand Down Expand Up @@ -33,7 +33,6 @@ COPY config/ ./
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 npm install
RUN npm install openai@4.36.0
COPY --from=client-build /app/client/dist /app/client/dist
EXPOSE 3080
ENV HOST=0.0.0.0
Expand Down
2 changes: 2 additions & 0 deletions api/models/tx.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ const getValueKey = (model, endpoint) => {
return 'gpt-3.5-turbo-1106';
} else if (modelName.includes('gpt-3.5')) {
return '4k';
} else if (modelName.includes('gpt-4-vision')) {
return 'gpt-4-1106';
} else if (modelName.includes('gpt-4-1106')) {
return 'gpt-4-1106';
} else if (modelName.includes('gpt-4-0125')) {
Expand Down
7 changes: 7 additions & 0 deletions api/models/tx.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ describe('getValueKey', () => {
expect(getValueKey('openai/gpt-4-1106')).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', () => {
Expand Down
4 changes: 2 additions & 2 deletions api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@librechat/backend",
"version": "0.7.0",
"version": "0.7.1",
"description": "",
"scripts": {
"start": "echo 'please run this from the root directory'",
Expand Down Expand Up @@ -74,7 +74,7 @@
"multer": "^1.4.5-lts.1",
"nodejs-gpt": "^1.37.4",
"nodemailer": "^6.9.4",
"openai": "^4.36.0",
"openai": "4.36.0",
"openai-chat-tokens": "^0.2.8",
"openid-client": "^5.4.2",
"passport": "^0.6.0",
Expand Down
1 change: 1 addition & 0 deletions api/utils/tokens.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ const openAIModels = {
'gpt-4-1106': 127990, // -10 from max
'gpt-4-0125': 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-0613': 4092, // -5 from max
'gpt-3.5-turbo-0301': 4092, // -5 from max
Expand Down
6 changes: 6 additions & 0 deletions api/utils/tokens.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ describe('getModelMaxTokens', () => {
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', () => {
expect(getModelMaxTokens('something-/gpt-3.5-turbo-1106')).toBe(
maxTokensMap[EModelEndpoint.openAI]['gpt-3.5-turbo-1106'],
Expand Down
2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@librechat/frontend",
"version": "0.7.0",
"version": "0.7.1",
"description": "",
"type": "module",
"overrides": {
Expand Down
2 changes: 1 addition & 1 deletion e2e/jestSetup.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// v0.7.0
// v0.7.1
// See .env.test.example for an example of the '.env.test' file.
require('dotenv').config({ path: './e2e/.env.test' });
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- v0.7.0 -->
<!-- v0.7.1 -->
<!DOCTYPE html>
<html>
<head>
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "LibreChat",
"version": "0.7.0",
"version": "0.7.1",
"description": "",
"workspaces": [
"api",
Expand Down
3 changes: 2 additions & 1 deletion packages/data-provider/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@ export const supportsBalanceCheck = {

export const visionModels = [
'gpt-4-vision',
'llava',
'llava-13b',
'gemini-pro-vision',
'claude-3',
Expand Down Expand Up @@ -610,7 +611,7 @@ export enum Constants {
/**
* Key for the app's version.
*/
VERSION = 'v0.7.0',
VERSION = 'v0.7.1',
/**
* Key for the Custom Config's version (librechat.yaml).
*/
Expand Down
2 changes: 1 addition & 1 deletion prettier.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// v0.7.0
// v0.7.1
module.exports = {
tailwindConfig: './client/tailwind.config.cjs',
printWidth: 100,
Expand Down

0 comments on commit a2cb463

Please sign in to comment.