Class Kernel.Builder

    • Constructor Detail

      • Builder

        public Builder()
        Construct a Builder for creating a new instance of Kernel.
    • Method Detail

      • withAIService

        public <T extends AIServiceKernel.Builder withAIService​(Class<T> clazz,
                                                                  T aiService)
        Adds a service to the kernel.
        Type Parameters:
        T - The type of the service to add.
        Parameters:
        clazz - The class of the service to add.
        aiService - The service to add.
        Returns:
        this builder with the service added.
      • withPlugin

        public Kernel.Builder withPlugin​(KernelPlugin plugin)
        Adds a plugin to the kernel.
        Parameters:
        plugin - The plugin to add.
        Returns:
        this builder with the plugin added.
      • withServiceSelector

        public Kernel.Builder withServiceSelector​(Function<AIServiceCollection,​AIServiceSelector> serviceSelector)
        Sets the service selector provider for the kernel.
        Parameters:
        serviceSelector - The service selector provider for the kernel.
        Returns:
        this builder with the service selector provider set.
      • build

        public Kernel build()
        Builds a new instance of Kernel with the services and plugins provided.
        Specified by:
        build in interface SemanticKernelBuilder<Kernel>
        Returns:
        A new instance of Kernel.