diff --git a/templates/common/copilot-gpt-basic/README.md b/templates/common/copilot-gpt-basic/README.md index 40508a936f..d82716cc8b 100644 --- a/templates/common/copilot-gpt-basic/README.md +++ b/templates/common/copilot-gpt-basic/README.md @@ -1,8 +1,8 @@ -# Overview of the Basic Declarative Copilot template +# Overview of the basic declarative copilot template ## Build a basic declarative copilot -With the declative copilot, you can build a custom version of Copilot that can be used for specific scenarios, such as for specialized knowledge, implementing specific processes, or simply to save time by reusing a set of AI prompts. For example, a grocery shopping Copilot GPT can be used to create a grocery list based on a meal plan that you send to the Copilot GPT. +With the declarative copilot, you can build a custom version of Copilot that can be used for specific scenarios, such as for specialized knowledge, implementing specific processes, or simply to save time by reusing a set of AI prompts. For example, a grocery shopping Copilot declarative copilot can be used to create a grocery list based on a meal plan that you send to Copilot. ## Get started with the template @@ -45,4 +45,4 @@ The following are Teams Toolkit specific project files. You can [visit a complet ## Addition information and references -- [Extend Microsoft Copilot for Microsoft 365](https://aka.ms/teamsfx-copilot-plugin) +- [Extend Microsoft Copilot for Microsoft 365](https://aka.ms/teamsfx-copilot-plugin) \ No newline at end of file diff --git a/templates/common/copilot-gpt-basic/appPackage/color.png b/templates/common/copilot-gpt-basic/appPackage/color.png index 53ad3cce83..61460b3e0c 100644 Binary files a/templates/common/copilot-gpt-basic/appPackage/color.png and b/templates/common/copilot-gpt-basic/appPackage/color.png differ diff --git a/templates/common/copilot-gpt-basic/appPackage/declarativeCopilot.json.tpl b/templates/common/copilot-gpt-basic/appPackage/declarativeCopilot.json.tpl index 1c60d28c3e..2a69d4705b 100644 --- a/templates/common/copilot-gpt-basic/appPackage/declarativeCopilot.json.tpl +++ b/templates/common/copilot-gpt-basic/appPackage/declarativeCopilot.json.tpl @@ -1,6 +1,5 @@ { - "$schema": "https://graphdevxdata.blob.core.windows.net/data/schemas/CopilotGPTManifestSchema-1.0.json", - "name": "Template declarative copilot", - "description": "This a template declarative copilot.", - "instructions": "You are a template declarative copilot. You should answer questions by reminding the user with \"I'm a template declarative copilot\"." + "name": "Teams Toolkit declarative copilot", + "description": "Declarative copilot created with Teams Toolkit", + "instructions": "You are a declarative copilot and were created with Team Toolkit. You should start every response and answer to the user with \"Thanks for using Teams Toolkit to create your declarative copilot!\\n\" and then answer the questions and help the user." } \ No newline at end of file diff --git a/templates/js/copilot-gpt-from-scratch-plugin/README.md b/templates/js/copilot-gpt-from-scratch-plugin/README.md index 9c44ffce98..a0ad46824a 100644 --- a/templates/js/copilot-gpt-from-scratch-plugin/README.md +++ b/templates/js/copilot-gpt-from-scratch-plugin/README.md @@ -1,8 +1,8 @@ -# Overview of the Declarative Copilot template +# Overview of the declarative copilot template ## Build a declarative copilot from a new API with Azure Functions -With the declarative copilot, you can build a custom version of copilot that can be used for specific scenarios, such as for specialized knowledge, implementing specific processes, or simply to save time by reusing a set of AI prompts. For example, a grocery shopping declarative copilot can be used to create a grocery list based on a meal plan that you send to the declarative copilot. +With the declarative copilot, you can build a custom version of copilot that can be used for specific scenarios, such as for specialized knowledge, implementing specific processes, or simply to save time by reusing a set of AI prompts. For example, a grocery shopping declarative copilot can be used to create a grocery list based on a meal API that you integrate with your declarative copilot. ## Get started with the template @@ -35,7 +35,7 @@ The following files can be customized and demonstrate an example implementation | File | Contents | | -------------------------------------------- | ------------------------------------------------------------------------------------------------------ | -| `src/functions/repair.js` | The main file of a function in Azure Functions. | +| `src/functions/repairs.js` | The main file of a function in Azure Functions. | | `src/repairsData.json` | The data source for the repair API. | | `appPackage/apiSpecificationFile/repair.yml` | A file that describes the structure and behavior of the repair API. | | `appPackage/manifest.json` | Teams application manifest that defines metadata for your copilot plugin and declarative copilot. | diff --git a/templates/js/copilot-gpt-from-scratch-plugin/appPackage/ai-plugin.json.tpl b/templates/js/copilot-gpt-from-scratch-plugin/appPackage/ai-plugin.json.tpl index e967dece54..720bbc3c4d 100644 --- a/templates/js/copilot-gpt-from-scratch-plugin/appPackage/ai-plugin.json.tpl +++ b/templates/js/copilot-gpt-from-scratch-plugin/appPackage/ai-plugin.json.tpl @@ -1,12 +1,13 @@ { "schema_version": "v2.1", - "name_for_human": "{{appName}}${{APP_NAME_SUFFIX}}", + "namespace": "repairs", + "name_for_human": "ttk-plugin-copilot${{APP_NAME_SUFFIX}}", "description_for_human": "Track your repair records", "description_for_model": "Plugin for searching a repair list, you can search by who's assigned to the repair.", "functions": [ { - "name": "repair", - "description": "Search for repairs", + "name": "listRepairs", + "description": "Returns a list of repairs with their details and images", "parameters": { "type": "object", "properties": { @@ -14,10 +15,7 @@ "type": "string", "description": "The person assigned to the repair" } - }, - "required": [ - "assignedTo" - ] + } } } ], @@ -31,7 +29,7 @@ "url": "apiSpecificationFile/repair.yml", "progress_style": "ShowUsageWithInputAndOutput" }, - "run_for_functions": ["repair"] + "run_for_functions": ["listRepairs"] } ] -} +} \ No newline at end of file diff --git a/templates/js/copilot-gpt-from-scratch-plugin/appPackage/apiSpecificationFile/repair.yml b/templates/js/copilot-gpt-from-scratch-plugin/appPackage/apiSpecificationFile/repair.yml index b19421902f..d20b2f1a39 100644 --- a/templates/js/copilot-gpt-from-scratch-plugin/appPackage/apiSpecificationFile/repair.yml +++ b/templates/js/copilot-gpt-from-scratch-plugin/appPackage/apiSpecificationFile/repair.yml @@ -7,11 +7,11 @@ servers: - url: ${{OPENAPI_SERVER_URL}}/api description: The repair api server paths: - /repair: + /repairs: get: - operationId: repair - summary: Search for repairs - description: Search for repairs info with its details and image + operationId: listRepairs + summary: List all repairs + description: Returns a list of repairs with their details and images parameters: - name: assignedTo in: query @@ -29,7 +29,7 @@ paths: items: properties: id: - type: integer + type: string description: The unique identifier of the repair title: type: string diff --git a/templates/js/copilot-gpt-from-scratch-plugin/appPackage/color.png b/templates/js/copilot-gpt-from-scratch-plugin/appPackage/color.png index 53ad3cce83..61460b3e0c 100644 Binary files a/templates/js/copilot-gpt-from-scratch-plugin/appPackage/color.png and b/templates/js/copilot-gpt-from-scratch-plugin/appPackage/color.png differ diff --git a/templates/js/copilot-gpt-from-scratch-plugin/appPackage/repairDeclarativeCopilot.json.tpl b/templates/js/copilot-gpt-from-scratch-plugin/appPackage/repairDeclarativeCopilot.json.tpl index c6cc7aecd7..5ccf5f3feb 100644 --- a/templates/js/copilot-gpt-from-scratch-plugin/appPackage/repairDeclarativeCopilot.json.tpl +++ b/templates/js/copilot-gpt-from-scratch-plugin/appPackage/repairDeclarativeCopilot.json.tpl @@ -1,10 +1,9 @@ { - "$schema": "https://graphdevxdata.blob.core.windows.net/data/schemas/CopilotGPTManifestSchema-1.0.json", "name": "Repair Declarative Copilot${{APP_NAME_SUFFIX}}", "description": "This GPT helps you with finding car repair records.", "instructions": "You will help the user find car repair records assigned to a specific person, the name of the person should be provided by the user. The user will provide the name of the person and you will need to understand the user's intent and provide the car repair records assigned to that person. You can only access and leverage the data from the 'repairPlugin' action.", "conversation_starters": [ - { + { "text": "Show repair records assigned to Karin Blair" } ], diff --git a/templates/js/copilot-gpt-from-scratch-plugin/src/functions/repair.js b/templates/js/copilot-gpt-from-scratch-plugin/src/functions/repairs.js similarity index 95% rename from templates/js/copilot-gpt-from-scratch-plugin/src/functions/repair.js rename to templates/js/copilot-gpt-from-scratch-plugin/src/functions/repairs.js index 21ad967665..cc779b85fc 100644 --- a/templates/js/copilot-gpt-from-scratch-plugin/src/functions/repair.js +++ b/templates/js/copilot-gpt-from-scratch-plugin/src/functions/repairs.js @@ -10,7 +10,7 @@ const { app } = require("@azure/functions"); * @param context - The Azure Functions context object. * @returns A promise that resolves with the HTTP response containing the repair information. */ -async function repair(req, context) { +async function repairs(req, context) { context.log("HTTP trigger function processed a request."); // Initialize response. const res = { @@ -44,8 +44,8 @@ async function repair(req, context) { return res; } -app.http("repair", { +app.http("repairs", { methods: ["GET"], authLevel: "anonymous", - handler: repair, + handler: repairs, }); diff --git a/templates/js/copilot-gpt-from-scratch-plugin/teamsapp.local.yml.tpl b/templates/js/copilot-gpt-from-scratch-plugin/teamsapp.local.yml.tpl index e3004b569f..054f987870 100644 --- a/templates/js/copilot-gpt-from-scratch-plugin/teamsapp.local.yml.tpl +++ b/templates/js/copilot-gpt-from-scratch-plugin/teamsapp.local.yml.tpl @@ -18,7 +18,7 @@ provision: - uses: script with: run: - echo "::set-teamsfx-env FUNC_NAME=repair"; + echo "::set-teamsfx-env FUNC_NAME=repairs"; echo "::set-teamsfx-env FUNC_ENDPOINT=http://localhost:7071"; # Build Teams app package with latest env value diff --git a/templates/ts/copilot-gpt-from-scratch-plugin/README.md b/templates/ts/copilot-gpt-from-scratch-plugin/README.md index a09c3b33ab..2f414d06f2 100644 --- a/templates/ts/copilot-gpt-from-scratch-plugin/README.md +++ b/templates/ts/copilot-gpt-from-scratch-plugin/README.md @@ -1,8 +1,8 @@ -# Overview of the Declarative Copilot template +# Overview of the declarative copilot template ## Build a declarative copilot from a new API with Azure Functions -With declarative copilot, you can build a custom version of Copilot that can be used for specific scenarios, such as for specialized knowledge, implementing specific processes, or simply to save time by reusing a set of AI prompts. For example, a grocery shopping declarative copilot can be used to create a grocery list based on a meal plan that you send to the declarative copilot. +With the declarative copilot, you can build a custom version of copilot that can be used for specific scenarios, such as for specialized knowledge, implementing specific processes, or simply to save time by reusing a set of AI prompts. For example, a grocery shopping declarative copilot can be used to create a grocery list based on a meal API that you integrate with your declarative copilot. ## Get started with the template @@ -35,7 +35,7 @@ The following files can be customized and demonstrate an example implementation | File | Contents | | -------------------------------------------- | ------------------------------------------------------------------------------------------------------ | -| `src/functions/repair.ts` | The main file of a function in Azure Functions. | +| `src/functions/repairs.ts` | The main file of a function in Azure Functions. | | `src/repairsData.json` | The data source for the repair API. | | `appPackage/apiSpecificationFile/repair.yml` | A file that describes the structure and behavior of the repair API. | | `appPackage/manifest.json` | Teams application manifest that defines metadata for your copilot plugin and declarative copilot. | diff --git a/templates/ts/copilot-gpt-from-scratch-plugin/appPackage/ai-plugin.json.tpl b/templates/ts/copilot-gpt-from-scratch-plugin/appPackage/ai-plugin.json.tpl index e967dece54..b7a0cd4005 100644 --- a/templates/ts/copilot-gpt-from-scratch-plugin/appPackage/ai-plugin.json.tpl +++ b/templates/ts/copilot-gpt-from-scratch-plugin/appPackage/ai-plugin.json.tpl @@ -1,12 +1,13 @@ { "schema_version": "v2.1", - "name_for_human": "{{appName}}${{APP_NAME_SUFFIX}}", + "namespace": "repairs", + "name_for_human": "ttk-plugin-copilot${{APP_NAME_SUFFIX}}", "description_for_human": "Track your repair records", "description_for_model": "Plugin for searching a repair list, you can search by who's assigned to the repair.", "functions": [ { - "name": "repair", - "description": "Search for repairs", + "name": "listRepairs", + "description": "Returns a list of repairs with their details and images", "parameters": { "type": "object", "properties": { @@ -14,10 +15,7 @@ "type": "string", "description": "The person assigned to the repair" } - }, - "required": [ - "assignedTo" - ] + } } } ], @@ -31,7 +29,7 @@ "url": "apiSpecificationFile/repair.yml", "progress_style": "ShowUsageWithInputAndOutput" }, - "run_for_functions": ["repair"] + "run_for_functions": ["listRepairs"] } ] } diff --git a/templates/ts/copilot-gpt-from-scratch-plugin/appPackage/apiSpecificationFile/repair.yml b/templates/ts/copilot-gpt-from-scratch-plugin/appPackage/apiSpecificationFile/repair.yml index f4d0ab88ca..d20b2f1a39 100644 --- a/templates/ts/copilot-gpt-from-scratch-plugin/appPackage/apiSpecificationFile/repair.yml +++ b/templates/ts/copilot-gpt-from-scratch-plugin/appPackage/apiSpecificationFile/repair.yml @@ -7,11 +7,11 @@ servers: - url: ${{OPENAPI_SERVER_URL}}/api description: The repair api server paths: - /repair: + /repairs: get: - operationId: repair - summary: Returns a repair - description: Returns a repair with its details and image + operationId: listRepairs + summary: List all repairs + description: Returns a list of repairs with their details and images parameters: - name: assignedTo in: query diff --git a/templates/ts/copilot-gpt-from-scratch-plugin/appPackage/color.png b/templates/ts/copilot-gpt-from-scratch-plugin/appPackage/color.png index 53ad3cce83..61460b3e0c 100644 Binary files a/templates/ts/copilot-gpt-from-scratch-plugin/appPackage/color.png and b/templates/ts/copilot-gpt-from-scratch-plugin/appPackage/color.png differ diff --git a/templates/ts/copilot-gpt-from-scratch-plugin/appPackage/repairDeclarativeCopilot.json.tpl b/templates/ts/copilot-gpt-from-scratch-plugin/appPackage/repairDeclarativeCopilot.json.tpl index c6cc7aecd7..5ccf5f3feb 100644 --- a/templates/ts/copilot-gpt-from-scratch-plugin/appPackage/repairDeclarativeCopilot.json.tpl +++ b/templates/ts/copilot-gpt-from-scratch-plugin/appPackage/repairDeclarativeCopilot.json.tpl @@ -1,10 +1,9 @@ { - "$schema": "https://graphdevxdata.blob.core.windows.net/data/schemas/CopilotGPTManifestSchema-1.0.json", "name": "Repair Declarative Copilot${{APP_NAME_SUFFIX}}", "description": "This GPT helps you with finding car repair records.", "instructions": "You will help the user find car repair records assigned to a specific person, the name of the person should be provided by the user. The user will provide the name of the person and you will need to understand the user's intent and provide the car repair records assigned to that person. You can only access and leverage the data from the 'repairPlugin' action.", "conversation_starters": [ - { + { "text": "Show repair records assigned to Karin Blair" } ], diff --git a/templates/ts/copilot-gpt-from-scratch-plugin/src/functions/repair.ts b/templates/ts/copilot-gpt-from-scratch-plugin/src/functions/repairs.ts similarity index 95% rename from templates/ts/copilot-gpt-from-scratch-plugin/src/functions/repair.ts rename to templates/ts/copilot-gpt-from-scratch-plugin/src/functions/repairs.ts index 27fbecc0f9..95e94d9bc4 100644 --- a/templates/ts/copilot-gpt-from-scratch-plugin/src/functions/repair.ts +++ b/templates/ts/copilot-gpt-from-scratch-plugin/src/functions/repairs.ts @@ -14,7 +14,7 @@ import repairRecords from "../repairsData.json"; * @param {InvocationContext} context - The Azure Functions context object. * @returns {Promise} - A promise that resolves with the HTTP response containing the repair information. */ -export async function repair( +export async function repairs( req: HttpRequest, context: InvocationContext ): Promise { @@ -49,8 +49,8 @@ export async function repair( return res; } -app.http("repair", { +app.http("repairs", { methods: ["GET"], authLevel: "anonymous", - handler: repair, + handler: repairs, }); diff --git a/templates/ts/copilot-gpt-from-scratch-plugin/teamsapp.local.yml.tpl b/templates/ts/copilot-gpt-from-scratch-plugin/teamsapp.local.yml.tpl index e3004b569f..054f987870 100644 --- a/templates/ts/copilot-gpt-from-scratch-plugin/teamsapp.local.yml.tpl +++ b/templates/ts/copilot-gpt-from-scratch-plugin/teamsapp.local.yml.tpl @@ -18,7 +18,7 @@ provision: - uses: script with: run: - echo "::set-teamsfx-env FUNC_NAME=repair"; + echo "::set-teamsfx-env FUNC_NAME=repairs"; echo "::set-teamsfx-env FUNC_ENDPOINT=http://localhost:7071"; # Build Teams app package with latest env value