semantic-kernel
semantic-kernel copied to clipboard
Python SK: Use ChatGPT for Semantic Functions
Motivation and Context
Users want to use ChatGPT as the service for their semantic functions. This feature exists with the C# SK. ChatGPT is perfectly capable of doing this. Additionally added more end-to-end tests with the intention of being able to run them as integration tests for the Python SK.
Description
OpenAIChatCompletionnow additionally inherits fromTextCompletionClientBase. This extends toAzureOpenAIChatCompletion.- If a chat service is also a
TextCompletionClientBase, it will be added to bothtext_servicesandchat_services. - Created 4 end-to-end tests that target the combination of Azure, OpenAI, text service, and chat service. Abstracted common behavior for these tests.
- Added asserts to these end-to-end tests. These should be run as integration tests, but that will be handled in a separate PR.
Contribution Checklist
- [x] The code builds clean without any errors or warnings
- [x] The PR follows SK Contribution Guidelines (https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
- [x] The code follows the .NET coding conventions (https://learn.microsoft.com/dotnet/csharp/fundamentals/coding-style/coding-conventions) verified with
dotnet format - [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone :smile: