Notable Updates
AIRequestSettings
We're excited to introduce AIRequestSettings
, a versatile and efficient way to configure request settings in our Semantic Kernel platform. This new feature offers three methods to cater to different use cases and preferences:
-
Base Class Method: Utilize the
AIRequestSettings
base class for a generic approach. This method is ideal for storing settings for various services within the same extension_data field. However, be aware that it dynamically creates a specific request setting class for each call, which might introduce overhead if using only a single service. Additionally, this approach lacks type checking, meaning errors may surface during the dynamic creation process. -
Direct Service Method: Create request settings specifically tailored to the service you're using, like
AzureOpenAIChatRequestSettings
. This approach provides type checking and is recommended when working with a single service or multiple instances of a similar service (e.g., gpt-3.5-turbo and gpt-4 in OpenAI for chat). -
Kernel-Based Method: Generate request settings via the kernel, based on the registered service class. This method is highly specific, returning a request settings class that's pre-configured for your service, including pre-filled fields such as
service_id
andai_model_id
.
Each method has been designed to streamline your interaction with our services, ensuring a more efficient and error-resistant setup. Choose the one that best suits your project's needs!
Visit the following kernel example to see the configuration in action.
What's Changed
- Python: added code coverage and vscode tasks def for python by @eavanvalkenburg in #4193
- Python: remove unnecessary class attributes from SKFunctionBase. by @moonbox3 in #4283
- Python: Uses Python standard logging by @juliomenendez in #4115
- Python: Prevents LLMs from stripping complex function names by @juliomenendez in #4366
- Python: update ruff and black so they are compatible again by @eavanvalkenburg in #4352
- Python: Mark flaky test with xfail until we can fix it. by @moonbox3 in #4467
- Python: Implement AI request settings by @eavanvalkenburg in #4097
- Python: set line-length for black in sync with Ruff, run black. by @eavanvalkenburg in #4396
- Python: Supports better exceptions when Azure OpenAI content filtering is triggered by @juliomenendez in #4428
- Python: response format fix by @eavanvalkenburg in #4479
- Python: Handle errors if no event loop running in current thread. by @moonbox3 in #4485
- Python: Bump Python Package version for release. Update notebook refs to use AIRequestSettings. by @moonbox3 in #4478
Full Changelog: python-0.4.3.dev...python-0.4.4.dev