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, AIFunction

    public interface SKFunction<RequestConfiguration>
    Semantic Kernel callable function interface
    • Method Detail

      • describe

        @Nullable
        FunctionView describe()
        Returns a description of the function, including parameters.
        Returns:
        An instance of FunctionView describing 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 function
        context - Request context
        settings - 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
      • 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 context
        settings - Configuration of the request
        Returns:
        an updated context with the result of the request
      • invokeAsync

        @CheckReturnValue
        reactor.core.publisher.Mono<SKContext> invokeAsync​(String input,
                                                           @Nullable
                                                           RequestConfiguration settings)
        Invokes the function with the given context and settings
        Parameters:
        input - input provided to the function
        settings - 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​(boolean includeOutputs)
        Create a manual-friendly string for a function.
        Parameters:
        includeOutputs - Whether to include function outputs in the string.
        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 function
        semanticMemory - semantic memory to be used in the function
        skills - skills to be used in the function
        Returns:
        an updated context with the result of the request