Skip to content

Commit 58b7748

Browse files
Merge pull request #2376 from aahill/go-qs
updating go doc
2 parents 7459a86 + ea924f3 commit 58b7748

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

articles/ai-services/openai/includes/use-your-data-go.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: travisw
55
ms.author: travisw
66
ms.service: azure-ai-openai
77
ms.topic: include
8-
ms.date: 03/07/2024
8+
ms.date: 01/17/2025
99
---
1010

1111
[!INCLUDE [Set up required variables](./use-your-data-common-variables.md)]
@@ -19,16 +19,7 @@ ms.date: 03/07/2024
1919
cd openai-go
2020
```
2121

22-
1. Install the following Go packages:
23-
24-
```cmd
25-
go get github.com/Azure/azure-sdk-for-go/sdk/ai/azopenai
26-
```
27-
1. Enable dependency tracking for your code.
28-
```cmd
29-
go mod init example/azure-openai
30-
```
31-
## Create the Go app
22+
## Create the app
3223

3324
1. From the project directory, open the *sample.go* file and add the following code:
3425

@@ -119,10 +110,17 @@ ms.date: 03/07/2024
119110
> [!IMPORTANT]
120111
> For production, use a secure way of storing and accessing your credentials like [Azure Key Vault](/azure/key-vault/general/overview). For more information about credential security, see the Azure AI services [security](../../security-features.md) article.
121112
122-
1. Execute the following command:
113+
114+
1. Now open a command prompt and run the following:
123115

124116
```cmd
125-
go run sample.go
117+
go mod init sample.go
126118
```
127119

120+
1. Next run:
121+
```cmd
122+
go mod tidy
123+
go run sample.go
124+
```
125+
128126
The application prints the response including both answers to your query and citations from your uploaded files.

0 commit comments

Comments
 (0)