https://github.com/briangershon/prompt-playground
Get started quickly with an LLM project in TypeScript. With testing and CI/CD.
https://github.com/briangershon/prompt-playground
anthropic-claude prompt-engineering starter-template vercel-ai-sdk
Last synced: 30 days ago
JSON representation
Get started quickly with an LLM project in TypeScript. With testing and CI/CD.
- Host: GitHub
- URL: https://github.com/briangershon/prompt-playground
- Owner: briangershon
- License: mit
- Created: 2024-12-06T00:06:44.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-12-06T00:29:43.000Z (5 months ago)
- Last Synced: 2025-02-05T20:33:03.693Z (3 months ago)
- Topics: anthropic-claude, prompt-engineering, starter-template, vercel-ai-sdk
- Language: TypeScript
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# prompt-playground
Get started quickly with an LLM project in TypeScript. With testing and CI/CD.
Example code generates a Haiku poem and then tests Haiku's validity with a different LLM model.
## Features
- use any LLM model that is supported by the Vercel AI SDK, such as from Anthropic.
- automated testing with `vitest` (using a less expensive model)
- GitHub action that runs tests on every push## Get started
Create a `.env` file with the following:
```
ANTHROPIC_API_KEY=
````ANTHROPIC_API_KEY` is the API key for the Anthropic API.
Run:
```bash
yarn
yarn dev
```Also add `ANTHROPIC_API_KEY` to GitHub repository secrets so the GitHub actions can run.
## Run tests
Run all tests:
```bash
yarn test
```Run only the slow and expensive LLM tests:
```bash
yarn test-llm
```Run only the fast unit tests (no LLM):
```bash
yarn test-unit
```