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

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

Chatgpt Web API 免费的,只要有账号就可以使用。

 

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 提交回去,就可以实现多伦对话了,

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/44041.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

52.弱集合 WeakSet

WeakSet与Set相似&#xff0c;Set的方法在WeakSet中基本都能使用 WeakSet只能放对象 WeakSet不能被遍历 目录 1 创建WeakSet 2 弱集合的指向问题 1 创建WeakSet 直接在创建的时候把对象放进去是不行的 你需要用add()方法才可以放进去 2 弱集合的指向问题 当你把obj加…

前后端分离windows本地nginx解决跨域

下载 http://nginx.org/en/download.html 命令 启动Nginx&#xff1a; nginx.exe start 快速停止或关闭Nginx&#xff1a; nginx.exe -s stop 正常停止或关闭Nginx&#xff1a; nginx.exe -s quit 配置文件修改重装载命令&#xff1a; nginx.exe -s reload 强制停用…

Java基本数据类型

Java基本数据类型 字面常量数据类型变量整形变量长整形变量短整型变量字节型变量思考浮点型变量双精度浮点型单精度浮点型 字符型布尔型变量 类型转换类型提升 字面常量 字符串常量&#xff1a;由""括起来的&#xff0c;比如“12345”、“hello”、“你好”。整形常量…

机器学习---经验误差与过拟合、方差与偏差、性能度量、比较检验

1. 经验误差与过拟合 第三张图建立的模型&#xff0c;在训练集中通过x可以很好的预测y&#xff0c;然而我们不能预期该模型能够很好的预 测集外的数据&#xff0c;换句话说&#xff0c;这个模型没有很好的泛化能力。 第一张图建立了一个线性模型&#xff0c;但是该模型并没有…

Nginx 301 https跳转后出现跨域和混合内容问题 —— 筑梦之路

问题 在浏览器地址栏敲入url访问静态资源目录时&#xff0c;发现默认跳转到了http协议的地址 如上图所示&#xff0c;客户端https请求先到达API网关&#xff0c;然后网关将请求通过http协议转发到静态资源服务器。 调出浏览器发现客户端发送的https请求收到了一个301状态码的响…

nodejs+vue+elementui学习交流和学习笔记分享系统

Node.js 是一个基于 Chrome JavaScript 运行时建立的一个平台。 前端技术&#xff1a;nodejsvueelementui,视图层其实质就是vue页面&#xff0c;通过编写vue页面从而展示在浏览器中&#xff0c;编写完成的vue页面要能够和控制器类进行交互&#xff0c;从而使得用户在点击网页进…

Kotlin 协程 CoroutineScope

协程定义&#xff1a; 19年官方是这样说的&#xff1a;协程是轻量级的线程&#xff0c;协程就是 Kotlin 提供的一套线程封装的 API&#xff1b; 现在官方是这样说的&#xff1a;协程是一种并发设计模式&#xff1b; 协程作用&#xff1a; 1.处理耗时任务&#xff1b; 2.保…

Kotlin 新版本 1.9.0重要更新预览

释放 Kotlin 新版本 1.9.0 的强大功能 1. Kotlin K2编译器用于多平台 对K2编译器进行了进一步的改进&#xff0c;使其更加稳定。K2编译器针对JVM目标现已进入Beta版本&#xff0c;并且也可以在多平台项目中使用。 您可以通过将K2配置添加到项目的gradle.properties中&#x…

九、数据结构——顺序队列中的循环队列

目录 一、循环队列的定义 二、循环队列的实现 三、循环队列的基本操作 ①初始化 ②判空 ③判满 ④入队 ⑤出队 ⑥获取长度 ⑦打印 四、循环队列的应用 五、全部代码 数据结构中的循环队列 在数据结构中&#xff0c;队列&#xff08;Queue&#xff09;是一种常见的线性数据结…

pytest+allure运行出现乱码的解决方法

