Skip to content

Commit 634b67b

Browse files
committed
Merge branch 'master' of github.com-jstawski:jstawski/anything-llm
2 parents 4445e73 + 253b7ad commit 634b67b

File tree

34 files changed

+293
-214
lines changed

34 files changed

+293
-214
lines changed

frontend/src/components/LLMSelection/FireworksAiOptions/index.jsx

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ import System from "@/models/system";
22
import { useState, useEffect } from "react";
33

44
export default function FireworksAiOptions({ settings }) {
5+
const [inputValue, setInputValue] = useState(settings?.FireworksAiLLMApiKey);
6+
const [fireworksAiApiKey, setFireworksAiApiKey] = useState(
7+
settings?.FireworksAiLLMApiKey
8+
);
9+
510
return (
611
<div className="flex gap-[36px] mt-1.5">
712
<div className="flex flex-col w-60">
@@ -17,22 +22,27 @@ export default function FireworksAiOptions({ settings }) {
1722
required={true}
1823
autoComplete="off"
1924
spellCheck={false}
25+
onChange={(e) => setInputValue(e.target.value)}
26+
onBlur={() => setFireworksAiApiKey(inputValue)}
2027
/>
2128
</div>
2229
{!settings?.credentialsOnly && (
23-
<FireworksAiModelSelection settings={settings} />
30+
<FireworksAiModelSelection
31+
apiKey={fireworksAiApiKey}
32+
settings={settings}
33+
/>
2434
)}
2535
</div>
2636
);
2737
}
28-
function FireworksAiModelSelection({ settings }) {
38+
function FireworksAiModelSelection({ apiKey, settings }) {
2939
const [groupedModels, setGroupedModels] = useState({});
3040
const [loading, setLoading] = useState(true);
3141

3242
useEffect(() => {
3343
async function findCustomModels() {
3444
setLoading(true);
35-
const { models } = await System.customModels("fireworksai");
45+
const { models } = await System.customModels("fireworksai", apiKey);
3646

3747
if (models?.length > 0) {
3848
const modelsByOrganization = models.reduce((acc, model) => {
@@ -47,7 +57,7 @@ function FireworksAiModelSelection({ settings }) {
4757
setLoading(false);
4858
}
4959
findCustomModels();
50-
}, []);
60+
}, [apiKey]);
5161

5262
if (loading || Object.keys(groupedModels).length === 0) {
5363
return (

frontend/src/locales/ar/common.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -808,6 +808,10 @@ const TRANSLATIONS = {
808808
icon: null,
809809
link: null,
810810
},
811+
"render-html": {
812+
title: null,
813+
description: null,
814+
},
811815
},
812816
},
813817
"main-page": {

frontend/src/locales/da/common.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -847,6 +847,10 @@ const TRANSLATIONS = {
847847
icon: null,
848848
link: null,
849849
},
850+
"render-html": {
851+
title: null,
852+
description: null,
853+
},
850854
},
851855
},
852856
"main-page": {

frontend/src/locales/de/common.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,10 @@ const TRANSLATIONS = {
546546
icon: "Icon",
547547
link: "Link",
548548
},
549+
"render-html": {
550+
title: null,
551+
description: null,
552+
},
549553
},
550554
},
551555
api: {

frontend/src/locales/en/common.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,11 @@ const TRANSLATIONS = {
564564
icon: "Icon",
565565
link: "Link",
566566
},
567+
"render-html": {
568+
title: "Render HTML in chat",
569+
description:
570+
"Render HTML responses in assistant responses.\nThis can result in a much higher fidelity of response quality, but can also lead to potential security risks.",
571+
},
567572
},
568573
},
569574

frontend/src/locales/es/common.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,10 @@ const TRANSLATIONS = {
557557
icon: "Icono",
558558
link: "Enlace",
559559
},
560+
"render-html": {
561+
title: null,
562+
description: null,
563+
},
560564
},
561565
},
562566
api: {

frontend/src/locales/et/common.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,10 @@ const TRANSLATIONS = {
523523
icon: "Ikoon",
524524
link: "Link",
525525
},
526+
"render-html": {
527+
title: null,
528+
description: null,
529+
},
526530
},
527531
},
528532
api: {

frontend/src/locales/fa/common.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -800,6 +800,10 @@ const TRANSLATIONS = {
800800
icon: null,
801801
link: null,
802802
},
803+
"render-html": {
804+
title: null,
805+
description: null,
806+
},
803807
},
804808
},
805809
"main-page": {

frontend/src/locales/fr/common.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -808,6 +808,10 @@ const TRANSLATIONS = {
808808
icon: null,
809809
link: null,
810810
},
811+
"render-html": {
812+
title: null,
813+
description: null,
814+
},
811815
},
812816
},
813817
"main-page": {

frontend/src/locales/he/common.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,10 @@ const TRANSLATIONS = {
529529
icon: "סמל",
530530
link: "קישור",
531531
},
532+
"render-html": {
533+
title: null,
534+
description: null,
535+
},
532536
},
533537
},
534538
api: {

0 commit comments

Comments
 (0)