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

Why can‘t I access GPT-4 models via API, although GPT-3.5 models work?

题意:为什么我无法通过API访问GPT-4模型,尽管GPT-3.5模型可以工作?

问题背景:

I'm able to use the gpt-3.5-turbo-0301 model to access the ChatGPT API, but not any of the gpt-4 models. Here is the code I am using to test this (it excludes my openai API key). The code runs as written, but when I replace "gpt-3.5-turbo-0301" with "gpt-4", "gpt-4-0314", or "gpt-4-32k-0314", it gives me an error

openai.error.InvalidRequestError: The model: `gpt-4` does not exist

I have a ChatGPT+ subscription, am using my own API key, and can use gpt-4 successfully via OpenAI's own interface.

It's the same error if I use gpt-4-0314 or gpt-4-32k-0314. I've seen a couple articles claiming this or similar code works using 'gpt-4' works as the model specification, and the code I pasted below is from one of them.

Is it possible to access the gpt-4 model via Python + API, and if so, how?

openai_key = "sk..."
openai.api_key = openai_key
system_intel = "You are GPT-4, answer my questions as if you were an expert in the field."
prompt = "Write a blog on how to use GPT-4 with python in a jupyter notebook"
# Function that calls the GPT-4 APIdef ask_GPT4(system_intel, prompt): result = openai.ChatCompletion.create(model="gpt-3.5-turbo-0301",messages=[{"role": "system", "content": system_intel},{"role": "user", "content": prompt}])print(result['choices'][0]['message']['content'])# Call the function above
ask_GPT4(system_intel, prompt)

问题解决:

Currently the GPT 4 API is restricted, Even to users with a Chat GPT + subscription.

You may need to join the Waitlist for the API.

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

相关文章:

  • MATLAB中Simulink.SimulationData.Dataset用法
  • Spring Security学习笔记(一)Spring Security架构原理
  • nginx的access.log日志输出请求数
  • 前端网站(三)-- 记事本【附源码】
  • java——Junit单元测试
  • Scala学习笔记17: Try与异常处理
  • 内网信息收集——MSF信息收集浏览器记录配置文件敏感信息
  • C++ STL中的std::remove_if 的用法详解
  • 基于AT89C51单片机的16×16点阵LED显示器字符滚动显示设计(含文档、源码与proteus仿真,以及系统详细介绍)
  • Docker 日志丢失 - 解决方案
  • 物联网环境下机器人隐私保护法律框架研究-隐私保护法律监管平台
  • 设计模式-创建型模式之工厂方法模式
  • 婚礼成本与筹备策略:一场梦幻婚礼的理性规划
  • 前端a-tree遇到的问题
  • SpringCloud教程 | 第十篇: 读取Nacos的配置
  • 漏洞-Alibaba Nacos derby 远程代码执行漏洞
  • SpringBoot解决Apache Tomcat输入验证错误漏洞
  • echarts解决数据差异过大的问题
  • Oracle 常用系统
  • WPS点击Zotero插入没有任何反应
  • uniapp 实现上传文件的功能
  • apache Kylin系列介绍及配置
  • 【Qt 初识】QPushButton 的详解以及 Qt 中的坐标
  • 道路运输企业管理人员安全考核试题(附答案)
  • 免费开源的工业物联网(IoT)解决方案
  • Android 底部导航栏实现
  • ASP.NET Core----基础学习07----ViewStart ViewImports文件的使用
  • 铁威马教程丨如何收集NAS的日志
  • Taro自定义FromData实现本地路径转换为文件
  • React+TS前台项目实战(二十九)-- 首页构建之性能优化实现首页Echarts模块数据渲染