当前位置: 首页 > news >正文

Why I‘m getting 404 Resource Not Found to my newly Azure OpenAI deployment?

题意:为什么我新部署的Azure OpenAI服务会出现404资源未找到的错误?

问题背景:

I've gone through this quickstart and I created my Azure OpenAI resource + created a model deployment which is in state succeedded. I also playaround it in Azure OpenAI Studio - Microsoft Azure and it works there.

我已经按照快速入门指南操作,创建了我的Azure OpenAI资源,并成功部署了一个模型。我也在Azure OpenAI Studio - Microsoft Azure中测试了它,并且在那里工作正常。

But, If I try to reach it from REST API is returns 404 Resource Not Found. I defined the api-key header, and took the url and json from Code View -> json from inside the playground.

但是,如果我尝试通过REST API访问它,它会返回404资源未找到。我已经定义了api-key头部,并且从playground里面的Code View->json获取了URL和JSON。

I'm executing

POST https://raz-openai.openai.azure.com/openai/deployments/raz-model-2/completions?api-version=2022-12-01 { "prompt": "", "max_tokens": 100 } with api-key header

Am I missing another step?

我是不是遗漏了其他步骤?

问题解决:

I was also getting a 404 calling the Chat Completions API (https://{resource}.openai.azure.com/openai/deployments/{deployment}/chat/completions) and it turned out that I was using the wrong version. Each model has one or more versions that can be found at Azure OpenAI Service REST API reference.

我在调用聊天补全API(https://{resource}.openai.azure.com/openai/deployments/{deployment}/chat/completions)时也遇到了404错误,后来发现是我使用了错误的版本。每个模型都有一个或多个版本,可以在Azure OpenAI服务REST API参考中找到。

For me, hitting the chat completions (ChatGPT), the correct URL with version was:

对于我来说,在调用聊天补全(ChatGPT)时,带有版本的正确URL是:

https://{resource}.openai.azure.com/openai/deployments/{deployment}/chat/completions?api-version=2023-03-15-preview

Any other version will give a 404 Resource Not Found.

任何其他版本都会返回404资源未找到错误。

Also, here are the definitions of those variables:

另外,以下是这些变量的定义:

  • Resource: Take from the Azure endpoint URL, which can be found on the Overview page in your OpenAI Services resource. The format should be something like https://{resource}.openai.azure.com/

资源(Resource):从Azure端点URL中获取,该URL可以在你的OpenAI服务资源的“概览”页面中找到。URL的格式应该类似于https://{resource}.openai.azure.com/,其中{resource}是你的OpenAI资源名称。这个URL是你与Azure OpenAI服务进行交互的基础,用于构建指向不同API端点的请求。

  • Deployment (aka deployment-id): You can find this in the Azure portal under the Model Deployments section. Each model has a "Model Deployment Name" and this is your Deployment ID. This isn't going to be the OpenAI name (like gpt-35-turbo) but rather the name you gave it when creating the model deployment.

部署(Deployment)(也称为部署ID):你可以在Azure门户的“模型部署”部分找到这个信息。每个模型都有一个“模型部署名称”,这就是你的部署ID。这个名称不是OpenAI的模型名称(如gpt-35-turbo),而是你在创建模型部署时自己指定的名称。确保在调用API时使用了正确的部署名称,以便能够正确地与你的自定义模型部署进行交互。

http://www.lryc.cn/news/432273.html

相关文章:

  • 【word导出带图片】使用docxtemplater导出word,通知书形式的word
  • 微信小程序路由跳转之间的区别
  • centos安装docker并配置加速器
  • 【软件测试】设计测试用例
  • Kafka【十三】消费者消费消息的偏移量
  • Python 的语法元素(容易忘记的)
  • 找到字符串中所有字母异位词问题
  • QEMU用户模式测试AARCH64程序
  • 机器学习(五) -- 监督学习(8) --神经网络2
  • 物联网之PWM呼吸灯、脉冲、LEDC
  • Python利用pyecharts实现数据可视化
  • 网恋照妖镜源码搭建教程
  • STM32
  • 用手机做抢答器 低预算知识竞赛活动的选择
  • ELK学习笔记(二)——使用K8S部署Kibana8.15.0
  • 报错:CPU指令集的问题
  • Type-C接口诱骗取电快充方案
  • 图像白平衡
  • SAP Business One 与无锡哲讯:携手共创企业数字化未来
  • Unity Adressables 使用说明(五)在运行时使用 Addressables(Use Addressables at Runtime)
  • 什么是死锁,如何解决?
  • 借助ChatGPT三步,完成课题申报书中研究价值部分写作全攻略指南
  • IDEA取消自动选择光标所在行
  • VUE2.0 elementUI el-input-number 数据更新,视图不更新——基础积累
  • JS中this指向问题
  • 大厂面试:小米嵌入式面试题大全及参考答案(130+道 12万长文)
  • React 更新界面
  • JavaSE-易错题集-001
  • 【人工智能学习笔记】1_人工智能基础
  • 【前端】animation动画以及利用vue制作简单的透明度改变动画,包含vue生命周期实现