Skip to content

Commit 6c3baca

Browse files
committed
fixing tab group
1 parent 657092f commit 6c3baca

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

articles/ai-services/agents/how-to/tools/azure-functions.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,20 +176,22 @@ def process_queue_message(msg: func.QueueMessage) -> None:
176176

177177
# [TypeScript](#tab/typescript)
178178

179-
:::code language="TypeScript" source="~/azure-functions-ai-services-agent-javascript/app/src/functions/queueGetWeather.ts" :::
179+
:::code language="TypeScript" source="~/azure-functions-ai-services-agent-javascript/app/src/functions/queueGetWeather.ts" :::
180180

181181
# [REST API](#tab/rest)
182182

183183
No REST equivalent provided.
184184

185+
185186
---
186187

188+
187189
## Create an AI project client and agent
188190

189191
In the sample below we create a client and an agent that has the AI tools definition for the Azure Function. The term `function` is used in two contexts within the AI tool definition:
190192

191193
* Azure Function: the type of tool. This is the Azure Functions app.
192-
* Function: the Http trigger function within the Azure Function to call when the tool is invoked in the AI Project.
194+
* Function: the Http trigger function `GetWeather` within the Azure Function to call when the tool is invoked in the AI Project.
193195

194196
# [Python](#tab/python)
195197

@@ -246,12 +248,12 @@ agent = project_client.agents.create_agent(
246248
)
247249
```
248250

249-
250251
# [TypeScript](#tab/typescript)
251252

252253
:::code language="TypeScript" source="~/azure-functions-ai-services-agent-javascript/app/src/azureProjectInit.ts" id="CreateAgent" :::
253254

254255
# [REST API](#tab/rest)
256+
255257
Follow the [REST API Quickstart](../../quickstart.md?pivots=rest-api) to set the right values for the environment variables `AZURE_AI_AGENTS_TOKEN` and `AZURE_AI_AGENTS_ENDPOINT`. Then create the agent using:
256258
```console
257259
curl $AZURE_AI_AGENTS_ENDPOINT/assistants?api-version=2024-12-01-preview \
@@ -319,6 +321,7 @@ curl $AZURE_AI_AGENTS_ENDPOINT/threads?api-version=2024-12-01-preview \
319321
-H "Content-Type: application/json" \
320322
-d ''
321323
```
324+
322325
---
323326

324327
## Create a run and check the output
@@ -404,7 +407,7 @@ curl $AZURE_AI_AGENTS_ENDPOINT/threads/thread_abc123/messages?api-version=2024-1
404407
-H "Authorization: Bearer $AZURE_AI_AGENTS_TOKEN"
405408
```
406409

407-
::: zone-end
410+
---
408411

409412
## Troubleshooting
410413

@@ -421,3 +424,7 @@ For any issues with the TypeScript code, create an issue on the [sample code rep
421424
No REST equivalent provided.
422425

423426
---
427+
428+
::: zone-end
429+
430+

0 commit comments

Comments
 (0)