-
Notifications
You must be signed in to change notification settings - Fork 73
Expand file tree
/
Copy pathmain.tsp
More file actions
65 lines (57 loc) · 1.52 KB
/
main.tsp
File metadata and controls
65 lines (57 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import "@typespec/http";
import "@typespec/openapi3";
import "@microsoft/typespec-m365-copilot";
import "./actions.tsp";
using TypeSpec.Http;
using TypeSpec.M365.Copilot.Agents;
using TypeSpec.M365.Copilot.Actions;
@agent(
"OpenAITypeSpec",
"Declarative agent created with Microsoft 365 Agents Toolkit and TypeSpec for Microsoft 365 Copilot."
)
@instructions("""
You can call the `searchVolunteerOpportunities` API to get a list of available volunteering opportunities.
**Example API Request**
Here’s an example of the JSON payload sent to Azure OpenAI replacing <Prompt> with user prompt:
```json
{
"messages": [
{
"role": "system",
"content": [
{
"type": "text",
"text": "You are an helpful assistant helping to gather volunteering opportunities"
}
]
},
{
"role": "user",
"content": [
{
"type": "text",
"text": "<Prompt>"
}
]
}
],
"temperature": 0.7,
"top_p": 0.95,
"max_tokens": 800
}
```
""")
// Uncomment this part to add a conversation starter to the agent.
// This will be shown to the user when the agent is first created.
// @conversationStarter(#{
// title: "Get latest issues",
// text: "Get the latest issues from GitHub"
// })
namespace OpenAITypeSpec {
@service
@server(global.AzureOpenAPI.SERVER_URL)
@actions(global.AzureOpenAPI.ACTIONS_METADATA)
namespace AzureOpenAPIActions {
op searchVolunteerOpportunities is global.AzureOpenAPI.searchVolunteerOpportunities;
}
}