Steps for downloading and setting up AI Warp for local development.
-
Fork the repository.
-
Clone your fork using SSH, Github CLI, or HTTPS.
git clone [email protected]:<YOUR_GITHUB_USERNAME>/ai-warp.git # SSH git clone https://github.com/<YOUR_GITHUB_USERNAME>/ai-warp.git # HTTPS gh repo clone <YOUR_GITHUB_USERNAME>/ai-warp # GitHub CLI
-
Install Node.js.
-
Install dependencies.
npm install
-
Build.
npm run build
-
Generate the test app.
npm run create
-
Configure the test app's
platformatic.json
to your liking. By default, it is located atai-warp-app/platformatic.json
. Note: this will be overwrited every time you generate the test app. -
Start the test app. From the
app-warp-ai
folder, run:node ../dist/cli/start.js
To test a remote model with with OpenAI, you can use the following to download the model we used for testing:
"aiProvider": {
"openai": {
"model": "gpt-3.5-turbo",
"apiKey": "{PLT_OPENAI_API_KEY}"
}
}
Make sure to add your OpenAI api key as PLT_OPENAI_API_KEY
in your .env
file.
To test a local model with with llama2, you can use the following to download the model we used for testing:
curl -L -O https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.2-GGUF/resolve/main/mistral-7b-instruct-v0.2.Q8_0.gguf
Then, in your platformatic.json
file, add:
"aiProvider": {
"llama2": {
"modelPath": "./mistral-7b-instruct-v0.2.Q8_0.gguf"
}
},
- AI Warp needs to be rebuilt for any code change to take affect in your test app. This includes schema changes.
npm run build
- Build the app.npm run build:config
- Rebuild the config.npm run lint:fix
- Fix all formatting issues and console log any linting issues that need to be fixed in code.npm run test
- Run Unit, E2E, and Type tests.