mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-09-22 06:00:56 +02:00
🔧 fix: Resolve Proper Dependencies to fix Application Error (#2488)
* chore: bump data-provider * feat: script to check recent dependency updates * fix: override vite/rollup version for vite build fix - also remove unused vite-plugin-html - add vite build to file output command * chore: bump rollup override to last known working version (v4.16.0 is breaking) * chore(vite): increase file size cache for workbox * fix: resolve openai to last known version using assistants v1 latest features and default header * chore: update openrouter examples
This commit is contained in:
parent
3bfd185cab
commit
c96f067689
10 changed files with 3618 additions and 4000 deletions
|
@ -74,7 +74,7 @@
|
|||
"multer": "^1.4.5-lts.1",
|
||||
"nodejs-gpt": "^1.37.4",
|
||||
"nodemailer": "^6.9.4",
|
||||
"openai": "^4.29.0",
|
||||
"openai": "^4.36.0",
|
||||
"openai-chat-tokens": "^0.2.8",
|
||||
"openid-client": "^5.4.2",
|
||||
"passport": "^0.6.0",
|
||||
|
|
51
client/check_updates.sh
Executable file
51
client/check_updates.sh
Executable file
|
@ -0,0 +1,51 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Set the directory containing the package.json file
|
||||
dir=${1:-.}
|
||||
|
||||
# Today's date and the date 3 days ago in seconds since the Unix epoch
|
||||
today=$(date +%s)
|
||||
three_days_ago=$(date -d "3 days ago" +%s)
|
||||
|
||||
# Read dependencies and devDependencies from package.json
|
||||
dependencies=$(jq -r '.dependencies,.devDependencies|keys[]' "$dir/package.json")
|
||||
packages=($dependencies) # Convert JSON array to bash array
|
||||
|
||||
# Array to hold update messages
|
||||
declare -a updates
|
||||
|
||||
# Loop over each package
|
||||
for pkg in "${packages[@]}"
|
||||
do
|
||||
echo "Checking $pkg..."
|
||||
# Retrieve the version time information as JSON
|
||||
times=$(npm view "$pkg" time --json)
|
||||
|
||||
# Loop through dates from the JSON object and check if any are within the last 3 days
|
||||
echo $times | jq -r '. | to_entries[] | select(.key as $k | $k|test("^[0-9]")) | [.key, .value] | @csv' | while IFS="," read -r version date
|
||||
do
|
||||
# Format the date to remove quotes and trim it
|
||||
date=$(echo $date | tr -d '"' | xargs)
|
||||
# Convert date to seconds since the Unix epoch
|
||||
version_date=$(date -d "$date" +%s)
|
||||
|
||||
# Check if this date is within the last three days
|
||||
if (( version_date > three_days_ago && version_date <= today ))
|
||||
then
|
||||
# Convert UTC to Eastern Time (ET), ensuring compatibility
|
||||
et_date=$(date -u -d "$date" +"%Y-%m-%d %H:%M:%S UTC")
|
||||
et_date=$(date -d "$et_date -4 hours" +"%Y-%m-%d %H:%M:%S ET")
|
||||
update_message="Version $version of $pkg was released on $et_date"
|
||||
echo "$update_message"
|
||||
updates+=("$update_message")
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
# Display all collected updates
|
||||
if [ ${#updates[@]} -eq 0 ]; then
|
||||
echo "No recent updates found within the last three days."
|
||||
else
|
||||
echo "Recent updates within the last three days:"
|
||||
printf "%s\n" "${updates[@]}"
|
||||
fi
|
|
@ -3,8 +3,14 @@
|
|||
"version": "0.7.0",
|
||||
"description": "",
|
||||
"type": "module",
|
||||
"overrides": {
|
||||
"vite": {
|
||||
"rollup": "4.15.0"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"data-provider": "cd .. && npm run build:data-provider",
|
||||
"build:file": "cross-env NODE_ENV=production vite build --debug > vite-output.log 2>&1",
|
||||
"build": "cross-env NODE_ENV=production vite build",
|
||||
"build:ci": "cross-env NODE_ENV=development vite build --mode ci",
|
||||
"dev": "cross-env NODE_ENV=development vite",
|
||||
|
@ -127,7 +133,6 @@
|
|||
"ts-jest": "^29.1.0",
|
||||
"typescript": "^5.0.4",
|
||||
"vite": "^5.1.1",
|
||||
"vite-plugin-html": "^3.2.0",
|
||||
"vite-plugin-node-polyfills": "^0.17.0",
|
||||
"vite-plugin-pwa": "^0.19.8"
|
||||
}
|
||||
|
|
|
@ -39,6 +39,7 @@ export default defineConfig({
|
|||
},
|
||||
workbox: {
|
||||
globPatterns: ['assets/**/*.{png,jpg,svg,ico}', '**/*.{js,css,html,ico,woff2}'],
|
||||
maximumFileSizeToCacheInBytes: 3 * 1024 * 1024,
|
||||
},
|
||||
manifest: {
|
||||
name: 'LibreChat',
|
||||
|
|
|
@ -125,16 +125,16 @@ Some of the endpoints are marked as **Known,** which means they might have speci
|
|||
- name: "OpenRouter"
|
||||
# For `apiKey` and `baseURL`, you can use environment variables that you define.
|
||||
# recommended environment variables:
|
||||
# Known issue: you should not use `OPENROUTER_API_KEY` as it will then override the `openAI` endpoint to use OpenRouter as well.
|
||||
apiKey: "${OPENROUTER_KEY}"
|
||||
apiKey: "${OPENROUTER_KEY}" # NOT OPENROUTER_API_KEY
|
||||
baseURL: "https://openrouter.ai/api/v1"
|
||||
models:
|
||||
default: ["gpt-3.5-turbo"]
|
||||
default: ["meta-llama/llama-3-70b-instruct"]
|
||||
fetch: true
|
||||
titleConvo: true
|
||||
titleModel: "gpt-3.5-turbo" # change to your preferred model
|
||||
modelDisplayLabel: "OpenRouter"
|
||||
titleModel: "meta-llama/llama-3-70b-instruct"
|
||||
# Recommended: Drop the stop parameter from the request as Openrouter models use a variety of stop tokens.
|
||||
dropParams: ["stop"]
|
||||
modelDisplayLabel: "OpenRouter"
|
||||
```
|
||||
|
||||

|
||||
|
|
|
@ -24,6 +24,7 @@ registration:
|
|||
socialLogins: ['github', 'google', 'discord', 'openid', 'facebook']
|
||||
# allowedDomains:
|
||||
# - "gmail.com"
|
||||
|
||||
# rateLimits:
|
||||
# fileUploads:
|
||||
# ipMax: 100
|
||||
|
@ -115,13 +116,14 @@ endpoints:
|
|||
apiKey: '${OPENROUTER_KEY}'
|
||||
baseURL: 'https://openrouter.ai/api/v1'
|
||||
models:
|
||||
default: ['gpt-3.5-turbo']
|
||||
default: ['meta-llama/llama-3-70b-instruct']
|
||||
fetch: true
|
||||
titleConvo: true
|
||||
titleModel: 'gpt-3.5-turbo'
|
||||
titleModel: 'meta-llama/llama-3-70b-instruct'
|
||||
# Recommended: Drop the stop parameter from the request as Openrouter models use a variety of stop tokens.
|
||||
dropParams: ['stop']
|
||||
modelDisplayLabel: 'OpenRouter'
|
||||
|
||||
# fileConfig:
|
||||
# endpoints:
|
||||
# assistants:
|
||||
|
|
7483
package-lock.json
generated
7483
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -7,6 +7,11 @@
|
|||
"client",
|
||||
"packages/*"
|
||||
],
|
||||
"overrides": {
|
||||
"vite": {
|
||||
"rollup": "4.15.0"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"update": "node config/update.js",
|
||||
"add-balance": "node config/add-balance.js",
|
||||
|
|
51
packages/data-provider/check_updates.sh
Executable file
51
packages/data-provider/check_updates.sh
Executable file
|
@ -0,0 +1,51 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Set the directory containing the package.json file
|
||||
dir=${1:-.}
|
||||
|
||||
# Today's date and the date 3 days ago in seconds since the Unix epoch
|
||||
today=$(date +%s)
|
||||
three_days_ago=$(date -d "3 days ago" +%s)
|
||||
|
||||
# Read dependencies and devDependencies from package.json
|
||||
dependencies=$(jq -r '.dependencies,.devDependencies|keys[]' "$dir/package.json")
|
||||
packages=($dependencies) # Convert JSON array to bash array
|
||||
|
||||
# Array to hold update messages
|
||||
declare -a updates
|
||||
|
||||
# Loop over each package
|
||||
for pkg in "${packages[@]}"
|
||||
do
|
||||
echo "Checking $pkg..."
|
||||
# Retrieve the version time information as JSON
|
||||
times=$(npm view "$pkg" time --json)
|
||||
|
||||
# Loop through dates from the JSON object and check if any are within the last 3 days
|
||||
echo $times | jq -r '. | to_entries[] | select(.key as $k | $k|test("^[0-9]")) | [.key, .value] | @csv' | while IFS="," read -r version date
|
||||
do
|
||||
# Format the date to remove quotes and trim it
|
||||
date=$(echo $date | tr -d '"' | xargs)
|
||||
# Convert date to seconds since the Unix epoch
|
||||
version_date=$(date -d "$date" +%s)
|
||||
|
||||
# Check if this date is within the last three days
|
||||
if (( version_date > three_days_ago && version_date <= today ))
|
||||
then
|
||||
# Convert UTC to Eastern Time (ET), ensuring compatibility
|
||||
et_date=$(date -u -d "$date" +"%Y-%m-%d %H:%M:%S UTC")
|
||||
et_date=$(date -d "$et_date -4 hours" +"%Y-%m-%d %H:%M:%S ET")
|
||||
update_message="Version $version of $pkg was released on $et_date"
|
||||
echo "$update_message"
|
||||
updates+=("$update_message")
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
# Display all collected updates
|
||||
if [ ${#updates[@]} -eq 0 ]; then
|
||||
echo "No recent updates found within the last three days."
|
||||
else
|
||||
echo "Recent updates within the last three days:"
|
||||
printf "%s\n" "${updates[@]}"
|
||||
fi
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "librechat-data-provider",
|
||||
"version": "0.5.5",
|
||||
"version": "0.5.6",
|
||||
"description": "data services for librechat apps",
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.es.js",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue