feat: close #928 summarize with gpt-3.5

This commit is contained in:
Yidadaa
2023-04-20 23:04:58 +08:00
parent 2e9e69d66c
commit 06d503152b
2 changed files with 40 additions and 14 deletions

View File

@@ -535,14 +535,14 @@ export const useChatStore = create<ChatStore>()(
session.topic === DEFAULT_TOPIC &&
countMessages(session.messages) >= SUMMARIZE_MIN_LEN
) {
requestWithPrompt(session.messages, Locale.Store.Prompt.Topic).then(
(res) => {
get().updateCurrentSession(
(session) =>
(session.topic = res ? trimTopic(res) : DEFAULT_TOPIC),
);
},
);
requestWithPrompt(session.messages, Locale.Store.Prompt.Topic, {
model: "gpt-3.5-turbo",
}).then((res) => {
get().updateCurrentSession(
(session) =>
(session.topic = res ? trimTopic(res) : DEFAULT_TOPIC),
);
});
}
const config = get().config;