Skip to content

Commit

Permalink
refactor: update copilot related templates (#11511)
Browse files Browse the repository at this point in the history
  • Loading branch information
huimiu authored Apr 30, 2024
1 parent 36f714a commit 039039f
Show file tree
Hide file tree
Showing 17 changed files with 44 additions and 51 deletions.
6 changes: 3 additions & 3 deletions templates/common/copilot-gpt-basic/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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)
Binary file modified templates/common/copilot-gpt-basic/appPackage/color.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -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."
}
6 changes: 3 additions & 3 deletions templates/js/copilot-gpt-from-scratch-plugin/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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. |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
{
"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": {
"assignedTo": {
"type": "string",
"description": "The person assigned to the repair"
}
},
"required": [
"assignedTo"
]
}
}
}
],
Expand All @@ -31,7 +29,7 @@
"url": "apiSpecificationFile/repair.yml",
"progress_style": "ShowUsageWithInputAndOutput"
},
"run_for_functions": ["repair"]
"run_for_functions": ["listRepairs"]
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -29,7 +29,7 @@ paths:
items:
properties:
id:
type: integer
type: string
description: The unique identifier of the repair
title:
type: string
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -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"
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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,
});
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions templates/ts/copilot-gpt-from-scratch-plugin/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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. |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
{
"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": {
"assignedTo": {
"type": "string",
"description": "The person assigned to the repair"
}
},
"required": [
"assignedTo"
]
}
}
}
],
Expand All @@ -31,7 +29,7 @@
"url": "apiSpecificationFile/repair.yml",
"progress_style": "ShowUsageWithInputAndOutput"
},
"run_for_functions": ["repair"]
"run_for_functions": ["listRepairs"]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -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"
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import repairRecords from "../repairsData.json";
* @param {InvocationContext} context - The Azure Functions context object.
* @returns {Promise<Response>} - 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<HttpResponseInit> {
Expand Down Expand Up @@ -49,8 +49,8 @@ export async function repair(
return res;
}

app.http("repair", {
app.http("repairs", {
methods: ["GET"],
authLevel: "anonymous",
handler: repair,
handler: repairs,
});
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 039039f

Please sign in to comment.