CCodeAI icon indicating copy to clipboard operation
CCodeAI copied to clipboard

CodeOptimizationCodeFixProvider 触发异常

Open xbotter opened this issue 1 year ago • 2 comments

'CodeOptimizationCodeFixProvider' encountered an error and has been disabled.

版本:2023.514.1

AppKey 已经设置过了 image

错误截图。 image 错误栈:

Microsoft.SemanticKernel.Diagnostics.ValidationException : NullValue: The Azure endpoint cannot be empty
   at Microsoft.SemanticKernel.Diagnostics.Verify.ThrowValidationException(ErrorCodes errorCodes,String message)
   at Microsoft.SemanticKernel.Connectors.AI.OpenAI.AzureSdk.AzureOpenAIClientBase..ctor(String modelId,String endpoint,String apiKey,IDelegatingHandlerFactory handlerFactory,ILogger log)
   at Microsoft.SemanticKernel.KernelConfigOpenAIExtensions.<>c__DisplayClass3_0.<AddAzureTextEmbeddingGenerationService>g__Factory|0(IKernel kernel)
   at Microsoft.SemanticKernel.Kernel.GetService[T](String name)
   at Microsoft.SemanticKernel.MemoryConfiguration.UseMemory(IKernel kernel,String embeddingsServiceId,IMemoryStore storage)
   at Microsoft.SemanticKernel.KernelBuilder.Build()
   at KernelFactory.Init()
   at async KernelFactory.InvokeCodeFuncationAsync(<Unknown Parameters>)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at async CCodeAI.QuickActions.CodeOptimizationCodeFixProvider.OptimizeCode(<Unknown Parameters>)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at async Microsoft.CodeAnalysis.CodeActions.CodeAction.GetChangedSolutionAsync(<Unknown Parameters>)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at async Microsoft.CodeAnalysis.CodeActions.CodeAction.ComputeOperationsAsync(<Unknown Parameters>)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at async Microsoft.CodeAnalysis.CodeActions.CodeAction.GetPreviewOperationsAsync(<Unknown Parameters>)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at async Microsoft.CodeAnalysis.Editor.Implementation.Suggestions.SuggestedAction.GetPreviewResultAsync(<Unknown Parameters>)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at async Microsoft.CodeAnalysis.Editor.Implementation.Suggestions.SuggestedActionWithNestedFlavors.PreviewChangesSuggestedAction.CreateAsync(<Unknown Parameters>)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at async Microsoft.CodeAnalysis.Editor.Implementation.Suggestions.SuggestedActionWithNestedFlavors.GetPreviewChangesFlavorAsync(<Unknown Parameters>)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at async Microsoft.CodeAnalysis.Editor.Implementation.Suggestions.SuggestedActionWithNestedFlavors.CreateAllFlavorsAsync(<Unknown Parameters>)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at async Microsoft.CodeAnalysis.Extensions.IExtensionManagerExtensions.PerformFunctionAsync[T](<Unknown Parameters>)

xbotter avatar May 25 '23 06:05 xbotter