Skip to content

Commit

Permalink
Update ChatCompletionBot.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoABCardoso authored Oct 2, 2024
1 parent 1aa1c42 commit 3185589
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dotnet/Bots/ChatCompletionBot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ protected override async Task<bool> OnMessageActivityAsync(ITurnContext<IMessage
await ProcessRunStreaming(completion, conversationData, turnContext, cancellationToken);
// If OYD is enabled, remove image data from history after using it
var dataSources = completionOptions.GetDataSources();
if (!dataSources.IsNull())
if (dataSources != null)
{
conversationData.History.RemoveAll(x => x.ImageData != null);
}
Expand Down Expand Up @@ -231,4 +231,4 @@ protected async Task<bool> HandleFileUploads(ITurnContext turnContext, Conversat
return filesUploaded;
}
}
}
}

0 comments on commit 3185589

Please sign in to comment.