Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge upstream #9

Merged
merged 39 commits into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
1f5cb71
documentation update: mongodb (#1347)
fuegovic Dec 14, 2023
49571ac
chore: Get the latest of all github actions (#1335)
eburnette Dec 14, 2023
ea1dd59
refactor(api): Central Logging 📜 (#1348)
danny-avila Dec 14, 2023
d259431
fix: Add error handling for missing role in OpenAIClient.js (#1352)
danny-avila Dec 14, 2023
561ce8e
feat: Google Gemini ❇️ (#1355)
danny-avila Dec 15, 2023
ff59a2e
fix: Avoid Throwing Errors for Unsupported Token Count Endpoints 🪙 (#…
danny-avila Dec 15, 2023
072a7e5
update: docker-compose.yaml 🐋 (#1341)
fuegovic Dec 15, 2023
0958db3
fix: Enhance Test Coverage and Fix Compatibility Issues 👷‍♂️ (#1363)
danny-avila Dec 15, 2023
509b1e5
🔄 refactor: Consolidate Ask/Edit Controllers (#1365)
danny-avila Dec 15, 2023
2dfade1
Update package.json
danny-avila Dec 15, 2023
676f133
🍏Update mac_install.md (#1373)
fuegovic Dec 17, 2023
0c32679
📸 feat: Gemini vision, Improved Logs and Multi-modal Handling (#1368)
danny-avila Dec 17, 2023
7c2134f
fix: revert `fonts` resolution path in vite.config.ts
danny-avila Dec 17, 2023
c9d3e0a
🚩 fix: Initialize Conversation Only when Necessary Data is Fetched (#…
danny-avila Dec 17, 2023
8d563d6
✨ feat: Azure Vision Support & Docs Update (#1389)
danny-avila Dec 18, 2023
5b28362
✨ Release v0.6.5 (#1391)
danny-avila Dec 19, 2023
5c27fa3
Update pull_request_template.md (#1417)
danny-avila Dec 22, 2023
51050cc
🧹📚 docs: refactor and clean up (#1392)
fuegovic Dec 22, 2023
18cd02d
Update French Translation (#1444)
fuegovic Dec 28, 2023
bce4f41
🪪mkdocs: social cards (#1428)
fuegovic Dec 28, 2023
8be2b6f
🌎: Italian translation update & refactor: translations (#1414)
berry-13 Dec 28, 2023
443b491
feat: allow FWA (#1440)
berry-13 Dec 29, 2023
20971aa
🌎: Update Russian translations (#1413)
LedyBacer Dec 29, 2023
c3d5a08
🐛 fix: Prevent Unnecessary Cloning of Symbols in Log Object (#1455)
danny-avila Dec 30, 2023
bd4d23d
🚫🔍 feat: disallow search indexing (#1409)
berry-13 Dec 30, 2023
f19f5dc
🔥🚀 feat: CDN (Firebase) & feat: account section (#1438)
berry-13 Dec 30, 2023
379e470
🧹fix: Handle Abort Message Edge Cases (#1462)
danny-avila Dec 30, 2023
8735db0
doc update: firebase.md (#1456)
fuegovic Dec 30, 2023
1a95bef
📃 feat: add `list-balances`, `remove-user`, and improve User scripts …
ineiti Dec 30, 2023
e4c555f
Add Russian translation for the new functionality in the settings (#1…
machinsoft Dec 30, 2023
431fc62
🛠️ fix: Minor Fixes in `Message`, `Ask/EditController`, `OpenAIClient…
danny-avila Dec 30, 2023
659ba43
update pull_request_template.md (#1466)
fuegovic Dec 31, 2023
52142b4
🌎: Update French Translation (#1472)
fuegovic Jan 1, 2024
1cd5fdf
🌎: Update Portuguese Translation (#1461)
itzraiss Jan 1, 2024
c730639
👮feat: moderation text (#1388)
berry-13 Jan 1, 2024
2b3fa32
fix(OpenAIClient): do not invoke abortCompletion on completion error …
danny-avila Jan 2, 2024
5c03c32
fixing merge conflicts for upstream merge
paychex-ssmithrand Jan 2, 2024
3aff174
Update dev-images.yml
paychex-ssmithrand Jan 2, 2024
600b824
Update backend-review.yml
paychex-ssmithrand Jan 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
25 changes: 25 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ MONGO_URI=mongodb://127.0.0.1:27017/LibreChat
DOMAIN_CLIENT=http://localhost:3080
DOMAIN_SERVER=http://localhost:3080

NO_INDEX=true

#===============#
# Debug Logging #
#===============#

DEBUG_LOGGING=true
DEBUG_CONSOLE=false

#=============#
# Permissions #
#=============#
Expand Down Expand Up @@ -84,6 +93,7 @@ CHATGPT_MODELS=text-davinci-002-render-sha
#============#

GOOGLE_KEY=user_provided
# GOOGLE_MODELS=gemini-pro,gemini-pro-vision,chat-bison,chat-bison-32k,codechat-bison,codechat-bison-32k,text-bison,text-bison-32k,text-unicorn,code-gecko,code-bison,code-bison-32k
# GOOGLE_REVERSE_PROXY=

#============#
Expand Down Expand Up @@ -178,6 +188,10 @@ MEILI_MASTER_KEY=DrhYf7zENyR6AlUCKmnz0eYASOQdl6zxH7s7MKFSfFCt
# Moderation #
#========================#

OPENAI_MODERATION=false
OPENAI_MODERATION_API_KEY=
# OPENAI_MODERATION_REVERSE_PROXY=not working with some reverse proxys

BAN_VIOLATIONS=true
BAN_DURATION=1000 * 60 * 60 * 2
BAN_INTERVAL=20
Expand Down Expand Up @@ -271,6 +285,17 @@ EMAIL_PASSWORD=
EMAIL_FROM_NAME=
[email protected]

#========================#
# Firebase CDN #
#========================#

FIREBASE_API_KEY=
FIREBASE_AUTH_DOMAIN=
FIREBASE_PROJECT_ID=
FIREBASE_STORAGE_BUCKET=
FIREBASE_MESSAGING_SENDER_ID=
FIREBASE_APP_ID=

#==================================================#
# Others #
#==================================================#
Expand Down
4 changes: 2 additions & 2 deletions .github/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
# PLAYWRIGHT_BROWSERS_PATH: 0 # Places binaries to node_modules/@playwright/test
# TITLE_CONVO: false
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-node@v3
# - uses: actions/checkout@v4
# - uses: actions/setup-node@v4
# with:
# node-version: 18
# cache: 'npm'
Expand Down
5 changes: 3 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Pull Request Template


### ⚠️ Before Submitting a PR, read the [Contributing Docs](./CONTRIBUTING.md) in full!
### ⚠️ Before Submitting a PR, read the [Contributing Docs](https://github.com/danny-avila/LibreChat/blob/main/.github/CONTRIBUTING.md) in full!

## Summary

Expand All @@ -15,7 +15,8 @@ Please delete any irrelevant options.
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
- [ ] Documentation update
- [ ] Documentation update
- [ ] Translation update

## Testing

Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/backend-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Backend Unit Tests
on:
workflow_dispatch:

jobs:
tests_Backend:
name: Run Backend unit tests
timeout-minutes: 60
runs-on: ubuntu-latest
env:
MONGO_URI: ${{ secrets.MONGO_URI }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
JWT_SECRET: ${{ secrets.JWT_SECRET }}
CREDS_KEY: ${{ secrets.CREDS_KEY }}
CREDS_IV: ${{ secrets.CREDS_IV }}
BAN_VIOLATIONS: ${{ secrets.BAN_VIOLATIONS }}
BAN_DURATION: ${{ secrets.BAN_DURATION }}
BAN_INTERVAL: ${{ secrets.BAN_INTERVAL }}
NODE_ENV: CI
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Install Data Provider
run: npm run build:data-provider

- name: Run unit tests
run: cd api && npm run test:ci

- name: Run linters
uses: wearerequired/lint-action@v2
with:
eslint: true
52 changes: 52 additions & 0 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Docker Compose Build on Tag

# The workflow is triggered when a tag is pushed
on:
push:
tags:
- "*"

jobs:
build:
runs-on: ubuntu-latest

steps:
# Check out the repository
- name: Checkout
uses: actions/checkout@v4

# Set up Docker
- name: Set up Docker
uses: docker/setup-buildx-action@v3

# Log in to GitHub Container Registry
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Run docker-compose build
- name: Build Docker images
run: |
cp .env.example .env
docker-compose build
docker build -f Dockerfile.multi --target api-build -t librechat-api .

# Get Tag Name
- name: Get Tag Name
id: tag_name
run: echo "TAG_NAME=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV

# Tag it properly before push to github
- name: tag image and push
run: |
docker tag librechat:latest ghcr.io/${{ github.repository_owner }}/librechat:${{ env.TAG_NAME }}
docker push ghcr.io/${{ github.repository_owner }}/librechat:${{ env.TAG_NAME }}
docker tag librechat:latest ghcr.io/${{ github.repository_owner }}/librechat:latest
docker push ghcr.io/${{ github.repository_owner }}/librechat:latest
docker tag librechat-api:latest ghcr.io/${{ github.repository_owner }}/librechat-api:${{ env.TAG_NAME }}
docker push ghcr.io/${{ github.repository_owner }}/librechat-api:${{ env.TAG_NAME }}
docker tag librechat-api:latest ghcr.io/${{ github.repository_owner }}/librechat-api:latest
docker push ghcr.io/${{ github.repository_owner }}/librechat-api:latest
34 changes: 34 additions & 0 deletions .github/workflows/data-provider.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Node.js Package

on:
push:
branches:
- main
paths:
- 'packages/data-provider/package.json'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
- run: cd packages/data-provider && npm ci
- run: cd packages/data-provider && npm run build

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
registry-url: 'https://registry.npmjs.org'
- run: cd packages/data-provider && npm ci
- run: cd packages/data-provider && npm run build
- run: cd packages/data-provider && npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
38 changes: 38 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Deploy_GHRunner_Linux_ACI

on:
workflow_dispatch:

env:
RUNNER_VERSION: 2.293.0
ACI_RESOURCE_GROUP: 'Demo-ACI-GitHub-Runners-RG'
ACI_NAME: 'gh-runner-linux-01'
DNS_NAME_LABEL: 'gh-lin-01'
GH_OWNER: ${{ github.repository_owner }}
GH_REPOSITORY: 'LibreChat' #Change here to deploy self hosted runner ACI to another repo.

jobs:
deploy-gh-runner-aci:
runs-on: ubuntu-latest
steps:
# checkout the repo
- name: 'Checkout GitHub Action'
uses: actions/checkout@v4

- name: 'Login via Azure CLI'
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: 'Deploy to Azure Container Instances'
uses: 'azure/aci-deploy@v1'
with:
resource-group: ${{ env.ACI_RESOURCE_GROUP }}
image: ${{ secrets.REGISTRY_LOGIN_SERVER }}/pwd9000-github-runner-lin:${{ env.RUNNER_VERSION }}
registry-login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }}
registry-username: ${{ secrets.REGISTRY_USERNAME }}
registry-password: ${{ secrets.REGISTRY_PASSWORD }}
name: ${{ env.ACI_NAME }}
dns-name-label: ${{ env.DNS_NAME_LABEL }}
environment-variables: GH_TOKEN=${{ secrets.PAT_TOKEN }} GH_OWNER=${{ env.GH_OWNER }} GH_REPOSITORY=${{ env.GH_REPOSITORY }}
location: 'eastus'
45 changes: 45 additions & 0 deletions .github/workflows/dev-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Docker Dev Images Build

on:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
# Check out the repository
- name: Checkout
uses: actions/checkout@v4

# Set up Docker
- name: Set up Docker
uses: docker/setup-buildx-action@v3

# Log in to GitHub Container Registry
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Build Docker images
- name: Build Docker images
run: |
cp .env.example .env
docker build -f Dockerfile.multi --target api-build -t librechat-dev-api .
docker build -f Dockerfile -t librechat-dev .

# Tag and push the images to GitHub Container Registry
- name: Tag and push images
run: |
docker tag librechat-dev-api:latest ghcr.io/${{ github.repository_owner }}/librechat-dev-api:${{ github.sha }}
docker push ghcr.io/${{ github.repository_owner }}/librechat-dev-api:${{ github.sha }}
docker tag librechat-dev-api:latest ghcr.io/${{ github.repository_owner }}/librechat-dev-api:latest
docker push ghcr.io/${{ github.repository_owner }}/librechat-dev-api:latest

docker tag librechat-dev:latest ghcr.io/${{ github.repository_owner }}/librechat-dev:${{ github.sha }}
docker push ghcr.io/${{ github.repository_owner }}/librechat-dev:${{ github.sha }}
docker tag librechat-dev:latest ghcr.io/${{ github.repository_owner }}/librechat-dev:latest
docker push ghcr.io/${{ github.repository_owner }}/librechat-dev:latest
38 changes: 38 additions & 0 deletions .github/workflows/frontend-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#github action to run unit tests for frontend with jest
name: Frontend Unit Tests
on:
# push:
# branches:
# - main
# - dev
# - release/*
pull_request:
branches:
- main
- dev
- release/*
paths:
- 'client/**'
- 'packages/**'
jobs:
tests_frontend:
name: Run frontend unit tests
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build Client
run: npm run frontend:ci

- name: Run unit tests
run: npm run test:ci --verbose
working-directory: client
40 changes: 40 additions & 0 deletions .github/workflows/latest-images-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Docker Compose Build on Main Branch

on:
workflow_dispatch: # This line allows manual triggering

jobs:
build:
runs-on: ubuntu-latest

steps:
# Check out the repository
- name: Checkout
uses: actions/checkout@v4

# Set up Docker
- name: Set up Docker
uses: docker/setup-buildx-action@v3

# Log in to GitHub Container Registry
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Run docker-compose build
- name: Build Docker images
run: |
cp .env.example .env
docker-compose build
docker build -f Dockerfile.multi --target api-build -t librechat-api .

# Tag and push the images with the 'latest' tag
- name: Tag image and push
run: |
docker tag librechat:latest ghcr.io/${{ github.repository_owner }}/librechat:latest
docker push ghcr.io/${{ github.repository_owner }}/librechat:latest
docker tag librechat-api:latest ghcr.io/${{ github.repository_owner }}/librechat-api:latest
docker push ghcr.io/${{ github.repository_owner }}/librechat-api:latest
Loading