Hiya
I'm currently making a chatbot by using the RAG principle. I made a zero-shot version that doesn't use history or anything. This works perfectly.
I recently started creating a version that uses the history of the chat. I'm encountering a problem where the chatmodel doesn't use my chat history. It's integrated with the Microsoft.SemanticKernel.
I'm using a deployment in west eu, version 0301 of gpt-35-turbo. When testing this with a deployment in sweden central, version 0613 of gpt-35-turbo, it seems like it uses the history a lot more, almost always. The answers are way more inconsistent in comparison though, it mostly doesn't follow the restrictions of the prompt that i constructed.
My question now is: does version 0301 not support chat history functionality? Or is there something wrong in my code?
var chat = new ChatHistory(promptConfig.PersonalityHistory);
if (history != null) {
foreach (var chatTurn in history)
{
if (chatTurn.User != null)
{
_logger.LogInformation("Adding user message to chat history");
chat.AddUserMessage(chatTurn.User);
}
if (chatTurn.Bot != null)
{
_logger.LogInformation("Adding bot message to chat history");
chat.AddAssistantMessage(chatTurn.Bot);
}
}
}
chat.AddUserMessage(question);
chat.AddUserMessage(prompt);
var answerResponse = await chatCompletion.GetChatMessageContentAsync(chat, chatSettings, _kernel);
My code is based on the csharp example of Azure itself: https://github.com/Azure-Samples/azure-search-openai-demo-csharp
Thanks in advance for the help!