rseymour/func_me

Calling the chosen function

Closed this issue · 1 comments

Could code similar to this be helpful in providing a way to call the function selected by the model? https://play.integer32.com/?version=stable&mode=debug&edition=2015&gist=4d52c229918537b01dcdd84509c02b63

I still need to learn macros otherwise I would be able to help

I haven't had a chance to look at this code but I just added the calling part in a branch I'm about to merge. For now only the ollama_fn example uses it, but it allows using the json name and arguments to call rust code safely. A lot of room for improvement and error handling.