Closed artlong4 closed 1 year ago
Never mind, I see they changed the method parameters, it's now this:
kernel.Config.AddAzureTextCompletionService (
"testing123", // Azure OpenAI Deployment Name
"https://[my resource name].openai.azure.com", // Azure OpenAI Endpoint
"[my open ai key]" // Azure OpenAI Key
);
Even since the Microsoft.SemanticKernel, 0.13.277.1-preview version I cannot connect to the Open AI service and I'm inquiring if it's something on my end (I'm sure it is)
I get this error: "The Azure OpenAI endpoint must start with 'https://'"
It works as expected with version 0.12.207,1- preview (and earlier).
And yes, my url does start with https:// This is what my settings look like:
And here are the error details:
System.ArgumentException HResult=0x80070057 Message=endpoint (Parameter 'The Azure OpenAI endpoint must start with 'https://'') Source=Microsoft.SemanticKernel.Connectors.AI.OpenAI StackTrace: at Microsoft.SemanticKernel.Diagnostics.Verify.StartsWith(String text, String prefix, String message, String textParamName) at Microsoft.SemanticKernel.Connectors.AI.OpenAI.AzureSdk.AzureOpenAIClientBase..ctor(String modelId, String endpoint, String apiKey, HttpClient httpClient, ILogger logger) at Microsoft.SemanticKernel.Connectors.AI.OpenAI.TextCompletion.AzureTextCompletion..ctor(String modelId, String endpoint, String apiKey, HttpClient httpClient, ILogger logger) at Microsoft.SemanticKernel.KernelConfigOpenAIExtensions.<>cDisplayClass0_0.gFactory|0(IKernel kernel)
at Microsoft.SemanticKernel.Kernel.GetService[T](String name)
at Microsoft.SemanticKernel.Kernel.b 33_0()
at Microsoft.SemanticKernel.SkillDefinition.SKFunction.SetAIService(Func$>d 0.MoveNext() in C:\Users\artlo\source\repos\ConsoleApp2\ConsoleApp2\Program.cs:line 84
1 serviceFactory) at Microsoft.SemanticKernel.Kernel.CreateSemanticFunction(String skillName, String functionName, SemanticFunctionConfig functionConfig) at Microsoft.SemanticKernel.Kernel.RegisterSemanticFunction(String skillName, String functionName, SemanticFunctionConfig functionConfig) at Microsoft.SemanticKernel.Kernel.RegisterSemanticFunction(String functionName, SemanticFunctionConfig functionConfig) at Microsoft.SemanticKernel.InlineFunctionsDefinitionExtension.CreateSemanticFunction(IKernel kernel, String promptTemplate, PromptTemplateConfig config, String functionName, String skillName) at Microsoft.SemanticKernel.InlineFunctionsDefinitionExtension.CreateSemanticFunction(IKernel kernel, String promptTemplate, String functionName, String skillName, String description, Int32 maxTokens, Double temperature, Double topP, Double presencePenalty, Double frequencyPenalty, IEnumerable
1 stopSequences) at Program.<