Note
This feature is currently in 公共预览版 and is subject to change.
Organization custom instructions are currently only supported for GitHub Copilot Chat in GitHub.
有关可用于自定义 GitHub Copilot Chat 回复的方法的概述,请参阅“About customizing GitHub Copilot Chat responses”。
关于 GitHub Copilot Chat 的组织自定义指令
组织所有者可以为 GitHub Copilot Chat 添加指令,以便根据组织的需求和偏好定制聊天回复。 例如,可以选择始终让 Copilot Chat 以公司的首选语言或特定风格进行回复。 以下是可以添加的说明的一些示例:
Always respond in Spanish.
Do not generate code blocks in responses.
For questions related to security, use the Security Docs Knowledge Base.
Note
- It is possible for multiple types of custom instructions to apply to a conversation. Personal instructions take the highest priority, followed by repository instructions, with organization instructions prioritized last. However, all sets of relevant instructions are still combined and provided to Copilot Chat.
- Whenever possible, you should avoid providing conflicting sets of instructions. If you are concerned about response quality, you can also choose to temporarily disable repository instructions. See 为 GitHub Copilot 添加存储库自定义说明.
添加组织自定义指令
可以通过组织设置添加组织自定义指令。
-
在 GitHub 的右上角,选择个人资料照片,然后单击“ 你的组织”****。
-
在组织旁边,单击“设置”。
-
在左侧边栏中,单击 Copilot,然后单击“Custom instructions”********。
-
在“Preferences and instructions”下,将自然语言的指令添加到文本框中。
可以采用任何你偏好的格式来编写指令。 例如,可以将指令写成一整段文本,也可以每条指令另起一行,或者用空行将它们分隔开来。
-
单击“保存更改”。 说明现已生效并将一直保持有效,直至被更改或删除。
若要查看指令的实际效果,请转到 https://github.com/copilot 并开始对话。