• 日常搜索
  • 端口查询
  • IP查询
  • 在线工具
  • 搜本站

ChatGPT聊天提问游戏工具+ChatGPT 接口文档(两种对话模型)




ChatGPT 接口文档(两种对话模型)

text-davinci-003

URL:https://api.openai.com/v1/completions

Method:POST

Header:Authorization:Bearer {openAi 提供的 ApiKey}

Body:

{ "model": "text-davinci-003", "prompt": "{你的问题}", "max_tokens": 2048, "temperature": 0, "top_p": 1, "frequency_penalty": 0, "presence_penalty": 0.0 }

Response:

{ "id": "cmpl-6k24JAgcD2EnQ0IZOiFKVkX5IG6", "object": "text_completion", "created": 16769059, "model": "text-davinci-003", "choices": [ { "text": "\n\n 你好,我在。有什么可以帮助你的吗?Chat GPT 的回答", "index": 0, "logprobs": null, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 6, "completion_tokens": 36, "total_tokens": 42 } }


gpt-3.5-turbo

URL:https://api.openai.com/v1/chat/completions

Method:POST

Header:Authorization:Bearer {openAi 提供的 ApiKey}

Body:

{

"model": "gpt-3.5-turbo",

"messages": [{"role": "user", "content": "你的问题"}]

}

Response:

{ 'id': 'chatcmpl-6p9XYPYSTTRi0xEviKjjilqrWU2Ve', 'object': 'chat.completion', 'created': 1677649420, 'model': 'gpt-3.5-turbo', 'usage': {'prompt_tokens': 56, 'completion_tokens': 31, 'total_tokens': 87}, 'choices': [ { 'message': { 'role': 'assistant', 'content': 'The 2020 World Series was played in Arlington, Texas at the Globe Life Field, which was the new home stadium for the Texas Rangers.'}, 'finish_reason': 'stop', 'index': 0 } ] }


【gpt-3.5-turbo】 vs 【text-davinci-003】

gpt-3.5-turbo每个token的成本是text-davinci-003的10%

text-davinci-003模型的AI更容易被训练


注:finish_reason为length时,可尝试调整max_tokens、可通过usage的total_tokens查看本次消耗的token数量

附件地址:

附件为zip压缩包源文件

此处为隐藏内容,请点击右侧联系客服,谢谢!

文章目录
  • UltraEdit for Mac 全新功能:
    • 1、文件处理与无缝工作状态
    • 2、与自动保存的区别
    • 3、HTML优化
    • 4、搜索结果的新展示方式
    • 5、直接在编辑器中打开超链接
    • 6、便捷的快捷键操作
  • 总结:
  • 相关工具:
  • 工具获取地址:
  • 发表评论

    QQ
    站长WX
    手机扫一扫 关注本站小程序