From c7a9a42aad37d5bb6cf4a702379310fdccde84e3 Mon Sep 17 00:00:00 2001 From: Adit Sheth Date: Fri, 3 Jan 2025 09:18:25 -0800 Subject: [PATCH] Fixed bug 9318. --- .../Connectors.HuggingFace/HuggingFacePromptExecutionSettings.cs | 1 + .../Connectors.Ollama/Settings/OllamaPromptExecutionSettings.cs | 1 + .../Settings/OpenAIAudioToTextExecutionSettings.cs | 1 + .../Settings/OpenAITextToAudioExecutionSettings.cs | 1 + 4 files changed, 4 insertions(+) diff --git a/dotnet/src/Connectors/Connectors.HuggingFace/HuggingFacePromptExecutionSettings.cs b/dotnet/src/Connectors/Connectors.HuggingFace/HuggingFacePromptExecutionSettings.cs index 6d3b8f68da06..7c07ee1f8adb 100644 --- a/dotnet/src/Connectors/Connectors.HuggingFace/HuggingFacePromptExecutionSettings.cs +++ b/dotnet/src/Connectors/Connectors.HuggingFace/HuggingFacePromptExecutionSettings.cs @@ -10,6 +10,7 @@ namespace Microsoft.SemanticKernel.Connectors.HuggingFace; /// /// HuggingFace Execution Settings. /// +[JsonNumberHandling(JsonNumberHandling.AllowReadingFromString)] public sealed class HuggingFacePromptExecutionSettings : PromptExecutionSettings { /// diff --git a/dotnet/src/Connectors/Connectors.Ollama/Settings/OllamaPromptExecutionSettings.cs b/dotnet/src/Connectors/Connectors.Ollama/Settings/OllamaPromptExecutionSettings.cs index 4b9991979640..9a513b69da72 100644 --- a/dotnet/src/Connectors/Connectors.Ollama/Settings/OllamaPromptExecutionSettings.cs +++ b/dotnet/src/Connectors/Connectors.Ollama/Settings/OllamaPromptExecutionSettings.cs @@ -11,6 +11,7 @@ namespace Microsoft.SemanticKernel.Connectors.Ollama; /// /// Ollama Prompt Execution Settings. /// +[JsonNumberHandling(JsonNumberHandling.AllowReadingFromString)] public sealed class OllamaPromptExecutionSettings : PromptExecutionSettings { /// diff --git a/dotnet/src/Connectors/Connectors.OpenAI/Settings/OpenAIAudioToTextExecutionSettings.cs b/dotnet/src/Connectors/Connectors.OpenAI/Settings/OpenAIAudioToTextExecutionSettings.cs index 60b9aff6b044..658593511ac9 100644 --- a/dotnet/src/Connectors/Connectors.OpenAI/Settings/OpenAIAudioToTextExecutionSettings.cs +++ b/dotnet/src/Connectors/Connectors.OpenAI/Settings/OpenAIAudioToTextExecutionSettings.cs @@ -12,6 +12,7 @@ namespace Microsoft.SemanticKernel.Connectors.OpenAI; /// Execution settings for OpenAI audio-to-text request. /// [Experimental("SKEXP0010")] +[JsonNumberHandling(JsonNumberHandling.AllowReadingFromString)] public sealed class OpenAIAudioToTextExecutionSettings : PromptExecutionSettings { /// diff --git a/dotnet/src/Connectors/Connectors.OpenAI/Settings/OpenAITextToAudioExecutionSettings.cs b/dotnet/src/Connectors/Connectors.OpenAI/Settings/OpenAITextToAudioExecutionSettings.cs index cfb9cfa39dd0..d645d6691fca 100644 --- a/dotnet/src/Connectors/Connectors.OpenAI/Settings/OpenAITextToAudioExecutionSettings.cs +++ b/dotnet/src/Connectors/Connectors.OpenAI/Settings/OpenAITextToAudioExecutionSettings.cs @@ -12,6 +12,7 @@ namespace Microsoft.SemanticKernel.Connectors.OpenAI; /// Execution settings for OpenAI text-to-audio request. /// [Experimental("SKEXP0001")] +[JsonNumberHandling(JsonNumberHandling.AllowReadingFromString)] public sealed class OpenAITextToAudioExecutionSettings : PromptExecutionSettings { ///