Chatgpt Web API 创建对话,免费,不计token数量,模仿网页提交对话

这篇具有很好参考价值的文章主要介绍了Chatgpt Web API 创建对话,免费,不计token数量,模仿网页提交对话。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

Chatgpt  API  是收费的,按token使用量计费

Chatgpt Web API 免费的,只要有账号就可以Chatgpt Web API 创建对话,免费,不计token数量,模仿网页提交对话,chatgpt,webapi使用。

 

curl 'https://chat.openai.com/backend-api/conversation' \
  -H 'authority: chat.openai.com' \
  -H 'accept: text/event-stream' \
  -H 'accept-language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6' \
  -H 'authorization: Bearer *****************************' \
  -H 'content-type: application/json' \
  -H 'cookie: ********************************; _dd_s=' \
  -H 'origin: https://chat.openai.com' \
  -H 'sec-ch-ua: "Not.A/Brand";v="8", "Chromium";v="114", "Microsoft Edge";v="114"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "Windows"' \
  -H 'sec-fetch-dest: empty' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-site: same-origin' \
  -H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1823.67' \
  --data-raw '{"action":"next","messages":[{"id":"aaa23496-15a3-485f-b0f6-a414410427d6","author":{"role":"user"},"content":{"content_type":"text","parts":["1+1"]},"metadata":{}}],"conversation_id":"d64d724f-3455-413e-ac72-b42b3f4b0ffe","parent_message_id":"cf818ae7-b9d6-4d43-b699-fe806d413270","model":"text-davinci-002-render-sha","timezone_offset_min":-480,"history_and_training_disabled":false,"arkose_token":null}' \
  --compressed

 返回是json信息

