我的GPT-4 API 接入之旅

编程入门 行业动态 更新时间:2024-10-28 06:30:08

3月15日open-ai推出GPT-4

https://platform.openai/docs/models/gpt-4

chatgpt免费体验入口:

http://chat.xutongbao.top

需要排队 

28号加入等候队列

29号收到邀请 

 检查可用的model

const { Configuration, OpenAIApi } = require('openai')


let listModels = []
const aiInit1 = async (req, res) => {
  const listModesRes = await openai.listModels()
  listModels = listModesRes.data
}

aiInit1()

 已经有gpt-4了

 问他是不是GPT-4,但是他并不承认自己是GPT-4

const { Configuration, OpenAIApi } = require('openai')

const configuration = new Configuration({
  organization: 'org-XXX',
  apiKey: 'sk-XXX',
})
const openai = new OpenAIApi(configuration)

const aiInit = async (req, res) => {
  const { message } = req.body
  let errorData = ''
  let completionRes = { data: '' }

  completionRes = await openai
    .createChatCompletion({
      model: 'gpt-4',
      messages: [{ role: 'user', content: message }],
    })
    .catch((err) => {
      errorData = err
    })


  const completion = completionRes ? completionRes.data : ''
  res.send({
    code: 200,
    data: {
      completion,
      errorData,
      listModels,
    },
    message: '成功',
  })
}

https://platform.openai/docs/models/gpt-4

查文档发现他的训练时间是2021年9月,而且他还没有通过插件联网,所有他不知道GPT-4的诞生

 https://chatgpt4.ai/gpt-4-0314/

图片输入功能也处于限制状态 

 https://github/openai/evals/issues/381

 github上也说通过API调用GPT-4和官网plus会员的不一样

 GPT-4和gpt-3.5对比,感觉略胜一筹

 

 

 GPT-4还有开发者模式输出,结尾还有表情

 

官网plus会员GPT-4(20美元一个月)

 

 第三方应用API接口会员GPT-4(一个月若干元)

 

更多推荐

我的GPT-4 API 接入之旅

本文发布于:2023-06-10 20:34:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1342577.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:之旅   GPT   API

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!