Interface SKFunction<RequestConfiguration>
-
- Type Parameters:
RequestConfiguration- The type of the configuration argument that will be provided when the function is invoked
- All Known Subinterfaces:
CompletionSKFunction
- All Known Implementing Classes:
AbstractSkFunction
public interface SKFunction<RequestConfiguration>Semantic Kernel callable function interface
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description FunctionViewdescribe()Returns a description of the function, including parameters.StringgetDescription()StringgetName()StringgetSkillName()Class<RequestConfiguration>getType()The type of the configuration argument that will be provided when the function is invokedreactor.core.publisher.Mono<SKContext>invokeAsync()Invokes the functionreactor.core.publisher.Mono<SKContext>invokeAsync(SKContext context)Invokes the function with the given context and settingsreactor.core.publisher.Mono<SKContext>invokeAsync(SKContext context, RequestConfiguration settings)Invokes the function with the given context and settingsreactor.core.publisher.Mono<SKContext>invokeAsync(String input)Invokes the function with the given inputreactor.core.publisher.Mono<SKContext>invokeAsync(String input, SKContext context, RequestConfiguration settings)Invokes the function with the given input, context and settingsreactor.core.publisher.Mono<SKContext>invokeWithCustomInputAsync(ContextVariables variables, SemanticTextMemory semanticMemory, ReadOnlySkillCollection skills)Invokes the function with the given input, context and settingsStringtoEmbeddingString()Create a string for generating an embedding for a function.StringtoFullyQualifiedName()The function to create a fully qualified name forStringtoManualString()Create a manual-friendly string for a function.
-
-
-
Method Detail
-
describe
@Nullable FunctionView describe()
Returns a description of the function, including parameters.- Returns:
- An instance of
FunctionViewdescribing the function
-
invokeAsync
@CheckReturnValue reactor.core.publisher.Mono<SKContext> invokeAsync(String input, SKContext context, RequestConfiguration settings)
Invokes the function with the given input, context and settings- Parameters:
input- input provided to the functioncontext- Request contextsettings- Configuration of the request- Returns:
- an updated context with the result of the request
-
invokeAsync
reactor.core.publisher.Mono<SKContext> invokeAsync()
Invokes the function- Returns:
- an updated context with the result of the request
-
invokeAsync
@CheckReturnValue reactor.core.publisher.Mono<SKContext> invokeAsync(String input)
Invokes the function with the given input- Parameters:
input- input provided to the function- Returns:
- an updated context with the result of the request
-
getType
@Nullable Class<RequestConfiguration> getType()
The type of the configuration argument that will be provided when the function is invoked- Returns:
- The type
-
invokeAsync
@CheckReturnValue reactor.core.publisher.Mono<SKContext> invokeAsync(SKContext context)
Invokes the function with the given context and settings- Parameters:
context- Request context- Returns:
- an updated context with the result of the request
-
invokeAsync
@CheckReturnValue reactor.core.publisher.Mono<SKContext> invokeAsync(SKContext context, @Nullable RequestConfiguration settings)
Invokes the function with the given context and settings- Parameters:
context- Request contextsettings- Configuration of the request- Returns:
- an updated context with the result of the request
-
getSkillName
String getSkillName()
- Returns:
- The name of the skill that this function is within
-
getName
String getName()
- Returns:
- The name of this function
-
toFullyQualifiedName
String toFullyQualifiedName()
The function to create a fully qualified name for- Returns:
- A fully qualified name for a function
-
getDescription
String getDescription()
- Returns:
- A description of the function
-
toEmbeddingString
String toEmbeddingString()
Create a string for generating an embedding for a function.- Returns:
- A string for generating an embedding for a function.
-
toManualString
String toManualString()
Create a manual-friendly string for a function.- Returns:
- A manual-friendly string for a function.
-
invokeWithCustomInputAsync
reactor.core.publisher.Mono<SKContext> invokeWithCustomInputAsync(ContextVariables variables, @Nullable SemanticTextMemory semanticMemory, @Nullable ReadOnlySkillCollection skills)
Invokes the function with the given input, context and settings- Parameters:
variables- variables to be used in the functionsemanticMemory- semantic memory to be used in the functionskills- skills to be used in the function- Returns:
- an updated context with the result of the request
-
-