今日起ChatGPT插件能力开放,API可以调用。更长的上下文,更低的价格

随笔 0 741
HarmonyOS专区
HarmonyOS专区 2023年6月14日 12:40 发表

中英文对照

We released gpt-3.5-turbo and gpt-4 earlier this year, and in only a short few months, have seen incredible applications built by developers on top of these models.

我们在今年早些时候发布了 gpt-3.5-turbo 和 gpt-4 ,在短短几个月内,已经看到开发人员在这些模型之上构建了令人难以置信的应用程序。
Today, we’re following up with some exciting updates:
今天,我们将跟进一些令人兴奋的更新:
  • new function calling capability in the Chat Completions API
    Chat Completions API 中的新函数调用功能(可以调用ChatGPT插件)
  • updated and more steerable versions of gpt-4 and gpt-3.5-turbo
    gpt-4 和 gpt-3.5-turbo 的更新和更易操纵的版本
  • new 16k context version of gpt-3.5-turbo (vs the standard 4k version)
    gpt-3.5-turbo 的新 16k 上下文版本(与标准 4k 版本相比)
  • 75% cost reduction on our state-of-the-art embeddings model
    我们最先进的嵌入模型的成本降低了 75%
  • 25% cost reduction on input tokens for gpt-3.5-turbo
    gpt-3.5-turbo 的输入token成本降低 25%
  • announcing the deprecation timeline for the gpt-3.5-turbo-0301 and gpt-4-0314 models
    宣布 gpt-3.5-turbo-0301 和 gpt-4-0314 模型的弃用时间表

All of these models come with the same data privacy and security guarantees we introduced on March 1 — customers own all outputs generated from their requests and their API data will not be used for training.

所有这些模型都具有我们在 3 月 1 日推出的相同的数据隐私和安全保证——客户拥有根据他们的请求生成的所有输出,他们的 API 数据不会用于训练。


01

Function calling 函数调用


Developers can now describe functions to gpt-4-0613 and gpt-3.5-turbo-0613, and have the model intelligently choose to output a JSON object containing arguments to call those functions. This is a new way to more reliably connect GPT's capabilities with external tools and APIs.
开发人员现在可以向 gpt-4-0613 和 gpt-3.5-turbo-0613 描述函数,并让模型智能地选择输出包含调用这些函数的参数的 JSON 对象。这是一种更可靠地将 GPT 功能与外部工具和 API 连接的新方法。
These models have been fine-tuned to both detect when a function needs to be called (depending on the user’s input) and to respond with JSON that adheres to the function signature. Function calling allows developers to more reliably get structured data back from the model. For example, developers can:
这些模型已经过微调,可以检测何时需要调用函数(取决于用户的输入)并使用符合函数签名的 JSON 进行响应。函数调用允许开发人员更可靠地从模型中获取结构化数据。例如,开发人员可以:
  • Create chatbots that answer questions by calling external tools (e.g., like ChatGPT Plugins)
    创建通过调用外部工具(例如 ChatGPT 插件)来回答问题的聊天机器人
Convert queries such as “Email Anya to see if she wants to get coffee next Friday” to a function call like send_email(to: string, body: string), or “What’s the weather like in Boston?” to get_current_weather(location: string, unit: 'celsius' | 'fahrenheit').
将诸如“给 Anya 发电子邮件,看看她下周五是否想喝咖啡”之类的查询转换为 send_email(to: string, body: string) 之类的函数调用,或者“波士顿的天气怎么样?”到 get_current_weather(location: string, unit: 'celsius' | 'fahrenheit') 。
  • Convert natural language into API calls or database queries
    将自然语言转换为 API 调用或数据库查询

Convert “Who are my top ten customers this month?” to an internal API call such as get_customers_by_revenue(start_date: string, end_date: string, limit: int), or “How many orders did Acme, Inc. place last month?” to a SQL query using sql_query(query: string).

转换“谁是本月我的前十名客户?”到内部 API 调用,例如 get_customers_by_revenue(start_date: string, end_date: string, limit: int) ,或“Acme, Inc. 上个月下了多少订单?”到使用 sql_query(query: string) 的SQL 查询。
  • Extract structured data from text
    从文本中提取结构化数据
Define a function called extract_people_data(people: [{name: string, birthday: string, location: string}]), to extract all people mentioned in a Wikipedia article.
定义一个名为 extract_people_data(people: [{name: string, birthday: string, location: string}]) 的函数,以提取维基百科文章中提到的所有人。
These use cases are enabled by new API parameters in our /v1/chat/completions endpoint, functions and function_call, that allow developers to describe functions to the model via JSON Schema, and optionally ask it to call a specific function. Get started with our developer documentation and add evals if you find cases where function calling could be improved
这些用例由我们的 /v1/chat/completions 端点、 functions 和 function_call 中的新 API 参数启用,允许开发人员通过 JSON 模式向模型描述函数,并可选择要求它调用特定函数。开始使用我们的开发人员文档,如果您发现可以改进函数调用的情况,请添加评估。

Function calling example 函数调用示例

请阅读原文查看。


02

New models 新模型 

