Closed mrochon closed 10 months ago
I think this problem has no correct endpoint for aoai ,you need to set the azure openai service endpoint
Ah, yes - the earlier version of AddAzureOpenAICompletion had a different sequence of string parameters. Thanks.
I am trying to implement your [ #LearnSK sample] (https://github.com/kinfey/SemanticKernelCookBook/blob/main/notebooks/dotNET/02/LearnSK.ipynb) but getting System.UriFormatexception when executing:
(Using 1.0.1 version of SK nugets)
Exception detail: System.UriFormatException HResult=0x80131537 Message=Invalid URI: The format of the URI could not be determined. Source=System.Private.Uri StackTrace: at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind, UriCreationOptions& creationOptions) at System.Uri..ctor(String uriString) at Microsoft.SemanticKernel.OpenAIServiceCollectionExtensions.CreateAzureOpenAIClient(String endpoint, AzureKeyCredential credentials, HttpClient httpClient) at Microsoft.SemanticKernel.OpenAIServiceCollectionExtensions.<>cDisplayClass20_0.b_0(IServiceProvider serviceProvider, Object )
at Microsoft.Extensions.DependencyInjection.ServiceLookup.FactoryCallSite.<>c DisplayClass4_0.<.ctor>b0(IServiceProvider sp)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitFactory(FactoryCallSite factoryCallSite, RuntimeResolverContext context)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitorb 34_0[T](Object key)
at System.Linq.Enumerable.SelectManySingleSelectorIteratord18.MoveNext()
at Program.<$>d 0.MoveNext() in C:\Users\mrochon\source\repos\ai-samples\SemKernel\SK1\Program.cs:line 48
2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor
2.VisitCallSite(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitIEnumerable(IEnumerableCallSite enumerableCallSite, RuntimeResolverContext context) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor
2.VisitCallSite(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope) at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(ServiceIdentifier serviceIdentifier) at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func
2 valueFactory) at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(ServiceIdentifier serviceIdentifier, ServiceProviderEngineScope serviceProviderEngineScope) at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetKeyedService(Type serviceType, Object serviceKey, ServiceProviderEngineScope serviceProviderEngineScope) at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetRequiredKeyedService(Type serviceType, Object serviceKey, ServiceProviderEngineScope serviceProviderEngineScope) at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetRequiredKeyedService(Type serviceType, Object serviceKey) at Microsoft.Extensions.DependencyInjection.ServiceProviderKeyedServiceExtensions.GetRequiredKeyedService(IServiceProvider provider, Type serviceType, Object serviceKey) at Microsoft.Extensions.DependencyInjection.ServiceProviderKeyedServiceExtensions.GetRequiredKeyedService[T](IServiceProvider provider, Object serviceKey) at Microsoft.Extensions.DependencyInjection.ServiceProviderKeyedServiceExtensions.GetKeyedServices[T](IServiceProvider provider, Object serviceKey) at Microsoft.SemanticKernel.Kernel.2.MoveNext() at System.Linq.Enumerable.TryGetLast[TSource](IEnumerable
1 source, Boolean& found) at System.Linq.Enumerable.LastOrDefault[TSource](IEnumerable1 source) at Microsoft.SemanticKernel.Services.OrderedAIServiceSelector.<TrySelectAIService>g__GetAnyService|3_0[T](Kernel kernel) at Microsoft.SemanticKernel.Services.OrderedAIServiceSelector.TrySelectAIService[T](Kernel kernel, KernelFunction function, KernelArguments arguments, T& service, PromptExecutionSettings& serviceSettings) at Microsoft.SemanticKernel.KernelFunctionFromPrompt.<RenderPromptAsync>d__16.MoveNext() at Microsoft.SemanticKernel.KernelFunctionFromPrompt.<InvokeCoreAsync>d__3.MoveNext() at System.Threading.Tasks.ValueTask
1.get_Result() at Microsoft.SemanticKernel.KernelFunction.