> 自媒体 > (AI)人工智能 > 重磅:GPT-4 API全面开放使用
重磅:GPT-4 API全面开放使用
来源:码农看看
2023-07-14 17:39:59
550
管理
背景

相信很多申请GPT-4 API的开发者都收到OpenAI的邮件通知了,从2023.07.06开始,所有OpenAI的API付费用户都可以使用gpt-4了。

目前所有大语言模型的评测中,毫无疑问GPT-4是最亮眼的那颗星。

有了GPT-4的API,意味着开发者可以做出功能更强大、体验更好的应用。

此外,OpenAI官方表示要废弃Completions API,该API目前可以使用的一些Model会在2024年1月4号下线。后续OpenAI的规划是让开发者都使用Chat Completions API。

另外,Embedding的部分模型以及Edits API也会在2024年1月4号下线。

GPT-4 API全面开放

GPT-4是目前最强大的大语言模型,从3月份开放API以来,数百万的开发者进行了申请,有非常多成功的应用是基于GPT-4 API开发的。

从2023.07.06开始,只要有过API付费记录的开发者都可以使用GPT-4 8K上下文版本的API了。

新申请的开发者预计2023年7月底会审批通过,然后OpenAI会基于已有的计算能力来降低API的使用流控限制(rate limit),让开发者可以更顺畅地使用GPT-4 API。

GPT-3.5 Turbo, DALL.E和Whisper API也都会全部开放出来给开发者使用。

预计2023年下半年,基于GPT-4和GPT-3.5 Turbo模型的微调(fine-tuning)也会开放出来。

废弃Completions API

OpenAI在2023年3月份引入了Chat Completions API,现在有大约97%的API使用量都来源于Chat Completions API。

Completions API是在2020年6月份引入的,当时是为了给开发者提供和OpenAI语言模型交互的能力。

现在有了Chat Completions API后,完全可以覆盖Completions API的功能,而且Chat Completions API更为强大,可以满足非常多的使用场景和对话需求。

下面简单介绍几种Chat Completions API的使用场景:

文本总结(Text summarization)

bash复制代码SystemSummarize this message in max 10 words.UserJupiter is the fifth planet from the Sun and the largest in the Solar System. It is a gas giant with a mass one-thousandth that of the Sun, but two-and-a-half times that of all the other planets in the Solar System combined. Jupiter is one of the brightest objects visible to the naked eye in the night sky, and has been known to ancient civilizations since before recorded history. It is named after the Roman god Jupiter. When viewed from Earth, Jupiter can be bright enough for its reflected light to cast visible shadows, and is on average the third-brightest natural object in the night sky after the Moon and Venus.AssistantJupiter: Largest planet, visible to the naked eye at night.代码补全(Code completion)

bash复制代码SystemComplete the following code.Userdef fibonacci(num):Assistantif num == 0: return 0elif num == 1: return 1else: fib = [0, 1] for i in range(2, num 1): fib.append(fib[i-1] fib[i-2]) return fib[num]小样本学习(Few-shot learning)

bash复制代码SystemYou translate corporate jargon into plain English.UserNew synergies will help drive top-line growth.AssistantWorking well together will make more money.UserLet’s circle back when we have more bandwidth to touch base on opportunities for increased leverage.AssistantWhen we’re less busy, let’s talk about how to do better.UserThis late pivot means we don’t have time to boil the ocean for the client deliverable.AssistantBecause of this sudden change, we don’t have enough time to complete the entire project for the client.We plan to continue investing most of our platform efforts in this direction, as we believe it will offer an increasingly capable and easy-to-use experience for developers. We’re working on closing the last few remaining gaps of the Chat Completions API quickly, such as log probabilities for completion tokens and increased steerability to reduce the “chattiness” of responses.废弃Completions API的旧模型

OpenAI接下来会把重点放在Chat Completions API,不再投入精力支持Completions API。

从2023年1月4日开始,Completions API目前可以使用的一些模型会下线,开发者要继续使用Completions API,得使用新模型,参考如下表格:

Older model

New model

ada

ada-002

babbage

babbage-002

curie

curie-002

davinci

davinci-002

davinci-instruct-beta

gpt-3.5-turbo-instruct

curie-instruct-beta

text-ada-001

text-babbage-001

text-curie-001

text-davinci-001

text-davinci-002

text-davinci-003

如果开发者使用的是基于GPT-3模型的稳定模型版本,例如ada, babbage, curie, davinci,那代码可以不用修改,这些稳定版本的模型底层会在2024年1月4日后自动升级为上面表格里右侧的新模型。右侧的新模型在接下来几周开放测试,调用API的时候指定新Model的名字即可,例如 ada-002, babbage-002, curie-002, davinci-002。如果开发者使用的是其他旧模型名称,例如 text-davinci-003,那就需要在手工修改API里调用的模型名称为gpt-3.5-turbo-instruct,这个新模型也会在接下来几周开放测试。

