Skip to content

Latest commit

 

History

History
97 lines (67 loc) · 2.25 KB

CONTRIBUTING.md

File metadata and controls

97 lines (67 loc) · 2.25 KB

Contributing

Steps for downloading and setting up AI Warp for local development.

Steps

  1. Fork the repository.

  2. 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
  3. Install Node.js.

  4. Install dependencies.

    npm install
  5. Build.

    npm run build
  6. Generate the test app.

    npm run create
  7. Configure the test app's platformatic.json to your liking. By default, it is located at ai-warp-app/platformatic.json. Note: this will be overwrited every time you generate the test app.

  8. Start the test app. From the app-warp-ai folder, run:

    node ../dist/cli/start.js

Testing a model with OpenAI

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.

Testing a local model with llama2

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"
    }
  },

Important Notes

  • AI Warp needs to be rebuilt for any code change to take affect in your test app. This includes schema changes.

Noteable Commands

  • 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.

Additional Resources