Interface Kernel

    • Method Detail

      • getConfig

        KernelConfig getConfig()
        Settings required to execute functions, including details about AI dependencies, e.g. endpoints and API keys.
      • getPromptTemplateEngine

        PromptTemplateEngine getPromptTemplateEngine()
        Reference to the engine rendering prompt templates
        Returns:
        Reference to the engine rendering prompt templates
      • getMemory

        SemanticTextMemory getMemory()
        Get the SemanticTextMemory in use.
        Returns:
        the SemanticTextMemory in use
      • runAsync

        reactor.core.publisher.Mono<SKContext> runAsync​(SKFunction<?>... pipeline)
        Run a pipeline composed of synchronous and asynchronous functions.
        Parameters:
        pipeline - List of functions
        Returns:
        Result of the function composition
      • runAsync

        reactor.core.publisher.Mono<SKContext> runAsync​(String input,
                                                        SKFunction<?>... pipeline)
        Run a pipeline composed of synchronous and asynchronous functions.
        Parameters:
        input - Input to process
        pipeline - List of functions
        Returns:
        Result of the function composition
      • runAsync

        reactor.core.publisher.Mono<SKContext> runAsync​(ContextVariables variables,
                                                        SKFunction<?>... pipeline)
        Run a pipeline composed of synchronous and asynchronous functions.
        Parameters:
        variables - variables to initialise the context with
        pipeline - List of functions
        Returns:
        Result of the function composition
      • getSemanticFunctionBuilder

        CompletionSKFunction.Builder getSemanticFunctionBuilder()
        Get a completion function builder, functions created with this builder will be registered on the kernel
      • registerSemanticFunction

        <RequestConfiguration,​FunctionType extends SKFunction<RequestConfiguration>> FunctionType registerSemanticFunction​(FunctionType semanticFunctionDefinition)
        Registers a semantic function on this kernel
      • getFunction

        SKFunction getFunction​(String skill,
                               String function)
        Obtains a semantic function with the given name