Skip to content
This repository was archived by the owner on Dec 7, 2025. It is now read-only.
This repository was archived by the owner on Dec 7, 2025. It is now read-only.

Register tools via PHP reflection #23

Description

@joehoyle

Just a suggestion as I had implemented this a while ago in an experimental plugin. Similar to this plugin there is a way to register "tools" (though was the openai "function" naming then). And I added another layer to populate a tool's metadata based off a given function's signature and documentation. E.g

https://github.com/humanmade/ai-plugin/blob/main/inc/dashboard-assistant/functions/namespace.php#L24

The implementation for which is at https://github.com/humanmade/ai-plugin/blob/13e60218b4bf612eca5ed231353829f48aa6a874/inc/openai/class-function_.php#L40

So, this essentially made it easier / simpler to expose functionality as tools. Is a bit opinionated and not sure if the taste is right for this project of course!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions