如何选择适当的openai.api_version?

huangapple go评论110阅读模式
英文:

How can I select the proper openai.api_version?

问题

我在https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/chatgpt?pivots=programming-language-chat-completions上阅读到:

openai.api_version = "2023-05-15"

和https://learn.microsoft.com/en-us/answers/questions/1193969/how-to-integrate-tiktoken-library-with-azure-opena上:

openai.api_version = "2023-03-15-preview"

这让我想知道:我该如何选择适当的 openai.api_version?这取决于我的Azure OpenAI实例、部署的模型还是我在Python代码中使用的功能,或者其他什么?我在我的部署模型中找不到这些信息。

英文:

I read on https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/chatgpt?pivots=programming-language-chat-completions:

openai.api_version = "2023-05-15" 

and on https://learn.microsoft.com/en-us/answers/questions/1193969/how-to-integrate-tiktoken-library-with-azure-opena:

openai.api_version = "2023-03-15-preview" 

This makes me wonder: How can I select the proper openai.api_version? Does that depend on my Azure OpenAI instance or deployed models or which features I use in my Python code? Or something else?

I couldn't find the info in my deployed models:

如何选择适当的openai.api_version?

答案1

得分: 3

API版本属性取决于您在API中调用的方法:并非所有API版本都支持所有方法。

详细信息在此处列出:https://learn.microsoft.com/en-US/azure/cognitive-services/openai/reference

示例:“completions”终端在以下版本中可用(按日期排序):

  • 2023-06-01-preview
  • 2023-05-15
  • 2023-03-15-preview
  • 2022-12-01

但是,“chat completions”终端仅在以下版本中可用(按日期排序):

  • 2023-06-01-preview
  • 2023-05-15
  • 2023-03-15-preview
    因为基本上它在初始API中未提供。

通常情况下,尽可能使用最新的“非预览”版本进行生产。

英文:

The API Version property depends on the method you are calling in the API: all methods are not supported in all API versions.

Details are listed here: https://learn.microsoft.com/en-US/azure/cognitive-services/openai/reference

Example: "completions" endpoint is available in the following versions (ordered by date):

  • 2023-06-01-preview
  • 2023-05-15
  • 2023-03-15-preview
  • 2022-12-01

But "chat completions" endpoint is available only in the following versions (ordered by date):

  • 2023-06-01-preview
  • 2023-05-15
  • 2023-03-15-preview
    Because basically it was not offered in the initial API.

Generally, use the latest "not preview" version for production when possible.

huangapple
  • 本文由 发表于 2023年6月14日 23:52:48
  • 转载请务必保留本文链接:https://go.coder-hub.com/76475419.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定