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/functions-add-openai-text-completion.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ This article shows you how to use Visual Studio Code to connect Azure OpenAI to
22
22
> * Enable your function app to connect to OpenAI.
23
23
> * Add OpenAI bindings to your HTTP triggered function.
24
24
25
-
## 0. Prerequisites
25
+
## 1. Check prerequisites
26
26
:::zone pivot="programming-language-csharp"
27
27
* Complete the steps in [part 1 of the Visual Studio Code quickstart](create-first-function-vs-code-csharp.md).
28
28
:::zone-end
@@ -47,7 +47,7 @@ This article shows you how to use Visual Studio Code to connect Azure OpenAI to
47
47
:::zone-end
48
48
* The [Azurite storage emulator](../storage/common/storage-use-azurite.md?tabs=npm#install-azurite). While you can also use an actual Azure Storage account, the article assumes you're using this emulator.
49
49
50
-
## 1. Create your Azure OpenAI resources
50
+
## 2. Create your Azure OpenAI resources
51
51
52
52
The following steps show how to create an Azure OpenAI data model in the Azure portal.
53
53
@@ -75,7 +75,7 @@ The following steps show how to create an Azure OpenAI data model in the Azure p
75
75
76
76
The Azure portal displays a notification when the new resource is available.
77
77
78
-
## 2. Deploy a model
78
+
## 3. Deploy a model
79
79
80
80
Now you can deploy a model. You can select from one of several available models in Azure OpenAI Studio.
81
81
@@ -105,7 +105,7 @@ To deploy a model, follow these steps:
105
105
106
106
Now that you have the credentials to connect to your model in Azure OpenAI, you need to set these access credentials in application settings.
107
107
108
-
## 3. Update application settings
108
+
## 4. Update application settings
109
109
110
110
1. In Visual Studio Code, open the code project you created when you completed the [previous article](./create-first-function-vs-code-csharp.md), open the local.settings.json file in the project root folder, and update the `AzureWebJobsStorage` setting to `UseDevelopmentStorage=true`. You can skip this step if the `AzureWebJobsStorage` setting in *local.settings.json* is set to the connection string for an existing Azure Storage account instead of `UseDevelopmentStorage=true`.
111
111
@@ -118,7 +118,7 @@ Now that you have the credentials to connect to your model in Azure OpenAI, you
118
118
1. Save the file. When you deploy to Azure, you must also add these settings to your function app.
119
119
120
120
:::zone pivot="programming-language-csharp"
121
-
## 4. Register binding extensions
121
+
## 5. Register binding extensions
122
122
123
123
Because you're using an Azure OpenAI output binding, you must have the corresponding bindings extension installed before you run the project.
<!---NOTE: Update this after preview to `## Verify the extension bundle`-->
133
-
## 4. Update the extension bundle
133
+
## 5. Update the extension bundle
134
134
135
135
To access the preview Azure OpenAI bindings, you must use a preview version of the extension bundle that contains this extension.
136
136
@@ -148,7 +148,7 @@ Replace the contents of your current `host.json` file with this JSON:
148
148
:::zone-end
149
149
Now, you can use the Azure OpenAI output binding to your project.
150
150
151
-
## 5. Return text completion from the model
151
+
## 6. Return text completion from the model
152
152
153
153
The code you add creates a `whois` HTTP function endpoint in your existing project. In this function, data passed in a URL `name` parameter of a GET request is used to dynamically create a completion prompt. This dynamic prompt is bound to a text completion input binding, which returns a response from the model based on the prompt. The completion from the model is returned in the HTTP response.
154
154
:::zone pivot="programming-language-csharp"
@@ -250,7 +250,7 @@ The code you add creates a `whois` HTTP function endpoint in your existing proje
250
250
251
251
:::zone-end
252
252
253
-
## 6. Run the function
253
+
## 7. Run the function
254
254
255
255
1. In a Terminal window, run the following command to start the Azurite storage emulator in a separate process:
256
256
@@ -278,7 +278,7 @@ The code you add creates a `whois` HTTP function endpoint in your existing proje
278
278
## 9. Deploy to Azure
279
279
-->
280
280
281
-
## 7. Clean up resources
281
+
## 8. Clean up resources
282
282
283
283
InAzure, *resources*refertofunctionapps, functions, storageaccounts, andsoforth. They're grouped into *resource groups*, and you can delete everything in a group by deleting the group.
0 commit comments