Skip to content

Commit

Permalink
cosmetic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeyMenshykh authored and shawncal committed May 6, 2023
1 parent dd52ba9 commit 50a32ac
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions dotnet/src/SemanticKernel/SkillDefinition/SKFunction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ private static MethodDetails GetMethodDetails(MethodInfo methodSignature, object

if (!result.HasSkFunctionAttribute || skFunctionAttribute == null)
{
log?.LogTrace("Method '{0}' doesn't have SKFunctionAttribute", result.Name);
log?.LogTrace("Method '{0}' doesn't have '{1}' attribute.", result.Name, typeof(SKFunctionAttribute).Name);
return result;
}

Expand Down Expand Up @@ -554,7 +554,7 @@ private static MethodDetails GetMethodDetails(MethodInfo methodSignature, object
else if (skMainParam != null)
{
// The developer used [SKFunctionInput] on a function that doesn't support a string input
var message = $"The method '{methodSignature.Name}' doesn't have a string parameter, do not use '{typeof(SKFunctionInputAttribute).Name}' attribute.";
var message = $"The method '{result.Name}' doesn't have a string parameter, do not use '{typeof(SKFunctionInputAttribute).Name}' attribute.";
throw new KernelException(KernelException.ErrorCodes.InvalidFunctionDescription, message);
}

Expand All @@ -569,7 +569,7 @@ private static MethodDetails GetMethodDetails(MethodInfo methodSignature, object

result.Description = skFunctionAttribute.Description ?? "";

log?.LogTrace("Method '{0}' found", result.Name);
log?.LogTrace("Method '{0}' found.", result.Name);

return result;
}
Expand Down Expand Up @@ -677,13 +677,13 @@ private static (DelegateTypes type, Delegate function, bool hasStringParam) GetD
{
throw new KernelException(
KernelException.ErrorCodes.FunctionTypeNotSupported,
$"Function {method.Name} has an invalid signature 'Func<SKContext, SKContext>'. " +
$"Function '{method.Name}' has an invalid signature 'Func<SKContext, SKContext>'. " +
"Please use 'Func<SKContext, Task<SKContext>>' instead.");
}

throw new KernelException(
KernelException.ErrorCodes.FunctionTypeNotSupported,
$"Function {method.Name} has an invalid signature not supported by the kernel");
$"Function '{method.Name}' has an invalid signature not supported by the kernel.");
}

[SuppressMessage("Maintainability", "CA1508:Avoid dead conditional code", Justification = "Delegate.CreateDelegate result can be null")]
Expand Down

0 comments on commit 50a32ac

Please sign in to comment.