Skip to content

Commit 19bf474

Browse files
committed
Upload ChatbotTellsJokes method
1 parent 971fd7f commit 19bf474

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

sdk/openai/Azure.AI.OpenAI/tests/ResponsesTests.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -953,4 +953,21 @@ private static void AssertSerializationRoundTrip<T>(
953953
}
954954
"""),
955955
false);
956+
957+
[RecordedTest]
958+
[TestCase(Gpt4oMiniDeployment)]
959+
public void ChatbotTellsJokes(string deploymentName)
960+
{
961+
OpenAIResponseClient client = GetResponseTestClientForDeployment(deploymentName);
962+
963+
OpenAIResponse response = client.CreateResponse(
964+
inputItems: [
965+
ResponseItem.CreateSystemMessageItem("You are a humorous assistant who tells jokes"),
966+
ResponseItem.CreateUserMessageItem("Please tell me 3 jokes about trains")
967+
]);
968+
969+
string output = ((MessageResponseItem)response.OutputItems[0]).Content[0].Text;
970+
971+
Assert.That(output, Is.Not.Null.And.Not.Empty);
972+
}
956973
}

0 commit comments

Comments
 (0)