You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/ai-services/agents/how-to/tools/azure-functions.md
+42Lines changed: 42 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,6 +77,48 @@ azd provision
77
77
}
78
78
```
79
79
80
+
## Run your app using Visual Studio Code
81
+
82
+
1. Open the folder in a new terminal.
83
+
1. Run the `code .` code command to open the project in Visual Studio Code.
84
+
1. In the command palette (F1), type `Azurite: Start`, which enables debugging with local storage for Azure Functions runtime.
85
+
1. Press **Run/Debug (F5)** to run in the debugger. Select **Debug anyway** if prompted about local emulator not running.
86
+
1. Send POST `prompt` endpoints respectively using your HTTP test tool. If you have the [RestClient](https://marketplace.visualstudio.com/items?itemName=humao.rest-client) extension installed, you can execute requests directly from the [`test.http`](./app/test.http) project file.
87
+
88
+
89
+
## Deploy to Azure
90
+
91
+
Run this command to provision the function app, with any required Azure resources, and deploy your code:
92
+
93
+
```shell
94
+
azd up
95
+
```
96
+
97
+
You're prompted to supply these required deployment parameters:
98
+
99
+
| Parameter | Description |
100
+
| ---- | ---- |
101
+
|_Environment name_| An environment that's used to maintain a unique deployment context for your app. You won't be prompted if you created the local project using `azd init`.|
102
+
|_Azure subscription_| Subscription in which your resources are created.|
103
+
|_Azure location_| Azure region in which to create the resource group that contains the new Azure resources. Only regions that currently support the Flex Consumption plan are shown.|
104
+
105
+
After publish completes successfully, `azd` provides you with the URL endpoints of your new functions, but without the function key values required to access the endpoints. To learn how to obtain these same endpoints along with the required function keys, see [Invoke the function on Azure](https://learn.microsoft.com/azure/azure-functions/create-first-function-azure-developer-cli?pivots=programming-language-dotnet#invoke-the-function-on-azure) in the companion article [Quickstart: Create and deploy functions to Azure Functions using the Azure Developer CLI](https://learn.microsoft.com/azure/azure-functions/create-first-function-azure-developer-cli?pivots=programming-language-dotnet).
106
+
107
+
## Redeploy your code
108
+
109
+
You can run the `azd up` command as many times as you need to both provision your Azure resources and deploy code updates to your function app.
110
+
111
+
> [!NOTE]
112
+
> Deployed code files are always overwritten by the latest deployment package.
113
+
114
+
## Clean up resources
115
+
116
+
When you're done working with your function app and related resources, you can use this command to delete the function app and its related resources from Azure and avoid incurring any further costs (--purge does not leave a soft delete of AI resource and recovers your quota):
0 commit comments