-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.Net: adds support for strict mode with OpenAI #9924
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Vincent Biret <[email protected]>
Signed-off-by: Vincent Biret <[email protected]>
Signed-off-by: Vincent Biret <[email protected]>
Signed-off-by: Vincent Biret <[email protected]>
Signed-off-by: Vincent Biret <[email protected]>
Signed-off-by: Vincent Biret <[email protected]>
Signed-off-by: Vincent Biret <[email protected]>
…pping Signed-off-by: Vincent Biret <[email protected]>
Signed-off-by: Vincent Biret <[email protected]>
Signed-off-by: Vincent Biret <[email protected]>
Signed-off-by: Vincent Biret <[email protected]>
Signed-off-by: Vincent Biret <[email protected]>
Signed-off-by: Vincent Biret <[email protected]>
Signed-off-by: Vincent Biret <[email protected]>
Signed-off-by: Vincent Biret <[email protected]>
Signed-off-by: Vincent Biret <[email protected]>
Signed-off-by: Vincent Biret <[email protected]>
Signed-off-by: Vincent Biret <[email protected]>
Signed-off-by: Vincent Biret <[email protected]>
Signed-off-by: Vincent Biret <[email protected]>
Signed-off-by: Vincent Biret <[email protected]>
Signed-off-by: Vincent Biret <[email protected]>
Signed-off-by: Vincent Biret <[email protected]>
Signed-off-by: Vincent Biret <[email protected]>
Signed-off-by: Vincent Biret <[email protected]>
Signed-off-by: Vincent Biret <[email protected]>
Signed-off-by: Vincent Biret <[email protected]>
Signed-off-by: Vincent Biret <[email protected]>
Signed-off-by: Vincent Biret <[email protected]>
Signed-off-by: Vincent Biret <[email protected]>
Signed-off-by: Vincent Biret <[email protected]>
Signed-off-by: Vincent Biret <[email protected]>
Signed-off-by: Vincent Biret <[email protected]>
… generation Signed-off-by: Vincent Biret <[email protected]>
Signed-off-by: Vincent Biret <[email protected]>
Signed-off-by: Vincent Biret <[email protected]>
…-kernel into feat/strict-mode
Signed-off-by: Vincent Biret <[email protected]>
@@ -178,7 +178,7 @@ public static async IAsyncEnumerable<ChatMessageContent> GetMessagesAsync(Assist | |||
|
|||
FunctionCallsProcessor functionProcessor = new(logger); | |||
// This matches current behavior. Will be configurable upon integrating with `FunctionChoice` (#6795/#5200) | |||
FunctionChoiceBehaviorOptions functionOptions = new() { AllowConcurrentInvocation = true, AllowParallelCalls = true }; | |||
FunctionChoiceBehaviorOptions functionOptions = new() { AllowConcurrentInvocation = true, AllowParallelCalls = true, AllowStrictSchemaAdherence = true }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we have the strict mode configurable? To keep it off by default and allow it to be enabled if necessary. This way, we can avoid unnecessary behavioral changes.
@@ -33,7 +33,7 @@ public string? ArgumentName | |||
/// <summary> | |||
/// The parameter type - string, integer, number, boolean, array and object. | |||
/// </summary> | |||
internal string Type { get; } | |||
public string Type { get; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The type and array item type parameters together with constructor were intentionally kept internal because their types will change during the migration to Microsoft.OpenApi V2. Consider adding a freezable setter to the Schema property, like the one for the ArgumentName property, so that a modified schema can be assigned.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason why I had to change those to public is because I need access to it in the samples.
https://github.com/baywet/semantic-kernel/blob/3b296e91b4e35a63edf537d58e56a7ef4dcd2c6d/dotnet/samples/Concepts/Plugins/CopilotAgentBasedPlugins.cs#L161
Do you have an example of a freezable setter implementation?
dotnet/src/Functions/Functions.OpenApi/Extensions/RestApiOperationExtensions.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: SergeyMenshykh <[email protected]>
Signed-off-by: Vincent Biret <[email protected]>
fixes #9786
closes #9741