Skip to content

.Net: New Feature: Adding Experimental Function to Production #12982

@AbelKel

Description

@AbelKel

Name: Adding functions to Kernel using .Plugin.AddFromFunctions() in Production Code
About: Removing warning from .Plugin.AddFromFunctions() in Code

I am currently using .AddFromFunctions() method to add functions to my semantic kernel for my LLM to invoke as follows:

#pragma warning disable SKEXP0001
kernel.Plugins.AddFromFunctions("MSLEARN", msLearnTools.Select(aiFunction => aiFunction.AsKernelFunction()));
#pragma warning restore SKEXP0001

Without the suppressors, I get the following warning/error:

error SKEXP0001: 'Microsoft.SemanticKernel.AIFunctionExtensions.AsKernelFunction(Microsoft.Extensions.AI.AIFunction)' is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.

I'm planning on using this code in production soon and would like recommendations on how to move forward without suppressing the warning.

Thanks,
Abel


Metadata

Metadata

Assignees

Labels

.NETIssue or Pull requests regarding .NET code

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions