Skip to content

Commit cb9869b

Browse files
GitHub Models CLI extension [Public Beta] (#52690)
1 parent 98a562a commit cb9869b

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

content/github-models/prototyping-with-ai-models.md

+34
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,40 @@ The steps to use each model are similar. In general, you will need to:
5757

5858
The free API usage is rate limited. See [Rate limits](#rate-limits) below.
5959

60+
{% ifversion github-models-cli %}
61+
62+
## Experimenting with AI models using {% data variables.product.prodname_cli %}
63+
64+
>[!NOTE] The {% data variables.product.prodname_github_models %} CLI extension is in {% data variables.release-phases.public_preview %} and subject to change.
65+
66+
You can use {% data variables.product.prodname_github_models %} with the {% data variables.product.prodname_cli %} to experiment with AI models from the command line.
67+
68+
### Prerequisites
69+
70+
To use the {% data variables.product.prodname_github_models %} CLI extension, you need to have {% data variables.product.prodname_cli %} installed. {% data reusables.cli.cli-installation %}
71+
72+
### Installing the extension
73+
74+
1. If you have not already authenticated to the {% data variables.product.prodname_cli %}, run the following command in your terminal.
75+
76+
```shell copy
77+
gh auth login
78+
```
79+
80+
1. To install the {% data variables.product.prodname_github_models %} extension, run the following command.
81+
82+
```shell copy
83+
gh extension install https://github.com/github/gh-models
84+
```
85+
86+
### Using the extension
87+
88+
To see a list of all available commands, run `gh models help`. To run the extension in interactive mode, run `gh models run`. This will prompt you to select a model and then to enter a prompt. The extension will then return a response from the model.
89+
90+
For more information about what you can do with {% data variables.product.prodname_cli %}, see the [{% data variables.product.prodname_cli %} manual](https://cli.github.com/manual).
91+
92+
{% endif %}
93+
6094
## Going to production
6195

6296
The rate limits for the playground and free API usage are intended to help you experiment with models and develop your AI application. Once you are ready to bring your application to production, you can use a token from a paid Azure account instead of your {% data variables.product.company_short %} {% data variables.product.pat_generic %}. You don't need to change anything else in your code. For more information, see the [Azure AI](https://ai.azure.com/github/model/docs) documentation.

data/features/github-models-cli.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Reference: #16198
2+
# Documentation for the GitHub Models CLI extension
3+
versions:
4+
fpt: '*'
5+
ghec: '*'

0 commit comments

Comments
 (0)