Skip to content

Commit 660afb2

Browse files
Merge pull request #302237 from ggailey777/patch-3
[Functions] Tweak the new AI section
2 parents 2faf198 + 523a5ca commit 660afb2

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

articles/azure-functions/create-first-function-vs-code-python.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,9 @@ In this section, you use Visual Studio Code to create a local Azure Functions pr
8080

8181
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.
8282

83-
## Use AI to normalize and validate user input in Azure Functions
83+
## Use AI to normalize and validate input
8484

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:
8886

8987
```copilot-prompt
9088
#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"
9492
Use sensible defaults if any parameter is missing
9593
```
9694

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).
9896

9997
[!INCLUDE [functions-sign-in-vs-code](../../includes/functions-sign-in-vs-code.md)]
10098

@@ -119,5 +117,5 @@ You created and deployed a function app with a simple HTTP-triggered function. I
119117
[Azure Functions extension for Visual Studio Code]: https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurefunctions
120118

121119
## Related content
122-
- [GitHub Copilot in VS Code](https://code.visualstudio.com/docs/copilot/overview)
120+
- [GitHub Copilot in Visual Studio Code](https://code.visualstudio.com/docs/copilot/overview)
123121
- [GitHub Copilot in Visual Studio](/visualstudio/ide/visual-studio-github-copilot-install-and-states)

0 commit comments

Comments
 (0)