-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:Mintplex-Labs/anything-llm
- Loading branch information
Showing
18 changed files
with
741 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "npm" | ||
directory: "/frontend" | ||
schedule: | ||
interval: "weekly" | ||
- package-ecosystem: "npm" | ||
directory: "/server" | ||
schedule: | ||
interval: "weekly" | ||
- package-ecosystem: "npm" | ||
directory: "/collector" | ||
schedule: | ||
interval: "weekly" | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
frontend/src/components/EmbeddingSelection/MistralAiOptions/index.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
export default function MistralAiOptions({ settings }) { | ||
return ( | ||
<div className="w-full flex flex-col gap-y-4"> | ||
<div className="w-full flex items-center gap-[36px] mt-1.5"> | ||
<div className="flex flex-col w-60"> | ||
<label className="text-white text-sm font-semibold block mb-3"> | ||
API Key | ||
</label> | ||
<input | ||
type="password" | ||
name="MistralAiApiKey" | ||
className="bg-theme-settings-input-bg text-white placeholder:text-theme-settings-input-placeholder text-sm rounded-lg focus:outline-primary-button active:outline-primary-button outline-none block w-full p-2.5" | ||
placeholder="Mistral AI API Key" | ||
defaultValue={settings?.MistralApiKey ? "*".repeat(20) : ""} | ||
required={true} | ||
autoComplete="off" | ||
spellCheck={false} | ||
/> | ||
</div> | ||
<div className="flex flex-col w-60"> | ||
<label className="text-white text-sm font-semibold block mb-3"> | ||
Model Preference | ||
</label> | ||
<select | ||
name="EmbeddingModelPref" | ||
required={true} | ||
defaultValue={settings?.EmbeddingModelPref} | ||
className="bg-theme-settings-input-bg border-gray-500 text-white text-sm rounded-lg block w-full p-2.5" | ||
> | ||
<optgroup label="Available embedding models"> | ||
{[ | ||
"mistral-embed", | ||
].map((model) => { | ||
return ( | ||
<option key={model} value={model}> | ||
{model} | ||
</option> | ||
); | ||
})} | ||
</optgroup> | ||
</select> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { useState, useEffect } from "react"; | ||
|
||
export default function useTextSize() { | ||
const [textSize, setTextSize] = useState("normal"); | ||
const [textSizeClass, setTextSizeClass] = useState("text-[14px]"); | ||
|
||
const getTextSizeClass = (size) => { | ||
switch (size) { | ||
case "small": | ||
return "text-[12px]"; | ||
case "large": | ||
return "text-[18px]"; | ||
default: | ||
return "text-[14px]"; | ||
} | ||
}; | ||
|
||
useEffect(() => { | ||
const storedTextSize = window.localStorage.getItem("anythingllm_text_size"); | ||
if (storedTextSize) { | ||
setTextSize(storedTextSize); | ||
setTextSizeClass(getTextSizeClass(storedTextSize)); | ||
} | ||
|
||
const handleTextSizeChange = (event) => { | ||
const size = event.detail; | ||
setTextSize(size); | ||
setTextSizeClass(getTextSizeClass(size)); | ||
}; | ||
|
||
window.addEventListener("textSizeChange", handleTextSizeChange); | ||
return () => { | ||
window.removeEventListener("textSizeChange", handleTextSizeChange); | ||
}; | ||
}, []); | ||
|
||
return { textSize, textSizeClass }; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.