diff --git a/assets/images/help/models/model-playground-code-tab.png b/assets/images/help/models/model-playground-code-tab.png new file mode 100644 index 000000000000..f63e8832cd2e Binary files /dev/null and b/assets/images/help/models/model-playground-code-tab.png differ diff --git a/content/github-models/prototyping-with-ai-models.md b/content/github-models/prototyping-with-ai-models.md index a8c783a5b8e0..a420aa22ce02 100644 --- a/content/github-models/prototyping-with-ai-models.md +++ b/content/github-models/prototyping-with-ai-models.md @@ -12,40 +12,52 @@ See also [AUTOTITLE](/github-models/responsible-use-of-github-models). ## Finding AI models -To find AI models, go to [{% data variables.product.prodname_marketplace %}](https://github.com/marketplace/models), then click **{% octicon "ai-model" aria-hidden="true" %} Models** in the sidebar. +To find an AI model: -To view details about a model, click on the model's name. +{% data reusables.models.steps-to-open-model-playground %} + +The model is opened in the model playground. Details of the model are displayed in the sidebar on the right. If the sidebar is not displayed, expand it by clicking the **{% octicon "sidebar-expand" aria-label="Show parameters setting" %}** icon at the right of the playground. {% data reusables.models.o1-models-preview-note %} ## Experimenting with AI models in the playground +The AI model playground is a free resource that allows you to adjust model parameters and submit prompts to see how a model responds. + >[!NOTE] > -> The playground is in {% data variables.release-phases.public_preview %} and subject to change. To request access, [join the waitlist](https://github.com/marketplace/models/waitlist). +> * The model playground is in {% data variables.release-phases.public_preview %} and subject to change. +> * The playground is rate limited. See [Rate limits](#rate-limits) below. + +To adjust parameters for the model, in the playground, select the **Parameters** tab in the sidebar. + +To see code that corresponds to the parameters that you selected, switch from the **Chat** tab to the **Code** tab. -{% data variables.product.prodname_marketplace %} provides a free playground where you can adjust model parameters and submit prompts to see how the model responds. +![Screenshot of the 'Code' tab button, highlighted with a dark orange outline, at the top left of the playground.](/assets/images/help/models/model-playground-code-tab.png) -To open the playground, go to [{% data variables.product.prodname_marketplace %}](https://github.com/marketplace/models), then click **{% octicon "ai-model" aria-hidden="true" %} Models** in the sidebar. Click on a model's name, then click **{% octicon "command-palette" aria-hidden="true" %} Playground**. +### Comparing models -To adjust parameters for the model, select the **Parameters** tab in the sidebar. To see code that corresponds to the parameters that you selected, switch from the **Chat** tab to the **Code** tab. +You can submit a prompt to two models at the same time and compare the responses. -You can also compare two models at once. In the menu bar for your model, click **{% octicon "plus" aria-hidden="true" %} Compare**, then select a model for comparison using the **Model: MODEL-NAME** {% octicon "chevron-down" aria-hidden="true" %} dropdown menu in the second chat window. When you type a prompt in either chat window, the prompt will automatically be mirrored to the other window, and you can compare the responses from each model. +With one model open in the playground, click **Compare**, then, in the dropdown menu, select a model for comparison. The selected model opens in a second chat window. When you type a prompt in either chat window, the prompt is mirrored to the other window. The prompts are submitted simultaneously so that you can compare the responses from each model. -The playground is rate limited. See [Rate limits](#rate-limits) below. +Any parameters you set are used for both models. ## Experimenting with AI models using the API >[!NOTE] > -> The free API usage is in {% data variables.release-phases.public_preview %} and subject to change. To request access, [join the waitlist](https://github.com/marketplace/models/waitlist). +> The free API usage is in {% data variables.release-phases.public_preview %} and subject to change. {% data variables.product.company_short %} provides free API usage so that you can experiment with AI models in your own application. -To learn how to use a model in your application, go to [{% data variables.product.prodname_marketplace %}](https://github.com/marketplace/models), then click **{% octicon "ai-model" aria-hidden="true" %} Models** in the sidebar. Click on a model's name, then click **{% octicon "command-palette" aria-hidden="true" %} Playground**. In the menu bar at the top of your chat window, click **{% octicon "code" aria-hidden="true" %} Code**. - The steps to use each model are similar. In general, you will need to: +{% data reusables.models.steps-to-open-model-playground %} + + The model opens in the model playground. + +1. Click the **Code** tab. 1. Optionally, use the language dropdown to select the programming language. 1. Optionally, use the SDK dropdown to select which SDK to use. @@ -67,7 +79,7 @@ You can save and share your progress in the playground with presets. Presets sav * Your parameters * Your chat history (optional) -To create a preset for your current context, select the **Preset: PRESET-NAME** {% octicon "triangle-down" aria-hidden="true" %} dropdown menu, then click **{% octicon "plus" aria-hidden="true" %} Create new preset**. You need to name your preset, and you can also choose to provide a preset description, include your chat history, and allow your preset to be shared. +To create a preset for your current context, select **Preset: PRESET-NAME** {% octicon "triangle-down" aria-hidden="true" %} at the top right of the playground, then click **{% octicon "plus" aria-hidden="true" %} Create new preset**. You need to name your preset, and you can also choose to provide a preset description, include your chat history, and allow your preset to be shared. There are two ways to load a preset: * Select the **Preset: PRESET-NAME** {% octicon "triangle-down" aria-hidden="true" %} dropdown menu, then click the preset you want to load. diff --git a/data/reusables/models/steps-to-open-model-playground.md b/data/reusables/models/steps-to-open-model-playground.md new file mode 100644 index 000000000000..1fe45a6265b8 --- /dev/null +++ b/data/reusables/models/steps-to-open-model-playground.md @@ -0,0 +1,5 @@ +1. Go to [github.com/marketplace/models](https://github.com/marketplace/models). +1. Click **Model: Select a Model** at the top left of the page. +1. Choose a model from the dropdown menu. + + Alternatively, in the dropdown menu, click **View all models**, click a model in the Marketplace, then click **{% octicon "command-palette" aria-hidden="true" %} Playground**.