|
@@ -177,6 +177,7 @@ function fillTemplateWith(input: string, modelConfig: ModelConfig) {
|
|
|
|
|
|
|
|
const DEFAULT_CHAT_STATE = {
|
|
const DEFAULT_CHAT_STATE = {
|
|
|
model: 'BigModel' as 'BigModel' | 'DeepSeek',
|
|
model: 'BigModel' as 'BigModel' | 'DeepSeek',
|
|
|
|
|
+ web_search: false,
|
|
|
chatMode: 'ONLINE' as 'ONLINE' | 'LOCAL',
|
|
chatMode: 'ONLINE' as 'ONLINE' | 'LOCAL',
|
|
|
isDeepThink: true,
|
|
isDeepThink: true,
|
|
|
sessions: [createEmptySession()],
|
|
sessions: [createEmptySession()],
|
|
@@ -200,6 +201,9 @@ export const useChatStore = createPersistStore(
|
|
|
setModel(model: 'BigModel' | 'DeepSeek') {
|
|
setModel(model: 'BigModel' | 'DeepSeek') {
|
|
|
set({ model: model });
|
|
set({ model: model });
|
|
|
},
|
|
},
|
|
|
|
|
+ setWebSearch(status: boolean) {
|
|
|
|
|
+ set({ web_search: status });
|
|
|
|
|
+ },
|
|
|
setChatMode(mode: 'ONLINE' | 'LOCAL') {
|
|
setChatMode(mode: 'ONLINE' | 'LOCAL') {
|
|
|
set({ chatMode: mode });
|
|
set({ chatMode: mode });
|
|
|
},
|
|
},
|
|
@@ -417,6 +421,7 @@ export const useChatStore = createPersistStore(
|
|
|
...modelConfig,
|
|
...modelConfig,
|
|
|
appId: session.appId,
|
|
appId: session.appId,
|
|
|
stream: true,
|
|
stream: true,
|
|
|
|
|
+ web_search: get().web_search,
|
|
|
},
|
|
},
|
|
|
onUpdate(message) {
|
|
onUpdate(message) {
|
|
|
botMessage.streaming = true;
|
|
botMessage.streaming = true;
|