kernel_plugin Module
Classes
KernelPlugin |
Represents a Kernel Plugin with functions. This class behaves mostly like a dictionary, with functions as values and their names as keys. When you add a function, through .set or setitem, the function is copied, the metadata is deep-copied and the name of the plugin is set in the metadata and added to the dict of functions. This is done in the same way as a normal dict, so a existing key will be overwritten. Class methods: from_object(plugin_name: str, plugin_instance: Any | dict[str, Any], description: str | None = None): Create a plugin from a existing object, like a custom class with annotated functions. from_directory(plugin_name: str, parent_directory: str, description: str | None = None): Create a plugin from a directory, parsing: .py files, .yaml files and directories with skprompt.txt and config.json files. from_openapi( plugin_name: str, openapi_document_path: str, execution_settings: OpenAPIFunctionExecutionParameters | None = None, description: str | None = None):
from_openai( plugin_name: str, plugin_url: str | None = None, plugin_str: str | None = None, execution_parameters: OpenAIFunctionExecutionParameters | None = None, description: str | None = None):
Create a KernelPlugin. |