Skip to content

tldraw/ai-template

Repository files navigation

tldraw ai starter

This repo is a starter for projects that use the tldraw ai module.

To use:

  1. Create a .dev.vars file in the root directory.
  2. Add your OpenAI key to that file as an environment variable, i.e. OPENAI_API_KEY=sk-your-key.
  3. Install dependencies with pnpm i
  4. Run pnpm run dev
  5. Open http://localhost:5173/ in your browser.

To hack:

  • Edit the example system prompt at worker/openai/system-prompt.ts.
  • Create new transforms and use them in useTldrawAiExample.
  • Maybe replace the OpenAI service with your own.

License

This project is provided under the MIT license found here. The tldraw SDK is provided under the tldraw license.

Trademarks

Copyright (c) 2024-present tldraw Inc. The tldraw name and logo are trademarks of tldraw. Please see our trademark guidelines for info on acceptable usage.

Distributions

You can find the @tldraw/ai package on npm here. You can find tldraw on npm here.

Contribution

Found a bug? Please submit an issue.

Community

Have questions, comments or feedback? Join our discord. For the latest news and release notes, visit tldraw.dev.

Contact

Find us on Twitter/X at @tldraw or email us at mailto:[email protected].

About

A starter template to use the tldraw AI package.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages