Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Workshops/PodcastCopilotPowerApp/Lab2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ For this lab, make sure you have the following ready:
1. In the terminal window, run the following command to install the prerelease version of the Azure OpenAI SDK:

```bash
dotnet add package Azure.AI.OpenAI --version 2.0.0-beta.5
dotnet add package Azure.AI.OpenAI --version 2.0.0
```

1. Then run the following command to install the Newtonsoft.Json package:
Expand Down Expand Up @@ -135,7 +135,7 @@ For this lab, make sure you have the following ready:
//Instantiate OpenAI Client
static AzureOpenAIClient azureOpenAIClient = new AzureOpenAIClient(
new Uri(endpointSC),
new AzureKeyCredential(keySC));
new ApiKeyCredential(keySC));
```

1. Then below the above code, add the following code to perform **Audio Transcription**:
Expand All @@ -144,7 +144,7 @@ For this lab, make sure you have the following ready:
//Get Audio Transcription
public static async Task<string> GetTranscription(string podcastUrl)
{
var decodededUrl = HttpUtility.UrlDecode(podcastUrl);
var decodedUrl = HttpUtility.UrlDecode(podcastUrl);

HttpClient httpClient = new HttpClient();
Stream audioStreamFromBlob = await httpClient.GetStreamAsync(decodededUrl);
Expand All @@ -170,7 +170,7 @@ For this lab, make sure you have the following ready:
new UserChatMessage(transcription)
]);

return chatCompletion.ToString();
return chatCompletion.Content.First().Text;
}
```

Expand Down Expand Up @@ -212,7 +212,7 @@ For this lab, make sure you have the following ready:
$"Here is the bio of the guest: {bio}")
]);

return chatCompletion.ToString();
return chatCompletion.Content.First().Text;
}
```

Expand All @@ -231,7 +231,7 @@ For this lab, make sure you have the following ready:

]);

return chatCompletion.ToString();
return chatCompletion.Content.First().Text;
}
```

Expand Down Expand Up @@ -384,4 +384,4 @@ Now we will be turning our API into a Custom Connector so that it can be used wi

...and that's it! You've now created a .NET API using the .NET Azure OpenAI SDK and created a Custom Connector from Visual Studio where you'll be able to use the API within the Power Platform.

### ➡️ [Lab 3 - The Final Touch: Power Apps and Microsoft Copilot Studio](../Lab3/README.md)
### ➡️ [Lab 3 - The Final Touch: Power Apps and Microsoft Copilot Studio](../Lab3/README.md)