Skip to content

Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active

fix: set to default model in searchPlaceholderConversation

Wentao Lyu319e4f0f9543
diff --git a/api/server/index.js b/api/server/index.js
index 17a3e9f809..9f68518c2a 100644
--- a/api/server/index.js
+++ b/api/server/index.js
@@ -29,7 +29,8 @@ const projectPath = path.join(__dirname, '..', '..', 'client');
session({
secret: 'chatgpt-clone-random-secrect',
resave: false,
- saveUninitialized: true
+ saveUninitialized: true,
+ cookie: { maxAge: 7 * 24 * 60 * 60 * 1000 } // 7 days
})
);
diff --git a/client/src/store/conversation.js b/client/src/store/conversation.js
index 7ae123c254..b59aef4af5 100644
--- a/client/src/store/conversation.js
+++ b/client/src/store/conversation.js
@@ -131,7 +131,7 @@ const useConversation = () => {
);
};
- const searchPlaceholderConversation = ({ model = null, chatGptLabel = null, promptPrefix = null } = {}) => {
+ const searchPlaceholderConversation = () => {
switchToConversation(
{
conversationId: 'search',
@@ -140,9 +140,9 @@ const useConversation = () => {
conversationSignature: null,
clientId: null,
invocationId: null,
- model: model,
- chatGptLabel: chatGptLabel,
- promptPrefix: promptPrefix,
+ model: null,
+ chatGptLabel: null,
+ promptPrefix: null,
user: null,
suggestions: [],
toneStyle: null