data: {"message": {"id": "e510886d-9980-451d-8a3d-5f07f8e39bf1", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1690188074.886316, "update_time": null, "content": {"content_type": "text", "parts": [""]}, "status": "in_progress", "end_turn": null, "weight": 1.0, "metadata": {"message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d64d724f-3455-413e-ac72-b42b3f4b0ffe", "error": null}

data: {"conversation_id": "d64d724f-3455-413e-ac72-b42b3f4b0ffe", "message_id": "aaa23496-15a3-485f-b0f6-a414410427d6", "is_completion": false, "moderation_response": {"flagged": false, "blocked": false, "moderation_id": "modr-7flPu9JUekemN6KyhJQo2nYzfkWdh"}}

data: {"message": {"id": "e510886d-9980-451d-8a3d-5f07f8e39bf1", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1690188074.886316, "update_time": null, "content": {"content_type": "text", "parts": ["The"]}, "status": "in_progress", "end_turn": null, "weight": 1.0, "metadata": {"message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d64d724f-3455-413e-ac72-b42b3f4b0ffe", "error": null}

data: {"message": {"id": "e510886d-9980-451d-8a3d-5f07f8e39bf1", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1690188074.886316, "update_time": null, "content": {"content_type": "text", "parts": ["The sum"]}, "status": "in_progress", "end_turn": null, "weight": 1.0, "metadata": {"message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d64d724f-3455-413e-ac72-b42b3f4b0ffe", "error": null}

data: {"message": {"id": "e510886d-9980-451d-8a3d-5f07f8e39bf1", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1690188074.886316, "update_time": null, "content": {"content_type": "text", "parts": ["The sum of"]}, "status": "in_progress", "end_turn": null, "weight": 1.0, "metadata": {"message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d64d724f-3455-413e-ac72-b42b3f4b0ffe", "error": null}

data: {"message": {"id": "e510886d-9980-451d-8a3d-5f07f8e39bf1", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1690188074.886316, "update_time": null, "content": {"content_type": "text", "parts": ["The sum of "]}, "status": "in_progress", "end_turn": null, "weight": 1.0, "metadata": {"message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d64d724f-3455-413e-ac72-b42b3f4b0ffe", "error": null}

data: {"message": {"id": "e510886d-9980-451d-8a3d-5f07f8e39bf1", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1690188074.886316, "update_time": null, "content": {"content_type": "text", "parts": ["The sum of 1"]}, "status": "in_progress", "end_turn": null, "weight": 1.0, "metadata": {"message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d64d724f-3455-413e-ac72-b42b3f4b0ffe", "error": null}

data: {"message": {"id": "e510886d-9980-451d-8a3d-5f07f8e39bf1", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1690188074.886316, "update_time": null, "content": {"content_type": "text", "parts": ["The sum of 1 +"]}, "status": "in_progress", "end_turn": null, "weight": 1.0, "metadata": {"message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d64d724f-3455-413e-ac72-b42b3f4b0ffe", "error": null}

data: {"message": {"id": "e510886d-9980-451d-8a3d-5f07f8e39bf1", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1690188074.886316, "update_time": null, "content": {"content_type": "text", "parts": ["The sum of 1 + "]}, "status": "in_progress", "end_turn": null, "weight": 1.0, "metadata": {"finish_details": {"type": "stop", "stop": "<|diff_marker|>"}, "message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d64d724f-3455-413e-ac72-b42b3f4b0ffe", "error": null}

data: {"message": {"id": "e510886d-9980-451d-8a3d-5f07f8e39bf1", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1690188074.886316, "update_time": null, "content": {"content_type": "text", "parts": ["The sum of 1 + 1"]}, "status": "in_progress", "end_turn": null, "weight": 1.0, "metadata": {"finish_details": {"type": "stop", "stop": "<|diff_marker|>"}, "message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d64d724f-3455-413e-ac72-b42b3f4b0ffe", "error": null}

data: {"message": {"id": "e510886d-9980-451d-8a3d-5f07f8e39bf1", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1690188074.886316, "update_time": null, "content": {"content_type": "text", "parts": ["The sum of 1 + 1 is"]}, "status": "in_progress", "end_turn": null, "weight": 1.0, "metadata": {"finish_details": {"type": "stop", "stop": "<|diff_marker|>"}, "message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d64d724f-3455-413e-ac72-b42b3f4b0ffe", "error": null}

data: {"message": {"id": "e510886d-9980-451d-8a3d-5f07f8e39bf1", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1690188074.886316, "update_time": null, "content": {"content_type": "text", "parts": ["The sum of 1 + 1 is equal"]}, "status": "in_progress", "end_turn": null, "weight": 1.0, "metadata": {"finish_details": {"type": "stop", "stop": "<|diff_marker|>"}, "message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d64d724f-3455-413e-ac72-b42b3f4b0ffe", "error": null}

data: {"message": {"id": "e510886d-9980-451d-8a3d-5f07f8e39bf1", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1690188074.886316, "update_time": null, "content": {"content_type": "text", "parts": ["The sum of 1 + 1 is equal to"]}, "status": "in_progress", "end_turn": null, "weight": 1.0, "metadata": {"finish_details": {"type": "stop", "stop": "<|diff_marker|>"}, "message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d64d724f-3455-413e-ac72-b42b3f4b0ffe", "error": null}

data: {"message": {"id": "e510886d-9980-451d-8a3d-5f07f8e39bf1", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1690188074.886316, "update_time": null, "content": {"content_type": "text", "parts": ["The sum of 1 + 1 is equal to "]}, "status": "in_progress", "end_turn": null, "weight": 1.0, "metadata": {"finish_details": {"type": "stop", "stop": "<|diff_marker|>"}, "message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d64d724f-3455-413e-ac72-b42b3f4b0ffe", "error": null}

data: {"message": {"id": "e510886d-9980-451d-8a3d-5f07f8e39bf1", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1690188074.886316, "update_time": null, "content": {"content_type": "text", "parts": ["The sum of 1 + 1 is equal to 2"]}, "status": "in_progress", "end_turn": null, "weight": 1.0, "metadata": {"finish_details": {"type": "stop", "stop": "<|diff_marker|>"}, "message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d64d724f-3455-413e-ac72-b42b3f4b0ffe", "error": null}

data: {"message": {"id": "e510886d-9980-451d-8a3d-5f07f8e39bf1", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1690188074.886316, "update_time": null, "content": {"content_type": "text", "parts": ["The sum of 1 + 1 is equal to 2."]}, "status": "in_progress", "end_turn": null, "weight": 1.0, "metadata": {"finish_details": {"type": "stop", "stop": "<|diff_marker|>"}, "message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d64d724f-3455-413e-ac72-b42b3f4b0ffe", "error": null}

data: {"message": {"id": "e510886d-9980-451d-8a3d-5f07f8e39bf1", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1690188074.886316, "update_time": null, "content": {"content_type": "text", "parts": ["The sum of 1 + 1 is equal to 2."]}, "status": "finished_successfully", "end_turn": true, "weight": 1.0, "metadata": {"finish_details": {"type": "stop", "stop": "<|diff_marker|>"}, "message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d64d724f-3455-413e-ac72-b42b3f4b0ffe", "error": null}

data: {"message": {"id": "e510886d-9980-451d-8a3d-5f07f8e39bf1", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1690188074.886316, "update_time": null, "content": {"content_type": "text", "parts": ["The sum of 1 + 1 is equal to 2."]}, "status": "finished_successfully", "end_turn": true, "weight": 1.0, "metadata": {"finish_details": {"type": "stop", "stop": "<|diff_marker|>"}, "is_complete": true, "message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d64d724f-3455-413e-ac72-b42b3f4b0ffe", "error": null}

data: {"conversation_id": "d64d724f-3455-413e-ac72-b42b3f4b0ffe", "message_id": "e510886d-9980-451d-8a3d-5f07f8e39bf1", "is_completion": true, "moderation_response": {"flagged": false, "blocked": false, "moderation_id": "modr-7flPvfmGn6R9zsTTrnKoe4i9Z6M2c"}}

data: [DONE]

要实现多伦对话的话,记住返回来的

conversation_id": "d64d724f-3455-413e-ac72-b42b3f4b0ffe"

parent_message_id 为上一个问题返回的来的值

{"action":"next","messages":[{"id":"aaa2fcb2-f05b-4df3-a437-f5064e0949b2","author":{"role":"user"},"content":{"content_type":"text","parts":["333"]},"metadata":{}}],"conversation_id":"d64d724f-3455-413e-ac72-b42b3f4b0ffe","parent_message_id":"e510886d-9980-451d-8a3d-5f07f8e39bf1","model":"text-davinci-002-render-sha","timezone_offset_min":-480,"history_and_training_disabled":false,"arkose_token":null}

把这个id 提交回去,就可以实现多伦对话了,文章来源地址https://www.toymoban.com/news/detail-603887.html

到了这里,关于Chatgpt Web API 创建对话,免费,不计token数量,模仿网页提交对话的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • WEB3 在 React搭建的Dapp中通过redux全局获取并存储用户ETH与自定义token与交易所存储数量

    上文 web3 在React dapp中全局管理web3当前登录用户/智能合约等信息中 我们简单操作,将web3的公共信息都存在了window对象上 然后 我们先来启动一下环境 终端输入 打开项目 终端输入 在区块链上发布一下智能合约 然后 我们在 src下的 components 目录下创建两个组件 分别是 余额组件

    2024年02月05日
    浏览(49)
  • Java调用ChatGPT的API接口实现对话与图片生成

    有些魔法是需要做配置的。否则无法正确实现代码测试。这里以我使用的工具为例说明。 在pom.xml文件中添加: Constants类中,声明自己的API Key 其中,查看API Key的位置: https://platform.openai.com/account/api-keys 余额查询: https://platform.openai.com/account/usage pom.xml文件中需要增加依赖:

    2024年02月07日
    浏览(51)
  • 【课件】Python调用OpenAI API实现ChatGPT多轮对话

    如何实现多轮对话? gpt-3.5-turbo 模型调用方法 openai.ChatCompletion.create 里传入的 message 是一个列表,列表里每个元素是字典,包含了角色和内容,我们只需将每轮对话都存储起来,然后每次提问都带上之前的问题和回答即可。 代码解析: ChatGPT 类,包含三个函数: __init__ 初始

    2024年02月03日
    浏览(48)
  • ASP.NET Core Web API之Token验证

    在实际开发中,我们经常需要对外提供接口以便客户获取数据,由于数据属于私密信息,并不能随意供其他人访问,所以就需要验证客户身份。那么如何才能验证客户的什么呢?今天以一个简单的小例子,简述ASP.NET Core Web API开发过程中,常用的一种JWT身份验证方式。仅供学

    2024年02月11日
    浏览(47)
  • ChatGPT token访问和API访问的区别,哪个更适合企业级应用?

    ChatGPT是基于OpenAI的GPT-4模型开发的一款聊天式人工智能,它可以理解和生成自然语言,与用户进行多轮对话。ChatGPT旨在为用户提供智能、有趣的对话体验,可用于回答问题、进行讨论等。ChatGPT Plus是针对ChatGPT的一项增值服务,通过订阅此服务,用户可以获得更多功能和优先

    2024年02月06日
    浏览(43)
  • OpenAI 推出用于下一代对话式 AI 开发的 ChatGPT 和 Whisper API

    人工智能已经成为技术行业的推动力,使机器能够学习和执行以前被认为是人类独有的任务。领先的 AI 研究机构 OpenAI 一直走在这场革命的最前沿,开发可以处理自然语言并生成类似人类文本的强大模型。其中一个模型是 ChatGPT API,它可以对文本输入生成连贯且上下文相关的

    2024年02月09日
    浏览(53)
  • 【开源免费】ChatGPT-Java版SDK更新至1.0.10版,支持Tokens计算,快来一键接入。

    ChatGPT Java版SDK开源地址:https://github.com/Grt1228/chatgpt-java ,目前收获将近1000个star。 有bug欢迎朋友们指出,互相学习,所有咨询全部免费。 最新版:1.0.10 整合web示例,支持流式返回: 开发思路可以参考:https://github.com/Grt1228/chatgpt-steam-output 流式输出实现方式 小程序 安卓 io

    2023年04月10日
    浏览(41)
  • Java调用ChatGPT(基于SpringBoot),实现可连续对话和流式输出的ChatGPT API(可自定义实现AI助手)

    源码及更详细的介绍说明参见Git上的 README.md 文档 https://github.com/asleepyfish/chatgpt 本文Demo(SpringBoot和Main方法Demo均包括)的Git地址:https://github.com/asleepyfish/chatgpt-demo 流式输出结合Vue前端的Demo的Git地址:https://github.com/asleepyfish/chatgpt-vue 后续使用方法和api版本更新均在Github的READM

    2023年04月13日
    浏览(51)
  • 17行代码用python对接openai的api实现chatgpt微信对话机器人

    itchat python依赖下载 这里推荐这个。链接:衡天云

    2024年02月01日
    浏览(55)
  • 快速替换chatgpt-web项目的access token的脚本

    问题背景,由于GPT access token 会定期失效,更换服务器的项目的access token较为繁琐,特写一脚本协助完成更换access token。 使用方法: 脚本内容:

    2024年02月16日
    浏览(43)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包