Skip to content

Generative AI playground using GitHub Models, OpenAI API and JavaScript. Try AI models in your browser!

License

Notifications You must be signed in to change notification settings

Azure-Samples/github-models-javascript-playground

Repository files navigation

GitHub Models JavaScript Playground

Open project in GitHub Codespaces Node version JavaScript License

⭐ If you like this repo, star it on GitHub — it helps a lot!

OverviewUsageRun the samplesNext stepsResources

Overview

Try out generative AI models right in your browser for free using this playground! ✨

Using GitHub Codespaces and GitHub Models, you'll be able to run LLMs (Large Language Models) such as Open AI GPT-4o directly in your browser, without having to install anything.

Usage

This project is designed to be opened in GitHub Codespaces, which provides you a pre-configured environment to run the code and AI models. Follow these steps to get started:

  1. Click on the "Codespaces: Open" button:
    Open project in GitHub Codespaces
  2. Once the Codespace is loaded, it should have everything pre-installed, including the OpenAI Node SDK.
  3. Open the file notebook.ipynb in the editor and follow the instructions.

Tip

While you're following the instructions of the interactive notebook, you can run the code cells by clicking on the "Execute cell" (▶️) button in the top left corner of the cell. You can also edit the code and run it again to see how the model responds to different inputs. Screenshot of a code cell highlighting the "executing cell" button

Run the samples

In the samples folder of this repository, you'll find examples of how to use generative AI models using the OpenAI Node.js SDK. You can run them by executing the following command in the terminal:

tsx samples/<filename>

Alternatively, you can open a sample file in the editor and run it directly by clicking the "Run" (▶️) button in the top right corner of the editor.

Next steps

Once you're comfortable with this playground, you can explore more advanced topics and tutorials:

When you're ready to explore how you can deploy generative using Azure, you should check out these resources:

Resources

Here are some additional resources to help you learn more about generative AI:

Other playgrounds

About

Generative AI playground using GitHub Models, OpenAI API and JavaScript. Try AI models in your browser!

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks