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: gptCustom icon should show as same in model and message

Wentao Lyu45ca0a871390
diff --git a/client/src/components/Models/MenuItems.jsx b/client/src/components/Models/MenuItems.jsx
index 23e54633cd..d0a277ea9e 100644
--- a/client/src/components/Models/MenuItems.jsx
+++ b/client/src/components/Models/MenuItems.jsx
@@ -2,7 +2,6 @@ import React from 'react';
import ModelItem from './ModelItem';
export default function MenuItems({ models, onSelect }) {
- console.log(models)
return (
<>
{models.map((modelItem) => (
@@ -11,6 +10,7 @@ export default function MenuItems({ models, onSelect }) {
id={modelItem._id}
modelName={modelItem.name}
value={modelItem.value}
+ model={modelItem.model || 'chatgptCustom'}
onSelect={onSelect}
chatGptLabel={modelItem.chatGptLabel}
promptPrefix={modelItem.promptPrefix}
diff --git a/client/src/components/Models/ModelItem.jsx b/client/src/components/Models/ModelItem.jsx
index e6153e8002..163c4206fd 100644
--- a/client/src/components/Models/ModelItem.jsx
+++ b/client/src/components/Models/ModelItem.jsx
@@ -9,7 +9,7 @@ import TrashIcon from '../svg/TrashIcon';
import manualSWR from '~/utils/fetchers';
import { getIconOfModel } from '../../utils';
-export default function ModelItem({ modelName, value, onSelect, id, chatGptLabel, promptPrefix }) {
+export default function ModelItem({ modelName, value, model, onSelect, id, chatGptLabel, promptPrefix }) {
const dispatch = useDispatch();
const { customModel } = useSelector((state) => state.submit);
const { initial } = useSelector((state) => state.models);
@@ -28,7 +28,7 @@ export default function ModelItem({ modelName, value, onSelect, id, chatGptLabel
dispatch(setModels(fetchedModels));
});
- const icon = getIconOfModel({ size: 16, sender: modelName, isCreatedByUser: false, model: value, chatGptLabel, promptPrefix, error: false, className: "mr-2" });
+ const icon = getIconOfModel({ size: 16, sender: modelName, isCreatedByUser: false, model, chatGptLabel, promptPrefix, error: false, className: "mr-2" });
if (value === 'chatgptCustom') {
return (
diff --git a/client/src/store/modelSlice.js b/client/src/store/modelSlice.js
index bc34673bfc..7caefdc548 100644
--- a/client/src/store/modelSlice.js
+++ b/client/src/store/modelSlice.js
@@ -5,27 +5,32 @@ const initialState = {
{
_id: '0',
name: 'ChatGPT',
- value: 'chatgpt'
+ value: 'chatgpt',
+ model: 'chatgpt'
},
{
_id: '1',
name: 'CustomGPT',
- value: 'chatgptCustom'
+ value: 'chatgptCustom',
+ model: 'chatgptCustom'
},
{
_id: '2',
name: 'BingAI',
- value: 'bingai'
+ value: 'bingai',
+ model: 'bingai'
},
{
_id: '3',
name: 'Sydney',
- value: 'sydney'
+ value: 'sydney',
+ model: 'sydney'
},
{
_id: '4',
name: 'ChatGPT',
- value: 'chatgptBrowser'
+ value: 'chatgptBrowser',
+ model: 'chatgptBrowser'
},
],
modelMap: {},
@@ -45,7 +50,8 @@ const currentSlice = createSlice({
models.slice(initialState.models.length).forEach((modelItem) => {
modelMap[modelItem.value] = {
chatGptLabel: modelItem.chatGptLabel,
- promptPrefix: modelItem.promptPrefix
+ promptPrefix: modelItem.promptPrefix,
+ model: 'chatgptCustom'
};
});
diff --git a/client/src/utils/index.js b/client/src/utils/index.js
index 4231b0c441..a48f2ff3c8 100644
--- a/client/src/utils/index.js
+++ b/client/src/utils/index.js
@@ -68,7 +68,6 @@ export const getIconOfModel = ({ size=30, sender, isCreatedByUser, model, chatGp
else if (!isCreatedByUser) {
// TODO: use model from convo, rather than submit
// const { model, chatGptLabel, promptPrefix } = convo;
- console.log(model, chatGptLabel)
let background = bgColors[model];
const isBing = model === 'bingai' || model === 'sydney';