pac copilot
Tools and utilities for copilot management
Command | Description |
---|---|
pac copilot create | Creates a new copilot using an existing template file as the reference. |
pac copilot extract-template | Extracts a template file from an existing copilot in an environment. |
pac copilot extract-translation | Extracts file containing localized content for one or more bots. |
pac copilot list | List of copilots in the current or target Dataverse environment. |
pac copilot merge-translation | Merge files containing localized content for one or more bots. |
pac copilot model list | AI Builder models in the current environment. |
pac copilot model predict | Sends text or prompt to AI Model |
pac copilot model prepare-fetch | Takes the FetchXML file from the AI Large Language Model (LLM) and prepares it for execution against the current environment. |
pac copilot publish | Publish a Custom Copilot |
pac copilot status | Poll the deployment status of a specified copilot in the current or target Dataverse environment. |
Creates a new copilot using an existing template file as the reference.
The display name of the new copilot
The schema name (unique name) of the new copilot.
Name of the solution.
Source yaml file containing the copilot template that was extracted using the extract-template command.
Specifies the target Dataverse. The value may be a Guid or absolute https URL. When not specified, the active organization selected for the current auth profile will be used.
Extracts a template file from an existing copilot in an environment.
This command extracts a template file from an existing copilot in an environment.
pac copilot extract-template `
--environment 2e250e7a-5607-4fea-aa4e-1aeb7bf79118 `
--bot 9ee3f7aa-ab79-4cf6-a726-d85c8c18cc3e `
--templateFileName NewTestCopilot.yaml
The command returns output like the following for a copilot using the English and German languages:
Connected as user@contoso.org
Loaded 34 components for bot 'New Test Copilot ' with id 9ee3f7aa-ab79-4cf6-a726-d85c8c18cc3e. Primary language: English, supported languages: German
New Test Copilot -> C:\Users\user\NewTestCopilot.yaml
The Copilot ID or schema name (unique name found in Bot Details or file name in solution explorer).
Location of the yaml file to write the copilot template to.
Specifies the target Dataverse. The value may be a Guid or absolute https URL. When not specified, the active organization selected for the current auth profile will be used.
Allow overwrite of the output data file if it already exists.
This parameter requires no value. It's a switch.
Extracts file containing localized content for one or more bots.
This command extracts a file containing localized content for one or more copilots.
pac copilot extract-translation `
--environment 2e250e7a-5607-4fea-aa4e-1aeb7bf79118 `
--bot 9ee3f7aa-ab79-4cf6-a726-d85c8c18cc3e `
--all `
--outdir . `
--format json
The command returns output like the following:
Connected as user@contoso.org
Loaded 32 components for bot 'New Test Copilot' with id 9ee3f7aa-ab79-4cf6-a726-d85c8c18cc3e. Primary language: English, supported languages: German
Write localization files for all supported languages. By default, only the primary language is written.
This parameter requires no value. It's a switch.
The Copilot ID or schema name (unique name found in Bot Details or file name in solution explorer).
Specifies the target Dataverse. The value may be a Guid or absolute https URL. When not specified, the active organization selected for the current auth profile will be used.
The file format in which to write localized files, either 'resx' or 'json'. The default is 'resx'.
The output directory to write to.
Allow overwrite of the output data file if it already exists.
This parameter requires no value. It's a switch.
Source solution directory. When specified, will ignore the connected environment when looking for bots and instead look for content in the solution folder.
List of copilots in the current or target Dataverse environment.
This command lists all copilots in the current or target Dataverse environment.
pac copilot list --environment 2e250e7a-5607-4fea-aa4e-1aeb7bf79118
The command returns output like the following:
Name Bot ID Component State Is Managed Solution ID Status Code State Code
Ask Me Anything Copilot 584e012c-dc95-46d6-af5a-1263b6a44342 Published Unmanaged 285af946-6383-49a0-8615-4e2afafeaf38 Active Provisioned
New Test Copilot 9ee3f7aa-ab79-4cf6-a726-d85c8c18cc3e Published Unmanaged 285af946-6383-49a0-8615-4e2afafeaf38 Active Provisioned
Specifies the target Dataverse. The value may be a Guid or absolute https URL. When not specified, the active organization selected for the current auth profile will be used.
Merge files containing localized content for one or more bots.
This command merges files containing localized content for one or more copilots.
pac copilot merge-translation `
--environment 2e250e7a-5607-4fea-aa4e-1aeb7bf79118 `
--file ms_store_newTestCopilot.de-DE.json `
--solution SolutionName
The command returns output like the following when updating the German language:
Connected as user@contoso.org
Loading language German into bot 'ms_store_newTestCopilot' (New Test Copilot) from file 'C:\Users\user\ms_store_newTestCopilot'. 0 key(s) were missing, 0 value(s) were not used. Use the --verbose switch to get more details.
Updated 16 out of 16 components.
Learn about how to manage errors from the merge-translation command
Specifies the target Dataverse. The value may be a Guid or absolute https URL. When not specified, the active organization selected for the current auth profile will be used.
The list of files that contain translations. Glob patterns are supported.
Name of the solution.
Source solution directory. When specified, will ignore the connected environment when looking for bots and instead look for content in the solution folder.
Output more diagnostic information during data import/export
This parameter requires no value. It's a switch.
Does not execute the command, but outputs the details of what would happen.
This parameter requires no value. It's a switch.
Based on the example above, if one error exists in the file used to update the copilot, the output looks like:
Connected as user@contoso.org
Loading language German into bot 'ms_store_newTestCopilot' (New Test Copilot) from file 'C:\Users\user\ms_store_newTestCopilot'. 1 key(s) were missing, 1 value(s) were not used. Use the --verbose switch to get more details.
Updated 16 out of 16 components.
The --verbose
flag adds details about the error:
Connected as user@contoso.org
Missing translation key: 'dialog(ms_store_newTestCopilot.topic.Lesson2)'.'trigger(main)'.'action(LbWwpD)'.Entity.Definition.'closedListItem(Redmond)'.DisplayName.
Unused translation: 'dialog(ms_store_newTestCopilot.topic.Lesson2)'.'trigger(main)'.'action(LbWwpD)'.Entity.Definition.'closedListItem(Redmont)'.DisplayName, value: Redmond
Loading language German into bot 'ms_store_newTestCopilot' (New Test Copilot) from file 'C:\Users\user\ms_store_newTestCopilot'. 1 key(s) were missing, 1 value(s) were not used. Use the --verbose switch to get more details.
Updated 16 out of 16 components.
AI Builder models in the current environment.
This command lists all AI Builder models.
pac copilot model list --environment 2e250e7a-5607-4fea-aa4e-1aeb7bf79118
The command returns output like the following:
Id State Name
32a9e265-1149-4155-af54-d2856d2b83f5 Active Document Processing 2023/09/20, 12:21:40
2bcd7b94-50bc-4767-af4a-367c63fb5487 Inactive AI Classify
4e72b59a-17d6-451e-8657-89fbdec56d7a Inactive AI Extract
572f57a7-7a8f-49fc-adb4-331e02c509a6 Inactive AI Reply
b9b636cf-9748-47a7-b617-6df5f00f5151 Inactive AI Sentiment
c076eac8-f218-4feb-8ad1-7ee4fb039419 Inactive AI Summarize
a0440df3-2656-e911-8194-000d3a6cd5a5 Inactive BusinessCard model
62d1e848-5ca7-490a-94bf-79baabe85ef4 Inactive CategoryClassification model
4da7ec17-5c26-4fd2-9ddb-be4f7eda21a9 Inactive DataGenieEmailAddressValidation
51f4da11-5702-401d-b53a-9638744e8ac9 Inactive Document Layout Analysis Model
d1bb8d57-24ab-3b36-9592-bd792e153b79 Inactive DVCopilotQueryModel
3fbd4e5c-32bc-40fc-acce-59c2821cf113 Inactive Empty Dynamic Prompt
8c281981-c5d6-484f-bac7-4924ddd0b8ae Inactive EntityExtraction model
a1afa5d4-7a44-4c31-9cd2-e852a78431fa Inactive GptPromptEngineering model
2c444168-f8b1-4c6a-9313-2d9c03be6fea Inactive Id Scanning Model
77365cfa-7021-4cb7-a9b2-dc9823cde772 Inactive ImageDescription model
aef1bdd2-2a74-4f74-b4eb-9dfa22e35ded Inactive Invoice Model
5ed4d0fd-e9d4-4026-b09b-71f83ea90c60 Inactive Invoice Processing Model
c8425db7-c5a7-4226-b38e-c93a044c0fe1 Inactive KeyPhraseExtraction model
17a6f893-5b0b-4867-8fac-fb2eda9080b2 Inactive LanguageDetection model
046ab801-2756-e911-8194-000d3a6cd5a5 Inactive ObjectDetectionProposal model
892d3698-ba03-3d15-8e9e-843ca4ac5e7d Inactive PowerAppsAppCopilotModel
baa44529-bebe-49e6-837a-80bee63b0d2c Inactive Receipt Scanning Model
f1c549c2-a97e-47a5-b612-c5c2bab0f163 Inactive SentimentAnalysis model
7f8a7856-003a-3662-9871-0000d7674433 Inactive SimsModel
86419a67-205a-454f-b6fc-601394f2786d Inactive TextRecognition model
6225038a-8b5a-4913-bfd2-d8236f4102ba Inactive TextTranslation model
02e1fca3-232a-4f58-8c93-bdd8c9cd6de9 Inactive TextTranslationInternal model
Specifies the target Dataverse. The value may be a Guid or absolute https URL. When not specified, the active organization selected for the current auth profile will be used.
Sends text or prompt to AI Model
Specifies the target Dataverse. The value may be a Guid or absolute https URL. When not specified, the active organization selected for the current auth profile will be used.
AI Builder model Id
Full or partial AI Model name
Prompt to send to AI Model
Text to send to AI Model
Takes the FetchXML file from the AI Large Language Model (LLM) and prepares it for execution against the current environment.
Input FetchXML file that usually comes from AI LLM.
Output FetchXML file that is ready to execute against the current environment.
Specifies the target Dataverse. The value may be a Guid or absolute https URL. When not specified, the active organization selected for the current auth profile will be used.
Publish a Custom Copilot
The Copilot ID or schema name (unique name found in Bot Details or file name in solution explorer).
Specifies the target Dataverse. The value may be a Guid or absolute https URL. When not specified, the active organization selected for the current auth profile will be used.
Poll the deployment status of a specified copilot in the current or target Dataverse environment.
This command polls the deployment status of a specified copilot in the current or target Dataverse environment.
pac copilot status `
--environment 2e250e7a-5607-4fea-aa4e-1aeb7bf79118 `
--bot-id 9ee3f7aa-ab79-4cf6-a726-d85c8c18cc3e
The command returns output like the following:
Connected as user@contoso.org
Connected to... Contoso Organization
Virtual Agent New Bot German with ID 9ee3f7aa-ab79-4cf6-a726-d85c8c18cc3e has been provisioned.
The ID of a copilot (Chatbot).
Specifies the target Dataverse. The value may be a Guid or absolute https URL. When not specified, the active organization selected for the current auth profile will be used.
Microsoft Power Platform CLI Command Groups
Microsoft Power Platform CLI overview