Repository navigation
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? |
Replies: 3 comments
|
We recommend checking out details on Unit Testing here: https://devblogs.microsoft.com/semantic-kernel/unit-testing-with-semantic-kernel/ |
|
gjz22
That should allow to mock SK responses. |
|
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! |
We recommend checking out details on Unit Testing here: https://devblogs.microsoft.com/semantic-kernel/unit-testing-with-semantic-kernel/