mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
feat: Bing Image Creator
This commit is contained in:
parent
ad29d25396
commit
530f9d303f
3 changed files with 24 additions and 2 deletions
|
|
@ -47,6 +47,16 @@ const askBing = async ({
|
||||||
parentMessageId,
|
parentMessageId,
|
||||||
toneStyle,
|
toneStyle,
|
||||||
onProgress,
|
onProgress,
|
||||||
|
clientOptions: {
|
||||||
|
features: {
|
||||||
|
genImage: {
|
||||||
|
server: {
|
||||||
|
enable: true,
|
||||||
|
type: 'markdown_list',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
options = {
|
options = {
|
||||||
|
|
@ -56,6 +66,16 @@ const askBing = async ({
|
||||||
parentMessageId,
|
parentMessageId,
|
||||||
toneStyle,
|
toneStyle,
|
||||||
onProgress,
|
onProgress,
|
||||||
|
clientOptions: {
|
||||||
|
features: {
|
||||||
|
genImage: {
|
||||||
|
server: {
|
||||||
|
enable: true,
|
||||||
|
type: 'markdown_list',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
// don't give those parameters for new conversation
|
// don't give those parameters for new conversation
|
||||||
|
|
|
||||||
|
|
@ -172,7 +172,8 @@ const ask = async ({
|
||||||
let unfinished = false;
|
let unfinished = false;
|
||||||
if (partialText?.trim()?.length > response.text.length) {
|
if (partialText?.trim()?.length > response.text.length) {
|
||||||
response.text = partialText;
|
response.text = partialText;
|
||||||
unfinished = true;
|
unfinished = false;
|
||||||
|
//setting "unfinished" to false fix bing image generation error msg and allows to continue a convo after being triggered by censorship (bing does remember the context after a "censored error" so there is no reason to end the convo)
|
||||||
}
|
}
|
||||||
|
|
||||||
let responseMessage = {
|
let responseMessage = {
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,8 @@ const Content = React.memo(({ content, message }) => {
|
||||||
];
|
];
|
||||||
|
|
||||||
if (!isInitializing || !isLatestMessage) {
|
if (!isInitializing || !isLatestMessage) {
|
||||||
rehypePlugins.pop();
|
//commented out to fix bing image creator errors
|
||||||
|
//rehypePlugins.pop();
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue