.Net: Add Models collection to PromptTemplateConfig Update PromptTemplateConfig to support multiple AI models#2993
Merged
markwallace-microsoft merged 17 commits intoOct 3, 2023
Conversation
Contributor
Author
|
/sk generate-pr-description |
Contributor
|
Generate PR Description: succeeded ✅ |
0f8ae26 to
91ab5c6
Compare
…romptremplateconfig_models
dmytrostruk
approved these changes
Oct 2, 2023
dmytrostruk
left a comment
Member
There was a problem hiding this comment.
Left small renaming comments, in general looks good to me!
SergeyMenshykh
approved these changes
Oct 3, 2023
SOE-YoungS
pushed a commit
to SOE-YoungS/semantic-kernel
that referenced
this pull request
Nov 1, 2023
…lateConfig to support multiple AI models (microsoft#2993) ### Contribution Checklist - [ ] The code builds clean without any errors or warnings - [ ] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone 😄 ## Summary This pull request updates PromptTemplateConfig to support multiple AI models, providing greater flexibility in configuring AI services for semantic functions. The Completion property has been removed and replaced with a Models collection that contains AIRequestSettings objects. The SetAIConfiguration and SetAIService methods in SemanticFunction have been updated to use the first AIRequestSettings object in the Models list. SKFunctionTests1 and KernelTests have also been updated to use the Models property of PromptTemplateConfig and to reflect these changes. ## Changes - Added PromptTemplateConfigExtensions.cs file - Modified StepwisePlanner.cs file - Modified AIRequestSettings.cs file - Modified PromptTemplateConfig.cs file - Added unit tests to ensure proper deserialization of PromptTemplateConfig with multiple models - Updated SKFunctionTests1 to use Models property of PromptTemplateConfig - Updated KernelTests to use Models property of PromptTemplateConfig and add OpenAIRequestSettings object to Models list instead of setting it directly to Completion property - Updated test cases to reflect changes --- *Powered by [Microsoft Semantic Kernel](https://github.com/microsoft/semantic-kernel)* --------- Co-authored-by: Dmytro Struk <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contribution Checklist
Summary
This pull request updates PromptTemplateConfig to support multiple AI models, providing greater flexibility in configuring AI services for semantic functions. The Completion property has been removed and replaced with a Models collection that contains AIRequestSettings objects. The SetAIConfiguration and SetAIService methods in SemanticFunction have been updated to use the first AIRequestSettings object in the Models list. SKFunctionTests1 and KernelTests have also been updated to use the Models property of PromptTemplateConfig and to reflect these changes.
Changes
Powered by Microsoft Semantic Kernel