Unit testing OpenAI dotnet classes - internal + sealed #9388
-
We use OpenAI chat completion service, but OpenAIChatMessageContent is sealed and has an internal method constructor. Are there any ways people are unit testing classes that use this object? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
We recommend checking out details on Unit Testing here: https://devblogs.microsoft.com/semantic-kernel/unit-testing-with-semantic-kernel/ |
Beta Was this translation helpful? Give feedback.
-
@gjz22
That should allow to mock SK responses. |
Beta Was this translation helpful? Give feedback.
-
Thank you for the details! My understanding is that in order to use chat completion service function calling you must downcast Newer versions of semantic kernel have Thanks! |
Beta Was this translation helpful? Give feedback.
We recommend checking out details on Unit Testing here: https://devblogs.microsoft.com/semantic-kernel/unit-testing-with-semantic-kernel/