This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://developer.microsoft.com/json-schemas/copilot/declarative-agent/v1.2/schema.json", | |
"version": "v1.2", | |
"name": "MyFirstAgent${{APP_NAME_SUFFIX}}", | |
"description": "This declarative agent helps you with finding car repair records.", | |
"instructions": "$[file('instruction.txt')]", | |
"conversation_starters": [ | |
{ | |
"text": "Show repair records assigned to Karin Blair" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://developer.microsoft.com/json-schemas/copilot/plugin/v2.2/schema.json", | |
"schema_version": "v2.2", | |
"namespace": "repairs", | |
"name_for_human": "MyFirstAgent${{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": "listRepairs", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: 3.0.0 | |
info: | |
title: Repair Service | |
description: A simple service to manage repairs | |
version: 1.0.0 | |
servers: | |
- url: ${{OPENAPI_SERVER_URL}}/api | |
description: The repair api server | |
paths: | |
/repairs: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
app, | |
HttpRequest, | |
HttpResponseInit, | |
InvocationContext, | |
} from "@azure/functions"; | |
import repairRecords from "../repairsData.json"; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You are a declarative agent 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 agent!\n\n" and then answer the questions and help the user. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://developer.microsoft.com/json-schemas/copilot/declarative-agent/v1.2/schema.json", | |
"version": "v1.2", | |
"name": "MyFirstAgent", | |
"description": "Declarative agent created with Teams Toolkit", | |
"instructions": "$[file('instruction.txt')]", | |
"conversation_starters": [ | |
{ | |
"title": "Hi", | |
"text": "Hello, how are you?" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://developer.microsoft.com/json-schemas/teams/v1.19/MicrosoftTeams.schema.json", | |
"manifestVersion": "1.19", | |
"version": "1.0.0", | |
"id": "${{TEAMS_APP_ID}}", | |
"icons": { | |
"color": "color.png", | |
"outline": "outline.png" | |
}, | |
"name": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static async Task<ClientResult<ChatCompletion>> CallOpenAIAPI(string userQuestion, string modelDeploymentName, AzureOpenAIClient azureOpenAIClient, IList<OpenAI.Chat.ChatMessage> functionMessages = null) | |
{ | |
var chatCompletionOptions = new ChatCompletionOptions(); | |
var messages = new List<OpenAI.Chat.ChatMessage> | |
{ | |
new SystemChatMessage("You are a search assistant that helps find information. Only use the functions and parameters you have been provided with."), | |
new UserChatMessage(userQuestion) | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static async Task<string> ExecuteMicrosoft365SearchWithGraph(string searchQuery) | |
{ | |
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp | |
GraphServiceClient graphClient = GetGraphClient(["User.Read", "Files.Read.All"]); | |
var requestBody = new QueryPostRequestBody | |
{ | |
Requests = new List<SearchRequest> | |
{ | |
new SearchRequest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static async Task Main(string[] args) | |
{ | |
string endpoint = "<azure-openi-key>"; | |
string key = "<azure-openi-endpoint>"; | |
string deploymentName = "gpt-4o"; | |
var azureOpenAIClient = new AzureOpenAIClient(new Uri(endpoint), new ApiKeyCredential(key)); | |
//get userQuestion from the console |
NewerOlder