pytestallure运行出现乱码的解决方法 报错截图&#xff1a; 这里的截图摘自 悟翠人生 小伙伴的https://blog.csdn.net/weixin_45435918/article/details/107601721一文。 这是因为没有安装allure运行环境或者没有配置allure的环境变量导致&#xff0c;解决方案&#xff1a; 1…

Vue移动端项目--瑞幸咖啡重构优化

来了客官&#xff0c;好久不见&#xff01; 从年初开始&#xff0c;就有个想法&#xff0c;想着把之前做过的项目重新整理一下。毕竟今时不同往日&#xff0c;从现在的角度去看曾经做过的项目&#xff0c;倒是觉得有很多稚嫩的地方。毕竟无论做什么都是熟能生巧&#xff0c;由浅…

深度学习推理和训练

优化和泛化 深度学习的根本问题是优化和泛化之间的对立。 • 优化&#xff08;optimization&#xff09;是指调节模型以在 训练数据 上得到最佳性能&#xff08;即机器学习中的学习&#xff09;。 • 泛化&#xff08;generalization&#xff09;是指训练好的模型在 前所未…

2023JAVA 架构师面试 130 题含答案:JVM+spring+ 分布式 + 并发编程》...

此文包含 Java 面试的各个方面&#xff0c;史上最全&#xff0c;苦心整理最全 Java 面试题目整理包括基JVM算法数据库优化算法数据结构分布式并发编程缓存等&#xff0c;使用层面广&#xff0c;知识量大&#xff0c;涉及你的知识盲点。要想在面试者中出类拔萃就要比人付出更多的…

nginx怎么做负载均衡

Nginx怎么做负载均衡 Nginx 是一个高性能的开源反向代理服务器&#xff0c;可以用于实现负载均衡。负载均衡指的是将用户请求平均分配给多个服务器&#xff0c;以提高整体系统性能和可靠性。下面是一个详细介绍如何使用 Nginx 实现负载均衡的步骤&#xff1a; 步骤 1&#xf…

【Nodejs】Node.js简介

1.前言 Node 的重要性已经不言而喻&#xff0c;很多互联网公司都已经有大量的高性能系统运行在 Node 之上。Node 凭借其单线程、异步等举措实现了极高的性能基准。此外&#xff0c;目前最为流行的 Web 开发模式是前后端分离的形式&#xff0c;即前端开发者与后端开发者在自己喜…

提升Web3安全性和用户体验:元事务和加密技术的应用

在Web3中&#xff0c;去中心化应用程序&#xff08;DApps&#xff09;是一种基于区块链技术的应用程序&#xff0c;它们通过智能合约实现透明、安全、去中心化的业务逻辑。然而&#xff0c;DApps的使用门槛比传统的中心化应用程序更高&#xff0c;需要用户具备一定的技术知识&a…

工厂能耗管理系统解决方案

1、概述 随着碳达峰、碳中和成为政府工作主要任务&#xff0c;工厂作为能耗密集&#xff0c;用能情况较为复杂的大型建筑&#xff0c;有效的降低能源消耗&#xff0c;减少能源成本&#xff0c;避免用能过程中的“跑冒滴漏”现象&#xff0c;实施能效综合考评是个非常必要的管理…

C语言学习笔记 VScode设置C环境-06

目录 一、下载vscode软件 二、安装minGW软件 三、VS Code安装C/C插件 3.1 搜索并安装C/C插件 3.2 配置C/C环境 总结 一、下载vscode软件 在官网上下载最新的版本 Download Visual Studio Code - Mac, Linux, Windowshttps://code.visualstudio.com/download 二、安装minGW…

添加USB转串口设备驱动-迅为i.MX8M开发板

对于通过 USB 接口访问的模块&#xff0c;在 Linux 内核中集成 USB 驱动程序。我们需要配置内核选中支持 GSM 和 CDMA 模块的 USB 转串口驱动 > Device Drivers -> USB support (USB_SUPPORT [y]) -> USB Serial Converter support (USB_SERIAL [y]) -> USB driver…