| title | Asking GitHub Copilot questions in GitHub | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| shortTitle | Chat in GitHub | |||||||||||||
| intro | Get instant answers about your code, repositories, and development questions — right from {% data variables.product.github %}. | |||||||||||||
| versions |
|
|||||||||||||
| redirect_from |
|
|||||||||||||
| contentType | how-tos | |||||||||||||
| category |
|
{% data variables.copilot.copilot_chat_short %} is available from any page on {% data variables.product.github %}. Some questions work best in a specific context, such as a repository, issue, or pull request.
{% data reusables.copilot.access-chat-instructions %}
-
In the prompt box, type a question and press Enter.
Some examples of general questions you could ask are:
- {% prompt %}What are the advantages of the Go programming language?{% endprompt %}
- {% prompt %}What is Agile software development?{% endprompt %}
- {% prompt %}What is the most popular JavaScript framework?{% endprompt %}
- {% prompt %}Give me some examples of regular expressions.{% endprompt %}
- {% prompt %}Write a bash script to output today's date.{% endprompt %}
{% data reusables.copilot.stop-response-generation %}
- Within a conversation thread, you can ask follow-up questions. {% data variables.product.prodname_copilot_short %} will answer within the context of the conversation.
Note
This feature is currently in {% data variables.release-phases.public_preview %} and subject to change.
{% data variables.product.prodname_copilot_short %} may generate files as part of its response, which you can view, edit, and download from the side panel.
You can choose from a selection of AI models, each with different strengths. Different models have different premium request multipliers, which affect your monthly usage allowance. For details, see AUTOTITLE.
{% data reusables.copilot.model-picker-enable-alternative-models %}
- At the bottom of {% data variables.copilot.copilot_chat_short %}, select the CURRENT-MODEL {% octicon "chevron-down" aria-hidden="true" aria-label="chevron-down" %} dropdown menu, then click the AI model of your choice.
After submitting a prompt, you can also regenerate a response using a different model by clicking the retry icon ({% octicon "sync" aria-label="The re-run icon" %}) below the response. You can switch between responses to compare results.
Subthreads are branches of a conversation that let you explore aspects of a topic, or new topics, all within the same thread.
To create a subthread, hover over one of your previous questions and click the {% octicon "pencil" aria-label="Edit message" %} button. Edit the question, then click Send. You cannot edit any attachments.
The response to your edited question is displayed in a new subthread. An edit counter appears below the question. Hover over the counter, then click {% octicon "chevron-left" aria-label="Previous response" %} or {% octicon "chevron-right" aria-label="Next response" %} to navigate between subthreads.
[!NOTE] This feature is currently in {% data variables.release-phases.public_preview %} and subject to change.
You can attach images to your prompts by pasting, dragging, or clicking {% octicon "plus" aria-label="Add attachment" %} in the prompt box and then selecting {% octicon "file-code" aria-hidden="true" %} Upload from computer. Select a model that supports images from the model picker. For supported file types and example questions, see AUTOTITLE.