Partager via


KernelFunctionMetadata Class

The kernel function metadata.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Inheritance
KernelFunctionMetadata

Constructor

KernelFunctionMetadata(*, name: Annotated[str, _PydanticGeneralMetadata(pattern='^[0-9A-Za-z_]+$')], plugin_name: Annotated[str | None, _PydanticGeneralMetadata(pattern='^[0-9A-Za-z_]+$')] = None, description: str | None = None, parameters: list[KernelParameterMetadata] = None, is_prompt: bool, is_asynchronous: bool | None = True, return_parameter: KernelParameterMetadata | None = None, additional_properties: dict[str, Any] | None = None)

Keyword-Only Parameters

Name Description
name
Required
plugin_name
Required
description
Required
parameters
Required
is_prompt
Required
is_asynchronous
Default value: True
return_parameter
Required
additional_properties
Required

Attributes

fully_qualified_name

Get the fully qualified name of the function.

Returns

Type Description

The fully qualified name of the function.

model_computed_fields

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True, 'validate_assignment': True}

model_fields

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.fields from Pydantic V1.

model_fields: ClassVar[Dict[str, FieldInfo]] = {'additional_properties': FieldInfo(annotation=Union[dict[str, Any], NoneType], required=False, default=None), 'description': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'is_asynchronous': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'is_prompt': FieldInfo(annotation=bool, required=True), 'name': FieldInfo(annotation=str, required=True, metadata=[_PydanticGeneralMetadata(pattern='^[0-9A-Za-z_]+$')]), 'parameters': FieldInfo(annotation=list[KernelParameterMetadata], required=False, default_factory=list), 'plugin_name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, metadata=[_PydanticGeneralMetadata(pattern='^[0-9A-Za-z_]+$')]), 'return_parameter': FieldInfo(annotation=Union[KernelParameterMetadata, NoneType], required=False, default=None)}

additional_properties

additional_properties: dict[str, Any] | None

description

description: str | None

is_asynchronous

is_asynchronous: bool | None

is_prompt

is_prompt: bool

name

name: str

parameters

parameters: list[KernelParameterMetadata]

plugin_name

plugin_name: str | None

return_parameter

return_parameter: KernelParameterMetadata | None