bing hotfix, latest api, uses sydney

This commit is contained in:
Daniel Avila 2023-03-20 17:02:37 -04:00
parent d13315c45b
commit 7d796f2c3e
8 changed files with 59 additions and 32 deletions

View file

@ -160,12 +160,12 @@ export default function TextChat({ messages }) {
} else if (model === 'bingai') {
console.log('Bing data:', data);
const { title } = data;
const { conversationSignature, clientId, conversationId, invocationId } =
const { conversationSignature, clientId, conversationId, invocationId, parentMessageId } =
responseMessage;
dispatch(
setConversation({
title,
parentMessageId: null,
parentMessageId,
conversationSignature,
clientId,
conversationId,

View file

@ -28,7 +28,13 @@ const currentSlice = createSlice({
state.refreshConvoHint = state.refreshConvoHint + 1;
},
setConversation: (state, action) => {
return { ...state, ...action.payload };
// return { ...state, ...action.payload };
for (const key in action.payload) {
if (Object.hasOwnProperty.call(action.payload, key)) {
state[key] = action.payload[key];
}
}
},
setError: (state, action) => {
state.error = action.payload;