DefineKernelFunction Interface
Implements
public interface DefineKernelFunction
implements java.lang.annotation.Annotation
Annotation that defines a method that can be invoked as a native function
Method Summary
Modifier and Type | Method and Description |
---|---|
abstract java.lang.String |
description()
The description of what the function does. |
abstract java.lang.String |
name()
The name of the function. |
abstract java.lang.String |
returnDescription()
The description of the return value of the function. |
abstract java.lang.String |
returnType()
The fully qualified class name of the return value of the function, for example, "java. |
abstract SKSample[] |
samples()
Examples of how to use the function. |
Method Details
description
public abstract String description()
The description of what the function does. The description should be short and concise. The model uses the description to determine whether the function is a good match for use to complete a prompt. If the model is not selecting a function when it should be, consider adding more detail to the description.
Returns:
name
public abstract String name()
The name of the function.
Returns:
returnDescription
public abstract String returnDescription()
The description of the return value of the function. The description should be short and concise.
Returns:
returnType
public abstract String returnType()
The fully qualified class name of the return value of the function, for example, "java.lang.String". If this parameter is not provided, the model will attempt to infer the return type from the method signature. For async methods provide the return from the async method, i.e. if the method returns a Mono<String> then the returnType should be "java.lang.String".
Returns:
samples
public abstract SKSample[] samples()
Examples of how to use the function. The examples should be short and concise. The Semantic Kernel can use the examples to help the model understand how the function is used.
Returns: