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/azure-functions/create-first-function-vs-code-python.md
+4-6Lines changed: 4 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,11 +80,9 @@ In this section, you use Visual Studio Code to create a local Azure Functions pr
80
80
81
81
After you verify that the function runs correctly on your local computer, it's time to use Visual Studio Code to publish the project directly to Azure.
82
82
83
-
## Use AI to normalize and validate user input in Azure Functions
83
+
## Use AI to normalize and validate input
84
84
85
-
You can use AI tools, such as GitHub Copilot in Visual Studio Code, to generate Python code that updates the existing function to retrieve parameters from either the query string or JSON body, apply formatting or type conversions, and return them in the JSON response. You can customize the prompt to add specifics per your requirements.
86
-
87
-
The following text shows an example prompt for Copilot Chat:
85
+
You can use AI tools, such as GitHub Copilot in Visual Studio Code, to update template-generated function code. This is an example prompt for Copilot Chat that updates the existing Python function to retrieve parameters from either the query string or JSON body, apply formatting or type conversions, and return them as JSON in the response:
88
86
89
87
```copilot-prompt
90
88
#file:function_app.py Modify the function to accept name, email, and age from either the query parameters or the JSON body of the request, whichever is available. Return all three parameters in the JSON response, applying these rules:
@@ -94,7 +92,7 @@ Convert age to an integer, otherwise return "not provided"
94
92
Use sensible defaults if any parameter is missing
95
93
```
96
94
97
-
GitHub Copilot is powered by AI, so surprises and mistakes are possible. For more information, see [Copilot FAQs](https://aka.ms/copilot-general-use-faqs).
95
+
You can customize your prompt to add specifics as needed. GitHub Copilot is powered by AI, so surprises and mistakes are possible. For more information, see [Copilot FAQs](https://aka.ms/copilot-general-use-faqs).
0 commit comments