feat: re-orginazed three ask api. To provide ability to reproduce message.

feat: bing and sydney come to work again, [need more test]
This commit is contained in:
Wentao Lyu 2023-03-15 00:54:50 +08:00
parent 8b00805d24
commit 644f3f716f
5 changed files with 209 additions and 70 deletions

View file

@ -49,7 +49,7 @@ export default function TextChat({ messages }) {
const convoHandler = (data, currentState, currentMsg) => {
const { requestMessage, responseMessage } = data;
const { conversationId } = currentMsg;
const { conversationId } = requestMessage;
const { messages, _currentMsg, message, isCustomModel, sender } =
currentState;
const { model, chatGptLabel, promptPrefix } = message;
@ -66,7 +66,7 @@ export default function TextChat({ messages }) {
// in case it takes too long.
setTimeout(() => {
dispatch(refreshConversation());
dispatch(refreshConversation());
}, 5000);
}
@ -87,9 +87,7 @@ export default function TextChat({ messages }) {
})
);
} else if (
model === 'bingai' &&
convo.conversationId === null &&
convo.invocationId === null
model === 'bingai'
) {
console.log('Bing data:', data);
const { title } = data;