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
- An Azure subscription - [Create one for free](https://azure.microsoft.com/free/cognitive-services?azure-portal=true)
21
21
- Access granted to the Azure OpenAI service in the desired Azure subscription.
22
22
Currently, access to this service is granted only by application. You can apply for access to Azure OpenAI Service by completing the form at [https://aka.ms/oai/access](https://aka.ms/oai/access?azure-portal=true).
23
-
-[LTS versions of Node.js](https://github.com/nodejs/release#release-schedule)
23
+
-[Go 1.21.0](https://go.dev/dl/) or higher installed locally.
24
24
- An Azure OpenAI Service resource with the text-davinci-003 model deployed. For more information about model deployment, see the [resource deployment guide](../how-to/create-resource.md).
25
25
26
-
> [!div class="nextstepaction"]
27
-
> [I ran into an issue with the prerequisites.](https://microsoft.qualtrics.com/jfe/form/SV_0Cl5zkG3CnDjq6O?PLanguage=JAVASCRIPT&Pillar=AOAI&&Product=gpt&Page=quickstart&Section=Prerequisites)
28
-
29
26
## Set up
30
27
31
-
### Retrieve key and endpoint
32
-
33
-
To successfully make a call against Azure OpenAI, you need an **endpoint** and a **key**.
34
-
35
-
|Variable name | Value |
36
-
|--------------------------|-------------|
37
-
|`ENDPOINT`| This value can be found in the **Keys & Endpoint** section when examining your resource from the Azure portal. Alternatively, you can find the value in the **Azure OpenAI Studio** > **Playground** > **Code View**. An example endpoint is: `https://docs-test-001.openai.azure.com/`.|
38
-
|`API-KEY`| This value can be found in the **Keys & Endpoint** section when examining your resource from the Azure portal. You can use either `KEY1` or `KEY2`.|
39
-
40
-
Go to your resource in the Azure portal. The **Endpoint and Keys** can be found in the **Resource Management** section. Copy your endpoint and access key as you'll need both for authenticating your API calls. You can use either `KEY1` or `KEY2`. Always having two keys allows you to securely rotate and regenerate keys without causing a service disruption.
41
-
42
-
:::image type="content" source="../media/quickstarts/endpoint.png" alt-text="Screenshot of the overview UI for an OpenAI Resource in the Azure portal with the endpoint and access keys location circled in red." lightbox="../media/quickstarts/endpoint.png":::
43
-
44
-
Create and assign persistent environment variables for your key and endpoint.
> [I ran into an issue with the setup.](https://microsoft.qualtrics.com/jfe/form/SV_0Cl5zkG3CnDjq6O?PLanguage=JAVASCRIPT&Pillar=AOAI&&Product=gpt&Page=quickstart&Section=Set-up-the-environment)
Create a new file named completion.go. Copy the following code into the completion.go file.
34
+
Create a new file named completions.go. Copy the following code into the completions.go file.
85
35
86
36
```go
87
37
package main
@@ -163,9 +113,6 @@ go run completions.go
163
113
Microsoft was founded on April 4, 1975.
164
114
```
165
115
166
-
> [!div class="nextstepaction"]
167
-
> [I ran into an issue when running the code sample.](https://microsoft.qualtrics.com/jfe/form/SV_0Cl5zkG3CnDjq6O?PLanguage=JAVASCRIPT&Pillar=AOAI&&Product=gpt&Page=quickstart&Section=Create-application)
168
-
169
116
## Clean up resources
170
117
171
118
If you want to clean up and remove an Azure OpenAI resource, you can delete the resource. Before deleting the resource, you must first delete any deployed models.
0 commit comments