react-native-apple-llm icon indicating copy to clipboard operation
react-native-apple-llm copied to clipboard

Implementing Tool Calling

Open ecoArcGaming opened this issue 1 year ago • 12 comments

I currently have an openAI tool-calling system in my RN application, which I am trying to migrate to the on-device iOS LLMs. If possible, I would love to open a PR and give the tool-calling adaptation task a shot, let me know what you think @deveix !

ecoArcGaming avatar Jul 09 '25 19:07 ecoArcGaming

Please do, I've been thinking about tools calling challenges of how you can implement a function in JS that ports to swift somehow over the bridge but haven't tried it yet. You can try and let me know!

deveix avatar Jul 10 '25 00:07 deveix

@deveix Was wondering what testing environment do you use? I.e. what physical device/simulator, Xcode version, macOs version, etc. Was running into some issues with this, thanks!

ecoArcGaming avatar Jul 15 '25 19:07 ecoArcGaming

also yarn test which README mentions doesn't seem to work, maybe it's intended as a TODO?

ecoArcGaming avatar Jul 15 '25 19:07 ecoArcGaming

@ecoArcGaming I made a mistake adding yarn test before actually adding tests so I removed it. For example project i was testing with: example project you will find at the end instructions. Make sure you have latest macOS 26 beta. latest XCode 26 beta.

deveix avatar Jul 15 '25 19:07 deveix

I only have one macbook for all dev work so I'm hesitant to get MacOS 26. I do have Xcode 26 with iOS 26 simulator tho, but the foundation model doesn't seem to be enabled on that. Do you use a physical device or Xcode simulator to test?

ecoArcGaming avatar Jul 15 '25 19:07 ecoArcGaming

You have to own a macbook m1 or more. i use simulator. also has to be macOS 26. You could wait till they release it gets out of beta and install it

deveix avatar Jul 15 '25 20:07 deveix

I have an M2 Mac. Do you know if MacOS 26 is still required if I use a physical iPhone running iOS 26 to test?

ecoArcGaming avatar Jul 15 '25 20:07 ecoArcGaming

Sorry for the delay in response. It works on simulator.

deveix avatar Jul 17 '25 17:07 deveix

Do we plan to deploy to the nom registry with a new version tag? @deveix

ecoArcGaming avatar Jul 18 '25 02:07 ecoArcGaming

Yes, I will. tomorrow will push it to npm.

deveix avatar Jul 18 '25 03:07 deveix

Do you wanna give me editor permission so I can also maintain the repo as apple rolls out more updates? major changes would still go through PRs of course

ecoArcGaming avatar Jul 18 '25 15:07 ecoArcGaming

Yes, I added you. I also published to npm!

deveix avatar Jul 18 '25 15:07 deveix