mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-25 18:26:48 +08:00
add summarize model setting
This commit is contained in:
@@ -81,6 +81,8 @@ import { nanoid } from "nanoid";
|
||||
import { useMaskStore } from "../store/mask";
|
||||
import { ProviderType } from "../utils/cloud";
|
||||
|
||||
import { useAllModels } from "../utils/hooks";
|
||||
|
||||
function EditPromptModal(props: { id: string; onClose: () => void }) {
|
||||
const promptStore = usePromptStore();
|
||||
const prompt = promptStore.get(props.id);
|
||||
@@ -578,6 +580,8 @@ export function Settings() {
|
||||
const config = useAppConfig();
|
||||
const updateConfig = config.update;
|
||||
|
||||
const allModels = useAllModels();
|
||||
|
||||
const updateStore = useUpdateStore();
|
||||
const [checkingUpdate, setCheckingUpdate] = useState(false);
|
||||
const currentVersion = updateStore.formatVersion(updateStore.version);
|
||||
@@ -1448,6 +1452,31 @@ export function Settings() {
|
||||
></input>
|
||||
</ListItem>
|
||||
|
||||
{config.enableAutoGenerateTitle && (
|
||||
<ListItem title={Locale.Settings.SummarizeModel}>
|
||||
<Select
|
||||
aria-label={Locale.Settings.SummarizeModel}
|
||||
value={config.summarizeModel}
|
||||
onChange={(e) => {
|
||||
const [model, _providerName] =
|
||||
e.currentTarget.value.split("@");
|
||||
updateConfig((config) => {
|
||||
console.log("config", config);
|
||||
config.summarizeModel = model;
|
||||
});
|
||||
}}
|
||||
>
|
||||
{allModels
|
||||
.filter((v) => v.available)
|
||||
.map((v, i) => (
|
||||
<option value={v.name} key={i}>
|
||||
{v.displayName}({v.provider?.providerName})
|
||||
</option>
|
||||
))}
|
||||
</Select>
|
||||
</ListItem>
|
||||
)}
|
||||
|
||||
<ListItem
|
||||
title={Locale.Settings.SendPreviewBubble.Title}
|
||||
subTitle={Locale.Settings.SendPreviewBubble.SubTitle}
|
||||
|
||||
Reference in New Issue
Block a user