Skip to content

Commit 90e92a2

Browse files
authored
Update articles/cognitive-services/openai/includes/dotnet.md
1 parent 6416b65 commit 90e92a2

File tree

1 file changed

+2
-1
lines changed
  • articles/cognitive-services/openai/includes

1 file changed

+2
-1
lines changed

articles/cognitive-services/openai/includes/dotnet.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ OpenAIClient client = new(new Uri(endpoint), new AzureKeyCredential(key));
123123
string prompt = "When was Microsoft founded?";
124124
Console.Write($"Input: {prompt}\n");
125125

126-
Response<Completions> completionsResponse = client.GetCompletions(engine, prompt);
126+
Response<Completions> completionsResponse =
127+
await client.GetCompletionsAsync(engine, prompt);
127128
string completion = completionsResponse.Value.Choices[0].Text;
128129
Console.WriteLine($"Chatbot: {completion}");
129130
```

0 commit comments

Comments
 (0)