同时,OpenAI也把Completions API在官网的API文档里标记为legacy,不推荐大家继续使用了。

所以还在用Completions API的赶紧去拥抱Chat Completions API吧。

废弃Embedding旧模型

从2024年1月4日开始,只能使用text-embedding-ada-002这个Embedding Model,其它Embedding Model都会下线,不能再使用。

text-embedding-ada-002是2022年12月上线的,比其它Embedding Model更强大而且成本更低。现在99%的embedding API调用都在使用这个模型。

这对使用旧模型来做embedding的开发者来说是一个痛苦的事情,因为不同模型embedding的结果是不一样的,开发者需要在旧模型下线前提前做好适配和测试。

OpenAI官方承诺会补偿旧模型的用户。

Older model

New model

code-search-ada-code-001

text-embedding-ada-002

code-search-ada-text-001

code-search-babbage-code-001

code-search-babbage-text-001

text-search-ada-doc-001

text-search-ada-query-001

text-search-babbage-doc-001

text-search-babbage-query-001

text-search-curie-doc-001

text-search-curie-query-001

text-search-davinci-doc-001

text-search-davinci-query-001

text-similarity-ada-001

text-similarity-babbage-001

text-similarity-curie-001

text-similarity-davinci-001

废弃Edits API

目前Edits API可以使用text-davinci-edit-001 和code-davinci-edit-001这2个模型。

从2024年1月4日开始,Edits API不能使用这2个模型,要继续使用Edits API,得使用GPT-3.5 Turbo模型。

但是官方不再建议大家使用Edits API了,这个API也会废弃。

我们建议直接使用Chat Completions API来替代Edits API,如下例所示:

bash复制代码SystemApply the change requested by the user to the code.Userdef fibonacci(num): if num <= 1: return num else: return fibonacci(num-1) fibonacci(num-2)print(fibonacci(10))UserRename the function to fib.Assistantdef fib(num): if num <= 1: return num else: return fib(num-1) fib(num-2)print(fib(10))

0
点赞
赏礼
赏钱
0
收藏
免责声明:本文仅代表作者个人观点,与本站无关。其原创性以及文中陈述文字和内容未经本网证实,对本文以及其中全部或者 部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。 凡本网注明 “来源:XXX(非本站)”的作品,均转载自其它媒体,转载目的在于传递更多信息,并不代表本网赞同其观点和对 其真实性负责。 如因作品内容、版权和其它问题需要同本网联系的,请在一周内进行,以便我们及时处理。 QQ:617470285 邮箱:617470285@qq.com
相关文章
深度关注丨汽车消费向“新”而行
中央纪委国家监委网站 李云舒图为近日,在河北省邯郸市永年区汽车促销活..
裁员、召回、无赔偿!理想汽车不谈“人文关怀”
原来车企不仅可以召回汽车,还可以“召回”员工。继大规模裁员一月之后,..
阿维塔总裁陈卓:中国汽车市场现状与重庆火锅非常相似,都是“热辣滚烫”..
“2024中国汽车重庆论坛(CACS2024)”于6月6日-8日举行。阿维塔科技总裁..
大众汽车集团三年内“动刀”裁员20%?最新回应→
每经记者:苗诗雨 每经编辑:王月龙,孙磊日前,《每日经济新闻》记者获悉..
2024款凯迪拉克锐歌Lyriq评测:超值的豪华电动汽车
2024 款凯迪拉克 Lyriq 的尾部无疑是其最具争议的角度。凯迪拉克尾部几乎..
宝马打五折,4S店仅剩1辆现车,合资豪华品牌汽车溢价能力遭重构..
风口财经记者 王贝贝近日“宝马i3腰斩式大降价”的话题登上热搜。官方报..
退市风险叠加人事更迭 极星汽车危机重重
经济观察报 记者 王帅国 连续十余天股价低于1美元面临退市风险,中国市场..
6大国产汽车品牌,高品质不贵,买车必看
质量最好,性价比高的汽车品牌,选择这6款国产品牌,准没错这车可是定位..
汽车认证存在造假行为,丰田、本田、马自达日本高管鞠躬道歉..
环球网及多家媒体报道,据日本国土交通省发布消息,鉴于日本大发工业等公..
关于作者
大男孩(普通会员)
文章
1065
关注
0
粉丝
0
点击领取今天的签到奖励!
签到排行

成员 网址收录40404 企业收录2983 印章生成238804 电子证书1060 电子名片60 自媒体58417

@2022 All Rights Reserved 浙ICP备19035174号-7
0
0
分享
请选择要切换的马甲:

个人中心

每日签到

我的消息

内容搜索