Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ai-playground

A browser-based playground for testing chat completion APIs from different AI providers. No backend, no build step, just static HTML, CSS and JS.

Currently supports:

How it works

You paste your own API key into the settings panel. It's stored in your browser's localStorage and used to call the provider's API directly from the browser, it never touches any server of mine.

Each provider is implemented as an adapter with a single method:

sendMessage(messages, apiKey, options) -> Promise<string>

Adding a new provider means creating a new file in js/providers/ that follows this interface and registering it in js/providers/provider.js. Nothing else needs to change.

Running locally

Because the app uses ES modules, it needs to be served over HTTP, opening index.html directly (file://) won't work.

git clone https://github.com/payaci/ai-playground.git
cd ai-playground
npx serve

Then open the URL it prints (usually http://localhost:3000).

License

MIT — see LICENSE.

Try it live

About

Browser-based playground for testing AI APIs

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages