forked from open-webui/open-webui
commit
86aa2ca6cb
17 changed files with 1540 additions and 1539 deletions
32
.github/workflows/format-backend.yaml
vendored
32
.github/workflows/format-backend.yaml
vendored
|
@ -1,29 +1,39 @@
|
||||||
name: Python CI
|
name: Python CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: ['main']
|
branches:
|
||||||
|
- main
|
||||||
|
- dev
|
||||||
pull_request:
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- dev
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: 'Format Backend'
|
name: 'Format Backend'
|
||||||
env:
|
|
||||||
PUBLIC_API_BASE_URL: ''
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node-version:
|
python-version: [3.11]
|
||||||
- latest
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Use Python
|
|
||||||
uses: actions/setup-python@v4
|
- name: Set up Python
|
||||||
- name: Use Bun
|
uses: actions/setup-python@v2
|
||||||
uses: oven-sh/setup-bun@v1
|
with:
|
||||||
|
python-version: ${{ matrix.python-version }}
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install yapf
|
pip install black
|
||||||
|
|
||||||
- name: Format backend
|
- name: Format backend
|
||||||
run: bun run format:backend
|
run: black . --exclude "/venv/"
|
||||||
|
|
||||||
- name: Check for changes after format
|
- name: Check for changes after format
|
||||||
run: git diff --exit-code
|
run: git diff --exit-code
|
||||||
|
|
43
.github/workflows/format-build-frontend.yaml
vendored
43
.github/workflows/format-build-frontend.yaml
vendored
|
@ -1,25 +1,36 @@
|
||||||
name: Bun CI
|
name: Frontend Build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: ['main']
|
branches:
|
||||||
|
- main
|
||||||
|
- dev
|
||||||
pull_request:
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- dev
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: 'Format & Build Frontend'
|
name: 'Format & Build Frontend'
|
||||||
env:
|
|
||||||
PUBLIC_API_BASE_URL: ''
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Checkout Repository
|
||||||
- name: Use Bun
|
uses: actions/checkout@v4
|
||||||
uses: oven-sh/setup-bun@v1
|
|
||||||
- run: bun --version
|
- name: Setup Node.js
|
||||||
- name: Install frontend dependencies
|
uses: actions/setup-node@v3
|
||||||
run: bun install
|
with:
|
||||||
- name: Format frontend
|
node-version: '20' # Or specify any other version you want to use
|
||||||
run: bun run format
|
|
||||||
- name: Check for changes after format
|
- name: Install Dependencies
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
- name: Format Frontend
|
||||||
|
run: npm run format
|
||||||
|
|
||||||
|
- name: Check for Changes After Format
|
||||||
run: git diff --exit-code
|
run: git diff --exit-code
|
||||||
- name: Build frontend
|
|
||||||
if: always()
|
- name: Build Frontend
|
||||||
run: bun run build
|
run: npm run build
|
||||||
|
|
|
@ -4,31 +4,19 @@
|
||||||
"default_locale": "en-US",
|
"default_locale": "en-US",
|
||||||
"prompt_suggestions": [
|
"prompt_suggestions": [
|
||||||
{
|
{
|
||||||
"title": [
|
"title": ["Help me study", "vocabulary for a college entrance exam"],
|
||||||
"Help me study",
|
|
||||||
"vocabulary for a college entrance exam"
|
|
||||||
],
|
|
||||||
"content": "Help me study vocabulary: write a sentence for me to fill in the blank, and I'll try to pick the correct option."
|
"content": "Help me study vocabulary: write a sentence for me to fill in the blank, and I'll try to pick the correct option."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": [
|
"title": ["Give me ideas", "for what to do with my kids' art"],
|
||||||
"Give me ideas",
|
|
||||||
"for what to do with my kids' art"
|
|
||||||
],
|
|
||||||
"content": "What are 5 creative things I could do with my kids' art? I don't want to throw them away, but it's also so much clutter."
|
"content": "What are 5 creative things I could do with my kids' art? I don't want to throw them away, but it's also so much clutter."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": [
|
"title": ["Tell me a fun fact", "about the Roman Empire"],
|
||||||
"Tell me a fun fact",
|
|
||||||
"about the Roman Empire"
|
|
||||||
],
|
|
||||||
"content": "Tell me a random fun fact about the Roman Empire"
|
"content": "Tell me a random fun fact about the Roman Empire"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": [
|
"title": ["Show me a code snippet", "of a website's sticky header"],
|
||||||
"Show me a code snippet",
|
|
||||||
"of a website's sticky header"
|
|
||||||
],
|
|
||||||
"content": "Show me a code snippet of a website's sticky header in CSS and JavaScript."
|
"content": "Show me a code snippet of a website's sticky header in CSS and JavaScript."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -170,7 +170,7 @@ async def get_app_config():
|
||||||
"version": VERSION,
|
"version": VERSION,
|
||||||
"default_locale": (
|
"default_locale": (
|
||||||
CONFIG_DATA["ui"]["default_locale"]
|
CONFIG_DATA["ui"]["default_locale"]
|
||||||
if "default_locale" in CONFIG_DATA["ui"]
|
if "ui" in CONFIG_DATA and "default_locale" in CONFIG_DATA["ui"]
|
||||||
else "en-US"
|
else "en-US"
|
||||||
),
|
),
|
||||||
"images": images_app.state.ENABLED,
|
"images": images_app.state.ENABLED,
|
||||||
|
|
4
package-lock.json
generated
4
package-lock.json
generated
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "open-webui",
|
"name": "open-webui",
|
||||||
"version": "0.1.114",
|
"version": "0.1.116",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "open-webui",
|
"name": "open-webui",
|
||||||
"version": "0.1.114",
|
"version": "0.1.116",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@sveltejs/adapter-node": "^1.3.1",
|
"@sveltejs/adapter-node": "^1.3.1",
|
||||||
"async": "^3.2.5",
|
"async": "^3.2.5",
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
"lint:types": "npm run check",
|
"lint:types": "npm run check",
|
||||||
"lint:backend": "pylint backend/",
|
"lint:backend": "pylint backend/",
|
||||||
"format": "prettier --plugin-search-dir --write '**/*.{js,ts,svelte,css,md,html,json}'",
|
"format": "prettier --plugin-search-dir --write '**/*.{js,ts,svelte,css,md,html,json}'",
|
||||||
"format:backend": "yapf --recursive backend -p -i",
|
|
||||||
"i18n:parse": "i18next --config i18next-parser.config.ts && prettier --write 'src/lib/i18n/**/*.{js,json}'"
|
"i18n:parse": "i18next --config i18next-parser.config.ts && prettier --write 'src/lib/i18n/**/*.{js,json}'"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
@ -360,4 +360,4 @@
|
||||||
"You": "Tu",
|
"You": "Tu",
|
||||||
"You're a helpful assistant.": "Sei un assistente utile.",
|
"You're a helpful assistant.": "Sei un assistente utile.",
|
||||||
"You're now logged in.": "Ora hai effettuato l'accesso."
|
"You're now logged in.": "Ora hai effettuato l'accesso."
|
||||||
}
|
}
|
||||||
|
|
|
@ -360,4 +360,4 @@
|
||||||
"You": "あなた",
|
"You": "あなた",
|
||||||
"You're a helpful assistant.": "あなたは役に立つアシスタントです。",
|
"You're a helpful assistant.": "あなたは役に立つアシスタントです。",
|
||||||
"You're now logged in.": "ログインしました。"
|
"You're now logged in.": "ログインしました。"
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
@tailwind utilities;
|
@tailwind utilities;
|
||||||
|
|
||||||
@layer base {
|
@layer base {
|
||||||
html, pre {
|
html,
|
||||||
|
pre {
|
||||||
font-family: -apple-system, 'Arimo', ui-sans-serif, system-ui, 'Segoe UI', Roboto, Ubuntu,
|
font-family: -apple-system, 'Arimo', ui-sans-serif, system-ui, 'Segoe UI', Roboto, Ubuntu,
|
||||||
Cantarell, 'Noto Sans', sans-serif, 'Helvetica Neue', Arial, 'Apple Color Emoji',
|
Cantarell, 'Noto Sans', sans-serif, 'Helvetica Neue', Arial, 'Apple Color Emoji',
|
||||||
'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
|
'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
|
||||||
|
|
|
@ -19,12 +19,10 @@ const config = {
|
||||||
},
|
},
|
||||||
onwarn: (warning, handler) => {
|
onwarn: (warning, handler) => {
|
||||||
const { code, _ } = warning;
|
const { code, _ } = warning;
|
||||||
if (code === "css-unused-selector")
|
if (code === 'css-unused-selector') return;
|
||||||
return;
|
|
||||||
|
|
||||||
handler(warning);
|
handler(warning);
|
||||||
},
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default config;
|
export default config;
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
{
|
|
||||||
"model_name": "string",
|
|
||||||
"litellm_params": {
|
|
||||||
"model": "ollama/mistral"
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in a new issue