Closed ohnotnow closed 1 year ago
Yes, you could do it this way too, but with docblocks you don't have to learn a new syntax since you should know docblock anyway ;)
I did in fact try to find a way to label the functions with attributes, like #[AiFunction]
in order to get a list of available functions automatically but I wasn't able to find a (good) way of listing all functions that have that attribute. I haven't used PHP attributes before.
Ah - no worries. Just a thought while I was watching one of the videos. I've not really used the attributes myself so can't really offer much in the way of help about them.
Not really an 'issue' - but after watching some of the youtube videos (and enjoying them!) I wondered if using the new-fangled 'attributes' would make life easier compared to parsing the docblocks?
Eg (off the top of my head) :