+
+
+
{pathname === "/" &&
messages.length > 0 &&
!streaming &&
@@ -228,6 +237,11 @@ export default function OptionLayout({
open={sidebarOpen}>
setSidebarOpen(false)} />
+
+
)
}
diff --git a/src/components/Option/Settings/model-settings.tsx b/src/components/Option/Settings/model-settings.tsx
new file mode 100644
index 0000000..a7ee8ef
--- /dev/null
+++ b/src/components/Option/Settings/model-settings.tsx
@@ -0,0 +1,123 @@
+import { SaveButton } from "@/components/Common/SaveButton"
+import { getAllModelSettings, setModelSetting } from "@/services/model-settings"
+import { useQuery, useQueryClient } from "@tanstack/react-query"
+import { Form, Skeleton, Input, Switch, InputNumber, Collapse } from "antd"
+import React from "react"
+import { useTranslation } from "react-i18next"
+// keepAlive?: string
+// temperature?: number
+// topK?: number
+// topP?: number
+
+export const ModelSettings = () => {
+ const { t } = useTranslation("common")
+ const [form] = Form.useForm()
+ const client = useQueryClient()
+ const { isPending: isLoading } = useQuery({
+ queryKey: ["fetchModelConfig"],
+ queryFn: async () => {
+ const data = await getAllModelSettings()
+ form.setFieldsValue(data)
+ return data
+ }
+ })
+
+ return (
+
+
+
+ {t("modelSettings.label")}
+
+
+ {t("modelSettings.description")}
+
+
+
+ {!isLoading ? (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ )
+ }
+ ]}
+ />
+
+
+
+
+
+ ) : (
+
+ )}
+
+ )
+}
diff --git a/src/components/Option/Settings/ollama.tsx b/src/components/Option/Settings/ollama.tsx
index 969a845..688ae96 100644
--- a/src/components/Option/Settings/ollama.tsx
+++ b/src/components/Option/Settings/ollama.tsx
@@ -15,6 +15,7 @@ import { SettingPrompt } from "./prompt"
import { Trans, useTranslation } from "react-i18next"
import { useStorage } from "@plasmohq/storage/hook"
import { AdvanceOllamaSettings } from "@/components/Common/AdvanceOllamaSettings"
+import { ModelSettings } from "./model-settings"
export const SettingsOllama = () => {
const [ollamaURL, setOllamaURL] = useState
("")
@@ -219,6 +220,7 @@ export const SettingsOllama = () => {