Ok I guess I’m not thaaat lazy.
Here’s some help for anyone that finds this thread:
I borrowed from this https://platform.openai.com/docs/assistants/tools/function-calling/quickstart?context=without-streaming
And created this:
JS functional ( classes) wrapper that automatically calls functions/tools passed into an assistant api call.
Don’t be scared of all the setup code. The adapted (improved) part is lines 207-223 that finds and calls the function and passes back to the LLM. The rest sets up the test run.
Happy hacking!