Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.Net: Integration tests improvements #5981

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ public async Task ConnectorAgnosticFunctionCallingModelClassesCanPassFunctionExc
var kernel = this.InitializeKernel(importHelperPlugin: true);

var chatHistory = new ChatHistory();
chatHistory.AddSystemMessage("If you are unable to answer the question for whatever reason, please add the 'error' keyword to the response.");
chatHistory.AddUserMessage("Given the current time of day and weather, what is the likely color of the sky in Boston?");

var settings = new OpenAIPromptExecutionSettings() { ToolCallBehavior = ToolCallBehavior.EnableKernelFunctions };
Expand Down Expand Up @@ -300,8 +301,7 @@ public async Task ConnectorAgnosticFunctionCallingModelClassesCanPassFunctionExc
// Assert
Assert.NotNull(messageContent.Content);

var failureWords = new List<string>() { "error", "unable", "couldn", "issue", "trouble", "difficulties" };
Assert.Contains(failureWords, word => messageContent.Content.Contains(word, StringComparison.InvariantCultureIgnoreCase));
Assert.Contains("error", messageContent.Content, StringComparison.InvariantCultureIgnoreCase);
}

[Fact]
Expand All @@ -311,6 +311,7 @@ public async Task ConnectorAgnosticFunctionCallingModelClassesSupportSimulatedFu
var kernel = this.InitializeKernel(importHelperPlugin: true);

var chatHistory = new ChatHistory();
chatHistory.AddSystemMessage("if there's a tornado warning, please add the 'tornado' keyword to the response.");
chatHistory.AddUserMessage("Given the current time of day and weather, what is the likely color of the sky in Boston?");

var settings = new OpenAIPromptExecutionSettings() { ToolCallBehavior = ToolCallBehavior.EnableKernelFunctions };
Expand Down
Loading