Skip to content

CodeOptimizationCodeFixProvider 触发异常 #14

Description

@xbotter

'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>)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions