feat: feat: new endpoint-style submit

This commit is contained in:
Wentao Lyu 2023-03-31 03:22:57 +08:00
parent 089ca5f120
commit adcc021c9e
22 changed files with 566 additions and 478 deletions

View file

@ -19,7 +19,7 @@ const buildDefaultConversation = ({ conversation, endpoint, lastConversationSetu
conversationSignature: lastConversationSetup?.conversationSignature || null,
clientId: lastConversationSetup?.clientId || null,
invocationId: lastConversationSetup?.invocationId || null,
toneStyle: lastConversationSetup?.toneStyle || null,
toneStyle: lastConversationSetup?.toneStyle || 'fast',
suggestions: lastConversationSetup?.suggestions || []
};
} else if (endpoint === 'chatGPTBrowser') {
@ -33,6 +33,12 @@ const buildDefaultConversation = ({ conversation, endpoint, lastConversationSetu
...conversation,
endpoint
};
} else {
console.error(`Unknown endpoint ${endpoint}`);
conversation = {
...conversation,
endpoint: null
};
}
return conversation;