GPT-4
gpt-4-0613 includes an updated and improved model with function calling.
gpt-4-0613 包括一个更新和改进的模型,带有函数调用。
gpt-4-32k-0613 includes the same improvements as gpt-4-0613, along with an extended context length for better comprehension of larger texts.
gpt-4-32k-0613 包括与 gpt-4-0613 相同的改进,以及扩展的上下文长度,以便更好地理解更大的文本。
With these updates, we’ll be inviting many more people from the waitlist to try GPT-4 over the coming weeks, with the intent to remove the waitlist entirely with this model. Thank you to everyone who has been patiently waiting, we are excited to see what you build with GPT-4!
通过这些更新,我们将在未来几周内邀请候补名单中的更多人试用 GPT-4,目的是使用此模型完全删除候补名单。感谢所有耐心等待的人,我们很高兴看到您使用 GPT-4 构建的内容!

GPT-3.5 Turbo


gpt-3.5-turbo-0613 includes the same function calling as GPT-4 as well as more reliable steerability via the system message, two features that allow developers to guide the model's responses more effectively.
gpt-3.5-turbo-0613 包括与 GPT-4 相同的函数调用以及通过系统消息提供的更可靠的可操纵性,这两个功能允许开发人员更有效地指导模型的响应。
gpt-3.5-turbo-16k offers 4 times the context length of gpt-3.5-turbo at twice the price: $0.003 per 1K input tokens and $0.004 per 1K output tokens. 16k context means the model can now support ~20 pages of text in a single request.
gpt-3.5-turbo-16k 以两倍的价格提供 gpt-3.5-turbo 的上下文长度的 4 倍:每 1K 输入令牌 0.003 美元,每 1K 输出令牌 0.004 美元。 16k 上下文意味着该模型现在可以在单个请求中支持约 20 页文本。

Model deprecations 模型弃用


Today, we’ll begin the upgrade and deprecation process for the initial versions of gpt-4 and gpt-3.5-turbo that we announced in March. Applications using the stable model names (gpt-3.5-turbogpt-4, and gpt-4-32k) will automatically be upgraded to the new models listed above on June 27th. For comparing model performance between versions, our Evals library supports public and private evals to show how model changes will impact your use cases. 
今天,我们将开始对 3 月份宣布的 gpt-4 和 gpt-3.5-turbo 初始版本进行升级和弃用。使用稳定模型名称( gpt-3.5-turbo 、 gpt-4 和 gpt-4-32k )的应用程序将在 6 月 27 日自动升级到上面列出的新模型。为了比较版本之间的模型性能,我们的 Evals 库支持公共和私有评估,以显示模型更改将如何影响您的用例。

Developers who need more time to transition can continue using the older models by specifying gpt-3.5-turbo-0301gpt-4-0314, or gpt-4-32k-0314 in the ‘model’ parameter of their API request. These older models will be accessible through September 13th, after which requests specifying those model names will fail. You can stay up to date on model deprecations via our model deprecation page. This is the first update to these models; so, we eagerly welcome developer feedback to help us ensure a smooth transition.
需要更多时间过渡的开发人员可以通过在 API 请求的“模型”参数中指定 gpt-3.5-turbo-0301 、 gpt-4-0314 或 gpt-4-32k-0314 来继续使用旧模型。这些旧模型将在 9 月 13 日之前开放,之后指定这些模型名称的请求将失败。您可以通过我们的模型弃用页面了解模型弃用的最新信息。这是这些模型的第一次更新;因此,我们热切欢迎开发人员提供反馈,以帮助我们确保顺利过渡。

02

Lower pricing 更低的价格
 

We continue to make our systems more efficient and are passing those savings on to developers, effective today.
我们将继续提高我们的系统效率,并将节省下来的资金转嫁给开发人员,即日起生效。

Embeddings 嵌入


text-embedding-ada-002 is our most popular embeddings model. Today we’re reducing the cost by 75% to $0.0001 per 1K tokens.
text-embedding-ada-002 是我们最受欢迎的嵌入模型。今天,我们将成本降低 75% 至每 1K 代币 0.0001 美元。

GPT-3.5 Turbo


gpt-3.5-turbo is our most popular chat model and powers ChatGPT for millions of users. Today we're reducing the cost of gpt-3.5-turbo’s input tokens by 25%. Developers can now use this model for just $0.0015 per 1K input tokens and $0.002 per 1K output tokens, which equates to roughly 700 pages per dollar.
gpt-3.5-turbo 是我们最受欢迎的聊天模型,为数百万用户提供 ChatGPT 支持。今天,我们将 gpt-3.5-turbo’s 输入代币的成本降低了 25%。开发人员现在可以以每 1K 输入令牌 0.0015 美元和每 1K 输出令牌 0.002 美元的价格使用该模型,这相当于每美元大约 700 页。
gpt-3.5-turbo-16k will be priced at $0.003 per 1K input tokens and $0.004 per 1K output tokens.
gpt-3.5-turbo-16k 的定价为每 1K 输入代币 0.003 美元,每 1K 输出代币 0.004 美元。
Developer feedback is a cornerstone of our platform’s evolution and we will continue to make improvements based on the suggestions we hear. We’re excited to see how developers use these latest models and new features in their applications.
开发者反馈是我们平台发展的基石,我们将继续根据我们听到的建议进行改进。我们很高兴看到开发人员如何在他们的应用程序中使用这些最新模型和新功能。


点赞 0 收藏(0)    分享
相关标签: chatgpt
问题没解决?让chatGPT帮你作答 智能助手
0 个评论
  • 消灭零评论