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

update readme, setup files, and clear convo bug

Danny Avilaa8eaf2452a0e
diff --git a/README.md b/README.md
index d9a088d75e..0ca0977d59 100644
--- a/README.md
+++ b/README.md
@@ -151,8 +151,14 @@ Here are my recently completed and planned features:
<details>
<summary><strong>ChatGPT Free Instructions</strong></summary>
+**This has been disabled as is no longer working as of 3-07-23**
+
+
+
To get your Access token For ChatGPT 'Free Version', login to chat.openai.com, then visit https://chat.openai.com/api/auth/session.
+
+
**Warning:** There may be a high chance of your account being banned with this method. Continue doing so at your own risk.
</details>
diff --git a/client/src/components/Nav/ClearConvos.jsx b/client/src/components/Nav/ClearConvos.jsx
index 0d4b6eaf31..25762aa2f2 100644
--- a/client/src/components/Nav/ClearConvos.jsx
+++ b/client/src/components/Nav/ClearConvos.jsx
@@ -1,27 +1,31 @@
import React from 'react';
import TrashIcon from '../svg/TrashIcon';
-import { useSWRConfig } from "swr"
+import { useSWRConfig } from 'swr';
import manualSWR from '~/utils/fetchers';
import { useDispatch } from 'react-redux';
-import { setConversation } from '~/store/convoSlice';
+import { setConversation, removeAll } from '~/store/convoSlice';
import { setMessages } from '~/store/messageSlice';
export default function ClearConvos() {
const dispatch = useDispatch();
- const { mutate } = useSWRConfig()
+ const { mutate } = useSWRConfig();
- const { trigger } = manualSWR(
- `http://localhost:3080/api/convos/clear`,
- 'post',
- () => {
- dispatch(setMessages([]));
- dispatch(setConversation({ error: false, title: 'New chat', conversationId: null, parentMessageId: null }));
- mutate(`http://localhost:3080/api/convos`);
- }
- );
+ const { trigger } = manualSWR(`http://localhost:3080/api/convos/clear`, 'post', () => {
+ dispatch(setMessages([]));
+ dispatch(
+ setConversation({
+ error: false,
+ title: 'New chat',
+ conversationId: null,
+ parentMessageId: null
+ })
+ );
+ mutate(`http://localhost:3080/api/convos`);
+ });
const clickHandler = () => {
console.log('Clearing conversations...');
+ dispatch(removeAll());
trigger({});
};
diff --git a/client/src/store/convoSlice.js b/client/src/store/convoSlice.js
index 98a8c09c70..d2294e5bba 100644
--- a/client/src/store/convoSlice.js
+++ b/client/src/store/convoSlice.js
@@ -38,11 +38,14 @@ const currentSlice = createSlice({
},
removeConvo: (state, action) => {
state.convos = state.convos.filter((convo) => convo.conversationId !== action.payload);
+ },
+ removeAll: (state) => {
+ state.convos = [];
}
}
});
-export const { setConversation, setConvos, setError, incrementPage, removeConvo } =
+export const { setConversation, setConvos, setError, incrementPage, removeConvo, removeAll } =
currentSlice.actions;
export default currentSlice.reducer;
diff --git a/client/src/store/modelSlice.js b/client/src/store/modelSlice.js
index c18d857164..801f0955d8 100644
--- a/client/src/store/modelSlice.js
+++ b/client/src/store/modelSlice.js
@@ -33,7 +33,6 @@ const currentSlice = createSlice({
initialState,
reducers: {
setModels: (state, action) => {
- console.log('setModels', action.payload);
const models = [...initialState.models, ...action.payload];
state.models = models;
const modelMap = {};
diff --git a/client/src/store/submitSlice.js b/client/src/store/submitSlice.js
index f55b4df0d8..b659ddcc7d 100644
--- a/client/src/store/submitSlice.js
+++ b/client/src/store/submitSlice.js
@@ -27,7 +27,6 @@ const currentSlice = createSlice({
state.chatGptLabel = action.payload.chatGptLabel;
},
setCustomModel: (state, action) => {
- console.log('setCustomModel', action.payload);
state.customModel = action.payload;
}
}
diff --git a/docker-compose.yml b/docker-compose.yml
index 1475e80c4d..83fa98fd21 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -5,7 +5,7 @@ services:
image: react-client
restart: always
ports:
- - "3050:80"
+ - "3080:80"
volumes:
- ./client:/client
- /client/node_modules
@@ -23,7 +23,7 @@ services:
- CHATGPT_TOKEN=""
- BING_TOKEN=""
ports:
- - "3080:3080"
+ - "9000:3080"
volumes:
- ./api:/api
- /api/node_modules