You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
https://docs.github.com/en/copilot/building-copilot-extensions/about-building-copilot-extensions
- Change @buffer and @Buffers to #buffer and #buffers
- Add support for @agent agent selection
- Add support for config.agent for specifying default agent
- Add :CopilotChatAgents for listing agents (and showing selected agent)
- Remove :CopilotChatModel, instead show which model is selected in :CopilotChatModels
- Remove early errors from curl so we can actually get response body for the error
- Add info to README about models, agents and contexts
Closes#466
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
Copy file name to clipboardExpand all lines: README.md
+38-4Lines changed: 38 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -110,7 +110,7 @@ Verify "[Copilot chat in the IDE](https://github.com/settings/copilot)" is enabl
110
110
-`:CopilotChatLoad <name>?` - Load chat history from file
111
111
-`:CopilotChatDebugInfo` - Show debug information
112
112
-`:CopilotChatModels` - View and select available models. This is reset when a new instance is made. Please set your model in `init.lua` for persistence.
113
-
-`:CopilotChatModel` - View the currently selected model.
113
+
-`:CopilotChatAgents` - View and select available agents. This is reset when a new instance is made. Please set your agent in `init.lua` for persistence.
114
114
115
115
#### Commands coming from default prompts
116
116
@@ -122,6 +122,39 @@ Verify "[Copilot chat in the IDE](https://github.com/settings/copilot)" is enabl
122
122
-`:CopilotChatTests` - Please generate tests for my code
123
123
-`:CopilotChatCommit` - Write commit message for the change with commitizen convention
124
124
125
+
### Models, Agents and Contexts
126
+
127
+
#### Models
128
+
129
+
You can list available models with `:CopilotChatModels` command. Model determines the AI model used for the chat.
130
+
Default models are:
131
+
132
+
-`gpt-4o` - This is the default Copilot Chat model. It is a versatile, multimodal model that excels in both text and image processing and is designed to provide fast, reliable responses. It also has superior performance in non-English languages. Gpt-4o is hosted on Azure.
133
+
-`claude-3.5-sonnet` - This model excels at coding tasks across the entire software development lifecycle, from initial design to bug fixes, maintenance to optimizations. GitHub Copilot uses Claude 3.5 Sonnet hosted on Amazon Web Services.
134
+
-`o1-preview` - This model is focused on advanced reasoning and solving complex problems, in particular in math and science. It responds more slowly than the gpt-4o model. You can make 10 requests to this model per day. o1-preview is hosted on Azure.
135
+
-`o1-mini` - This is the faster version of the o1-preview model, balancing the use of complex reasoning with the need for faster responses. It is best suited for code generation and small context operations. You can make 50 requests to this model per day. o1-mini is hosted on Azure.
136
+
137
+
For more information about models, see [here](https://docs.github.com/en/copilot/using-github-copilot/asking-github-copilot-questions-in-your-ide#ai-models-for-copilot-chat)
138
+
You can use more models from [here](https://github.com/marketplace/models) by using `@models` agent from [here](https://github.com/marketplace/models-github) (example: `@models Using Mistral-small, what is 1 + 11`)
139
+
140
+
#### Agents
141
+
142
+
Agents are used to determine the AI agent used for the chat. You can list available agents with `:CopilotChatAgents` command.
143
+
You can set the agent in the prompt by using `@` followed by the agent name.
144
+
Default "noop" agent is `copilot`.
145
+
146
+
For more information about extension agents, see [here](https://docs.github.com/en/copilot/using-github-copilot/using-extensions-to-integrate-external-tools-with-copilot-chat)
147
+
You can install more agents from [here](https://github.com/marketplace?type=apps&copilot_app=true)
148
+
149
+
#### Contexts
150
+
151
+
Contexts are used to determine the context of the chat.
152
+
You can set the context in the prompt by using `#` followed by the context name.
153
+
Supported contexts are:
154
+
155
+
-`buffers` - Includes all open buffers in chat context
156
+
-`buffer` - Includes only the current buffer in chat context
157
+
125
158
### API
126
159
127
160
```lua
@@ -202,8 +235,10 @@ Also see [here](/lua/CopilotChat/config.lua):
202
235
allow_insecure=false, -- Allow insecure server connections
203
236
204
237
system_prompt=prompts.COPILOT_INSTRUCTIONS, -- System prompt to use
205
-
model='gpt-4o', -- GPT model to use, see ':CopilotChatModels' for available models
206
-
temperature=0.1, -- GPT temperature
238
+
model='gpt-4o', -- Default model to use, see ':CopilotChatModels' for available models
239
+
agent='copilot', -- Default agent to use, see ':CopilotChatAgents' for available agents (can be specified manually in prompt via @).
240
+
context=nil, -- Default context to use, 'buffers', 'buffer' or none (can be specified manually in prompt via #).
241
+
temperature=0.1, -- GPT result temperature
207
242
208
243
question_header='## User ', -- Header to use for user questions
209
244
answer_header='## Copilot ', -- Header to use for AI answers
@@ -218,7 +253,6 @@ Also see [here](/lua/CopilotChat/config.lua):
218
253
clear_chat_on_new_prompt=false, -- Clears chat on every new prompt
219
254
highlight_selection=true, -- Highlight selection in the source buffer when in the chat window
220
255
221
-
context=nil, -- Default context to use, 'buffers', 'buffer' or none (can be specified manually in prompt via @).
222
256
history_path=vim.fn.stdpath('data') ..'/copilotchat_history', -- Default path to stored history
223
257
callback=nil, -- Callback to use when ask response is received
0 commit comments