The requested item was created under a different Azure OpenAI resource. Use the ...
错误信息
The requested item was created under a different Azure OpenAI resource. Use the same resource that created the item to access it.
AI 解决方案
🌐 错误翻译
原文:The requested item was created under a different Azure OpenAI resource. Use the same resource that created the item to access it.
译文:所请求的项目是在另一个Azure OpenAI资源下创建的。请使用创建该项目的同一资源来访问它。
🎯 原因分析
💡 解决方案
// 修复后的代码(C#示例,需替换为对应语言实现)
// 1. 确认创建项目时使用的Azure OpenAI资源信息
string correctResourceName = "your-original-azure-openai-resource-name";
string correctApiKey = "your-original-resource-api-key";
string endpoint = $"https://{correctResourceName}.openai.azure.com/";
// 2. 使用正确的资源信息初始化客户端
var client = new AzureOpenAIClient(
new Uri(endpoint),
new AzureKeyCredential(correctApiKey)
);
// 3. 后续操作保持使用该客户端
var response = client.GetDeployment("your-target-deployment").Value;
🛡️ 预防措施