Skip to content

autoblocksai/typescript-demo-app

Repository files navigation

Autoblocks Logo

📚 Documentation   •   🖥️ Application   •   🏠 Home

Development Setup

Running the app

Create app in Autoblocks

Create a new app of type Prompt named "Doctor GPT" in the Autoblocks platform.

Set environment variables

You can either create a .env file (copy from .env.example) in the root of the project or set the following environment variables:

export AUTOBLOCKS_TEST_RUN_MESSAGE="Made prompt more concise"
export AUTOBLOCKS_V2_API_KEY=<your-api-key>

Note: You can get your Autoblocks API key from the Autoblocks settings page.

export OPENAI_API_KEY=<your-api-key>

Note: You can get your OpenAI API key from the OpenAI dashboard.

Create prompts

Run the following script to create the prompts:

npm run create_prompts

Then generate the prompt classes:

npm run gen

Create a dataset

Run the following script to setup the dataset and test cases:

npm run create_dataset

Run the tests

npm run test

Running in CI

First, fork the repository to your own GitHub account.

Note: After forking, you will need to enable actions on the forked repository. See this issue for more information.

Then, set the following repository secrets:

  1. AUTOBLOCKS_V2_API_KEY
  2. OPENAI_API_KEY

Note: You can view how these are used in the .github/workflows/autoblocks_tests.yml file.

Now you can run the workflow in the Actions tab on the GitHub UI.

View results

Go to your application at app-v2.autoblocks.ai and view the results.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published