当前位置:   article > 正文

我的GPT-4 API 接入之旅_gpt4 api

gpt4 api

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

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

chatgpt免费体验入口:

http://chat.xutongbao.top

需要排队 

28号加入等候队列

29号收到邀请 

 检查可用的model

  1. const { Configuration, OpenAIApi } = require('openai')
  2. let listModels = []
  3. const aiInit1 = async (req, res) => {
  4. const listModesRes = await openai.listModels()
  5. listModels = listModesRes.data
  6. }
  7. aiInit1()

 已经有gpt-4了

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

  1. const { Configuration, OpenAIApi } = require('openai')
  2. const configuration = new Configuration({
  3. organization: 'org-XXX',
  4. apiKey: 'sk-XXX',
  5. })
  6. const openai = new OpenAIApi(configuration)
  7. const aiInit = async (req, res) => {
  8. const { message } = req.body
  9. let errorData = ''
  10. let completionRes = { data: '' }
  11. completionRes = await openai
  12. .createChatCompletion({
  13. model: 'gpt-4',
  14. messages: [{ role: 'user', content: message }],
  15. })
  16. .catch((err) => {
  17. errorData = err
  18. })
  19. const completion = completionRes ? completionRes.data : ''
  20. res.send({
  21. code: 200,
  22. data: {
  23. completion,
  24. errorData,
  25. listModels,
  26. },
  27. message: '成功',
  28. })
  29. }

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

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

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

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

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

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

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

 

 

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

 

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

 

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

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家小花儿/article/detail/356886
推荐阅读
相关标签
  

闽ICP备14008679号