mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-24 04:10:15 +01:00
adding sydney in progress. only uses jailbreakConvoId and parentMsgId
This commit is contained in:
parent
69b3edc52c
commit
2c1ae68dc4
11 changed files with 53 additions and 41 deletions
|
|
@ -13,7 +13,8 @@ const {
|
|||
const { getConvo, saveMessage, deleteMessages, saveConvo } = require('../../models');
|
||||
const { handleError, sendMessage } = require('./handlers');
|
||||
|
||||
router.use('/bing', askSydney);
|
||||
router.use('/bing', askBing);
|
||||
router.use('/sydney', askSydney);
|
||||
|
||||
router.post('/', async (req, res) => {
|
||||
let { model, text, parentMessageId, conversationId, chatGptLabel, promptPrefix } = req.body;
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ router.post('/', async (req, res) => {
|
|||
convo
|
||||
});
|
||||
|
||||
console.log('CLIENT RESPONSE');
|
||||
console.log('BING RESPONSE');
|
||||
console.dir(response, { depth: null });
|
||||
|
||||
userMessage.conversationSignature =
|
||||
|
|
|
|||
|
|
@ -38,8 +38,8 @@ router.post('/', async (req, res) => {
|
|||
convo
|
||||
});
|
||||
|
||||
console.log('CLIENT RESPONSE');
|
||||
console.dir(response, { depth: null });
|
||||
console.log('SYDNEY RESPONSE');
|
||||
// console.dir(response, { depth: null });
|
||||
|
||||
userMessage.conversationSignature =
|
||||
convo.conversationSignature || response.conversationSignature;
|
||||
|
|
@ -47,7 +47,7 @@ router.post('/', async (req, res) => {
|
|||
userMessage.invocationId = response.invocationId;
|
||||
userMessage.jailbreakConversationId = convo.jailbreakConversationId || response.jailbreakConversationId;
|
||||
await saveMessage(userMessage);
|
||||
|
||||
|
||||
if (!convo.conversationSignature) {
|
||||
response.title = await titleConvo({
|
||||
model,
|
||||
|
|
@ -55,8 +55,9 @@ router.post('/', async (req, res) => {
|
|||
response: JSON.stringify(response.response)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
response.text = response.response;
|
||||
response.parentMessageId = convo.parentMessageId || response.messageId;
|
||||
response.id = response.details.messageId;
|
||||
response.suggestions =
|
||||
response.details.suggestedResponses &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue