microsoft / semantic-kernel

Integrate cutting-edge LLM technology quickly and easily into your apps
https://aka.ms/semantic-kernel
MIT License
21.36k stars 3.14k forks source link

The Azure OpenAI endpoint must start with 'https:// #961

Closed MikeYeager closed 1 year ago

MikeYeager commented 1 year ago

Describe the bug Running 00-getting-started.ipynb in VS Code Step 4 results in Error: System.ArgumentException: endpoint (Parameter 'The Azure OpenAI endpoint must start with 'https://'')

To Reproduce Steps to reproduce the behavior:

  1. Open the notebook and specify the latest version #r "nuget: Microsoft.SemanticKernel, 0.13.442.1-preview" in step 1.
  2. Run step 2 with useAzureOpenAI = true; settings.json looks like this (apikey obscured): { "type": "azure", "model": "EPSOpenAITest1", "endpoint": "https://epsopenaitest1.openai.azure.com/", "apikey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "org": "" }
  3. Run step 3
  4. Run step 4
  5. Get this stack trace: System.ArgumentException: endpoint (Parameter 'The Azure OpenAI endpoint must start with 'https://'') 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.b33_0() at Microsoft.SemanticKernel.SkillDefinition.SKFunction.SetAIService(Func`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.ImportSemanticSkillFromDirectoryExtension.ImportSemanticSkillFromDirectory(IKernel kernel, String parentDirectory, String[] skillDirectoryNames) at Submission#10.<>d0.MoveNext() --- End of stack trace from previous location ---

Expected behavior The endpoint specified in the settings.json file does in fact start with https://, so I would not expect to get this message.

Screenshots n/a

Desktop (please complete the following information):

MikeYeager commented 1 year ago

This appears to have been related to https://github.com/microsoft/semantic-kernel/issues/878. I also changed "model": "EPSOpenAITest1" in my config file to "model": "text-davinci-003".

Sgoswami3 commented 1 week ago

what is the fix for the above issue i am still facing this issue. Unhandled exception. Microsoft.KernelMemory.ConfigurationException: Azure OpenAI: Endpoint must start with https://