こちらのフォーラムは IT プロフェッショナル向け(管理運用)となっていますので、開発関連の質問は(Azure Open AI Service であれば)以下に投稿してください。
Visual Studio pro 2022でChatMessageがエラーになってしまう。
Visual Studio Professional 2022 を用いてAzureOpenAIのチャット機能を利用したいと考えております。
以下コードのように単純な回答をさせたいのですが、
ChatMessageでエラーになってしまします。(CS0246)
何が原因か、解決方法を教えて頂きたいです。
※"dotnet add package Azure.AI.OpenAI --prerelease" をパッケージマネージャーコンソールで実施済みです。
using Azure.AI.OpenAI;
using Azure;
ーーーー一部省略ーーーーー
Console.Write("prompt:");
string prompt = Console.ReadLine() ?? "Hello.";
var response = client.GetChatCompletions( MODEL_NAME,
new ChatCompletionsOptions()
{
Messages = {
new ChatMessage(ChatRole.User,prompt),
},
});
ロックされた質問。 This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question. To protect privacy, user profiles for migrated questions are anonymized.