diff --git a/components/Chatbar/Chatbar.tsx b/components/Chatbar/Chatbar.tsx index b288cca..c117001 100644 --- a/components/Chatbar/Chatbar.tsx +++ b/components/Chatbar/Chatbar.tsx @@ -125,7 +125,7 @@ export const Chatbar = () => { homeDispatch({ field: 'conversations', value: [] }); homeDispatch({ field: 'selectedConversation', value: null }); - localStorage.removeItem(`conversationHistory_${selectedNode?.subdomain}`); + localStorage.removeItem(`conversationHistory`); localStorage.removeItem('selectedConversation'); const updatedFolders = folders.filter((f) => f.type !== 'chat'); diff --git a/pages/api/home/home.tsx b/pages/api/home/home.tsx index c154c22..84a0ed8 100644 --- a/pages/api/home/home.tsx +++ b/pages/api/home/home.tsx @@ -299,7 +299,7 @@ const Home = ({}) => { useEffect(() => { if (!selectedNode?.subdomain) return; const conversationHistory = localStorage.getItem( - `conversationHistory_${selectedNode?.subdomain}` + `conversationHistory` ); const selectedConversation = localStorage.getItem("selectedConversation"); if(selectedConversation){ diff --git a/pages/api/models.ts b/pages/api/models.ts index e72dcaa..757764f 100644 --- a/pages/api/models.ts +++ b/pages/api/models.ts @@ -12,7 +12,7 @@ const handler = async (req: Request): Promise => { key: string; }; - let url = `${OPENAI_API_HOST}/v1/models`; + let url = `/v1/models`; if (OPENAI_API_TYPE === 'azure') { url = `${OPENAI_API_HOST}/openai/deployments?api-version=${OPENAI_API_VERSION}`; } diff --git a/utils/app/conversation.ts b/utils/app/conversation.ts index b161183..918fa5e 100644 --- a/utils/app/conversation.ts +++ b/utils/app/conversation.ts @@ -27,5 +27,5 @@ export const saveConversation = (conversation: Conversation) => { }; export const saveConversations = (conversations: Conversation[], subdomain: string | null | undefined) => { - localStorage.setItem(`conversationHistory_${subdomain}`, JSON.stringify(conversations)); + localStorage.setItem(`conversationHistory`, JSON.stringify(conversations)); };