Skip to content

Commit

Permalink
Merge pull request #3015 from JeffreySu/Developer
Browse files Browse the repository at this point in the history
Developer
  • Loading branch information
JeffreySu authored May 26, 2024
2 parents f0cb4a7 + 48a9df5 commit 96c5867
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,16 +157,18 @@ private async Task<IResponseMessageBase> AIChatAsync(RequestMessageBase requestM
if (requestMessageText.Content.Equals("M", StringComparison.OrdinalIgnoreCase))
{
//切换到多模态对话
chatStore.MultimodelType = MultimodelType.SimpleChat;
chatStore.MultimodelType = MultimodelType.ChatAndImage;
await UpdateMessageContextAsync(currentMessageContext, chatStore);

var responseMessage = base.CreateResponseMessage<ResponseMessageText>();
responseMessage.Content = "已切换到多模态对话模式!AI 将从您的对话中自动理解是否需要生成图片";
return responseMessage;
}
else if(judgeMultimodel)
else if (judgeMultimodel && chatStore.MultimodelType == MultimodelType.ChatAndImage)
{
var isNeedGenerateImage = await JudgeMultimodel(requestMessageText, chatStore, currentMessageContext);
SenparcTrace.SendCustomLog("JudgeMultimodel", $"判断是需要绘图:{judgeMultimodel},原始 prompt:{prompt}");

if (isNeedGenerateImage)
{
prompt = "img " + prompt;//添加 img 前缀
Expand Down

0 comments on commit 96c5867

Please sign in to comment.