This guide will walk you through the steps to get started with our React Native example app, how to run our function calling models locally, and how to utilize the LM Studio presets for testing and development.
The RNExample
folder contains a React Native app designed to demonstrate the capabilities of FuncMaster. To get it up and running, follow these steps:
-
Clone the Repo: Ensure you have the FuncMaster repository cloned to your local machine.
-
Navigate to RNExample: Change directory into the
RNExample
cd RNExample
-
Install Dependencies: Run the following commands to install the necessary npm packages and Cocoapods dependencies.
npm install npx pod-install
-
Open Xcode: To run the app on an iOS device, you'll need to open the project in Xcode and sign the application with your developer account. This step is crucial for deploying the app to your device.
- Download the Model: Ensure you download the desired model version from Hugging Face, specifically the
GGUF
variant. - Configure the App: Depending on the model you're using (Instruct vs. Chat), adjust the
instruct
variable inApp.jsx
.- For Instruct: Set
instruct
totrue
. - For Chat: Ensure
instruct
is set tofalse
.
- For Instruct: Set
- Launch the App: Use Xcode to build and run the app on your device. To test the model, tap the file button within the app interface.
npm start
- The app currently supports two query types:
Q_2
andQ_4_K_M
. For better accuracy, it's recommended to useQ_4_K_M
, although it's still under improvement.
The repository also includes infer.py
, a script for running inference through the LM Studio server.
- LM Studio Presets: Load the presets from the
LM Studio
folder corresponding to your model version. The chat model preset is recommended for best performance. - Start the server: Start the server on LM Studio.
- Running the Script: Execute
infer.py
to send a request to the LM Studio server. This script is set up for testing purposes, such as retrieving the stock price of AMZN using theyahoo_fin
package for the function callget_stock_price
.
python infer.py
Example Response:
The price of AMZN is currently $178.12. <|endoftext|>
The presets provided in the LM Studio
folder are designed to simplify the setup process for different model versions. Ensure you select the appropriate preset for your testing scenario.
This guide should help you get started with the FuncMaster project, from running the React Native example app to utilizing the Python scripts with LM Studio presets. We're excited to see how you use FuncMaster to build innovative AI-powered applications that run locally. For more information and updates, keep an eye on our GitHub repository.
- Make function calling work in chat and not just call the function.