Skip to content

Fix $input type hint in WP_Ability #58

@felixarntz

Description

@felixarntz

The WP_Ability class uses array $input in several places.

While this is likely working for 90% of use-cases, the shape of the input depends on the input schema that is used. That input schema can signify any type that can be expressed in JSON schema - but the PHP array type hint only works for the JSON schema types object and array.

While based on my experience using a parameter scheme of object is extremely common, any other types are possible and supported by function calling capabilities of most popular LLMs.

As such, I think the array type hint on $input is a bug and should be fixed. It needs to be without a type hint, as it can be mixed.

Metadata

Metadata

Assignees

Labels

Type

Projects

Status

In progress

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions