diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d820494c..bb5c7b91 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,22 +9,23 @@ jobs: docker: runs-on: ubuntu-latest steps: - - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Login to Docker Hub - uses: docker/login-action@v2 + - name: Checkout + uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_PWD }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v5 with: tags: | n4z3m/dialoqbase:latest n4z3m/dialoqbase:${{ github.ref_name}} push: true + cache-from: type=registry,ref=n4z3m/dialoqbase:latest + cache-to: type=inline diff --git a/.github/workflows/next.yml b/.github/workflows/next.yml index 73506a7a..c08894d0 100644 --- a/.github/workflows/next.yml +++ b/.github/workflows/next.yml @@ -8,21 +8,22 @@ jobs: docker: runs-on: ubuntu-latest steps: - - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Login to Docker Hub - uses: docker/login-action@v2 + - name: Checkout + uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_PWD }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v5 with: tags: | n4z3m/dialoqbase-next:latest - push: true \ No newline at end of file + push: true + cache-from: type=registry,ref=n4z3m/dialoqbase-next:latest + cache-to: type=inline \ No newline at end of file diff --git a/app/ui/package.json b/app/ui/package.json index f635292e..0c341779 100644 --- a/app/ui/package.json +++ b/app/ui/package.json @@ -1,7 +1,7 @@ { "name": "app", "private": true, - "version": "1.2.1", + "version": "1.3.0", "type": "module", "scripts": { "dev": "vite", diff --git a/app/ui/src/@types/bot.ts b/app/ui/src/@types/bot.ts index 61ac33c2..3547bc40 100644 --- a/app/ui/src/@types/bot.ts +++ b/app/ui/src/@types/bot.ts @@ -13,6 +13,7 @@ export type BotSettings = { use_hybrid_search: boolean; bot_protect: boolean; use_rag: boolean; + bot_model_api_key: string; }, chatModel: { label: string; diff --git a/app/ui/src/components/Bot/Playground/Form.tsx b/app/ui/src/components/Bot/Playground/Form.tsx index 14a8bac0..8dff6dfd 100644 --- a/app/ui/src/components/Bot/Playground/Form.tsx +++ b/app/ui/src/components/Bot/Playground/Form.tsx @@ -30,7 +30,6 @@ export const PlaygroundgForm = () => { stop, } = useSpeechRecognition(); - React.useEffect(() => { const defaultLanguageFromLocalStorage = localStorage.getItem( "defaultSpeechToTextLanguage" diff --git a/app/ui/src/components/Bot/Settings/SettingsCard.tsx b/app/ui/src/components/Bot/Settings/SettingsCard.tsx index 18650046..bc35b0ef 100644 --- a/app/ui/src/components/Bot/Settings/SettingsCard.tsx +++ b/app/ui/src/components/Bot/Settings/SettingsCard.tsx @@ -126,6 +126,7 @@ export const SettingsCard: React.FC = ({ use_hybrid_search: data.use_hybrid_search, bot_protect: data.bot_protect, use_rag: data.use_rag, + bot_model_api_key: data.bot_model_api_key, }} form={form} requiredMark={false} @@ -304,16 +305,23 @@ export const SettingsCard: React.FC = ({ + + + @@ -321,11 +329,15 @@ export const SettingsCard: React.FC = ({ - + diff --git a/app/ui/src/routes/settings/model.tsx b/app/ui/src/routes/settings/model.tsx index 24eff6a3..05478ea8 100644 --- a/app/ui/src/routes/settings/model.tsx +++ b/app/ui/src/routes/settings/model.tsx @@ -75,6 +75,7 @@ export default function SettingsModelRoot() { const response = await api.post("/admin/models", { ...values, url: fetchUrlForm.getFieldValue("url"), + api_key: fetchUrlForm.getFieldValue("api_key"), }); return response.data; }; @@ -311,6 +312,14 @@ export default function SettingsModelRoot() { /> + + + +