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

news2024/11/26 14:52:43

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

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

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

项目:点餐系统1

项目简介&#xff1a;实现一个http点餐系统服务器&#xff0c;能够支持用户在浏览器访问服务器获取餐馆首页&#xff0c;进行菜品以及订单管理。 具体模型如下&#xff1a; 用户分类&#xff1a; 管理员&#xff1a;进行订单以及菜品管理&#xff08;菜品&订单的增删改查&a…

【NLP】BERT,BART和T5等LLM模型的比较

一、介绍 在这篇博文中&#xff0c;我将讨论像BERT&#xff0c;BART和T5这样的大型语言模型。到2020年&#xff0c;LLM领域取得的主要进展包括这些模型的开发。BERT和T5由Google开发&#xff0c;BART由Meta开发。我将根据这些模型的发布日期依次介绍这些模型的详细信息。在之前…

thinkphp实现无限分类(使用递归)

thinkphp实现无限分类&#xff08;使用递归&#xff09; 本文实例为大家分享了thinkphp实现无限分类的详细代码&#xff0c;希望对大家学习无限分类有所启发。 数据库&#xff1a;test 数据表&#xff1a;&#xff08;tp_category&#xff09;&#xff1a; Common/conf/conf…

Python如何读写配置文件?

目录 什么是配置文件 常见的配置文件格式 为什么要使用配置文件 Python如何读写配置文件&#xff1f; 什么是配置文件 配置文件是用于存储程序或系统的设置和配置选项的文本文件。它通常以特定的格式编写&#xff0c;以便程序或系统可以读取和解析其中的配置信息。配置文件…

汽车资讯新闻网站nodejs+vue

本汽车资讯网站有管理员和用户。管理员功能有个人中心&#xff0c;用户管理&#xff0c;汽车品牌管理&#xff0c;价格分类管理&#xff0c;经销商管理&#xff0c;汽车信息管理&#xff0c;留言板管理&#xff0c;系统管理等。用户可以查看各种汽车信息&#xff0c;还可以进行…

Spring 中一个少见的引介增强 IntroductionAdvisor

我们平时做 AOP 开发的时候&#xff0c;基本上都是增强某一个方法&#xff0c;在某一个方法执行之前或者执行之后做一些事情&#xff0c;这种叫做 PointcutAdvisor&#xff0c;实际上&#xff0c;Spring 中的 Advisor 大致可以分为两种类型&#xff0c;除了 PointcutAdvisor 之…

极简并优雅的在IDEA使用Git远程拉取项目和本地推送项目

连接Git 搜索Git然后将你下载好的Git的文件目录位置给他弄进去就行 本地分支管理 分支管理通常是在IDEA的右下角找到 连接远程仓库 方法1本地项目推送到远程仓库 如果当前项目还没交给Git管理的则按照以下图所示先将项目交给Git管理 然后此时文件都会是红色的&#xff0c;这表…

3.矩阵常用操作

文章目录 线性代数的常用操作1.向量的内积2.向量的外积3.正交向量4.正交向量组5.向量空间的基与维数6.正交矩阵7.反对称矩阵8.齐次坐标与齐次变换矩阵9.相似矩阵10.相似对角化11.矩阵的特征分解12.奇异值分解SVD12.1 SVD求齐次矩阵方程的最小二乘解 13.满秩分解14.Pseudo-Inver…

Python入门【 控制语句和逻辑思维、选择结构(条件判断结构)双分支选择结构、多分支选择结构、循环结构、while循环 】(七)

&#x1f44f;作者简介&#xff1a;大家好&#xff0c;我是爱敲代码的小王&#xff0c;CSDN博客博主,Python小白 &#x1f4d5;系列专栏&#xff1a;python入门到实战、Python爬虫开发、Python办公自动化、Python数据分析、Python前后端开发 &#x1f4e7;如果文章知识点有错误…

LeetCode·每日一题·2208. 将数组和减半的最少操作次数·优先队列

作者&#xff1a;小迅 链接&#xff1a;https://leetcode.cn/problems/minimum-operations-to-halve-array-sum/solutions/2357852/you-xian-dui-lie-zhu-shi-chao-ji-xiang-x-805n/ 来源&#xff1a;力扣&#xff08;LeetCode&#xff09; 著作权归作者所有。商业转载请联系作…

如何打开工业相机(海康)与halcon方式打开

使用海康相机&#xff0c;下载对应的客户端软件 地址&#xff1a;https://www.hikrobotics.com/cn/machinevision/service/download 界面如下&#xff1a; 使用 halcon 读取相机&#xff0c;需要将对应的动态链接库dll文件放入halcon的安装目录中&#xff0c;如下&#xff0c;…

Linux中的chmod命令使用方法总结

chmod命令用于更改文件或目录的权限chmod命令的基本语法如下&#xff1a;范例研究&#xff1a;rwx权限对于文件和目录的作用 chmod命令用于更改文件或目录的权限 它允许用户控制谁可以读取、写入和执行文件。 权限由三个组成部分组成&#xff0c;分别是所有者权限、所属组权限…

企业邮箱选购:选择最适合您的方案

作为一名公司员工&#xff0c;你需要一个专业且令人难忘的公司电子邮件地址。毕竟无论何时你和你的联系人交流&#xff0c;你都代表着你公司的品牌。但是你应该选择什么样的公司电子邮件地址呢? 首先&#xff0c;考虑使用你公司的域名作为你的公司电子邮件地址。这是最专业的方…

【C++入门到精通】C++入门—缺省参数、函数重载

目录 前言 一、缺省参数 1.缺省参数的概念 2.缺省参数分类 ⭕全缺省参数 ⭕半缺省参数 二、函数重载 1.函数重载的概念 2.函数重载类型 &#x1f534;参数类型不同 &#x1f534;参数个数不同 &#x1f534;参数类型顺序不同 C支持函数重载的原理--名字修饰(name Mangli…

基于Android Studio编辑器上开发的一款看点新闻App

完整资料进入【数字空间】查看——baidu搜索"writebug" 1 系统需求分析 1.1 引言 1.1.1 开发目的 看点新闻App的开发是为了实时查看最新消息以了解社会动态&#xff0c;增长知识&#xff0c;增广见闻&#xff0c;顺便娱乐一下内心世界来放松自己。 1.1.2 开发背景 …

【雕爷学编程】Arduino动手做(85)---LCD1602液晶屏模块4

37款传感器与执行器的提法&#xff0c;在网络上广泛流传&#xff0c;其实Arduino能够兼容的传感器模块肯定是不止这37种的。鉴于本人手头积累了一些传感器和执行器模块&#xff0c;依照实践出真知&#xff08;一定要动手做&#xff09;的理念&#xff0c;以学习和交流为目的&am…

FPGA学习——实现任意倍分频器(奇数/偶数倍分频器均可实现)

文章目录 一、分频器二、Verilog实现任意倍分频器2.1、Verilog源码2.2、仿真文件 三、仿真波形图 一、分频器 在FPGA&#xff08;可编程逻辑门阵列&#xff09;中&#xff0c;分频器是一种用于将时钟信号的频率降低的电路或模块。它可以根据输入的时钟信号生成一个较低频率的输…

Vivado 差分输出引脚配置

diff_out输出如下所示 在引脚配置时&#xff0c;如下图所示&#xff0c;只能设置一个Pos Diff的引脚&#xff0c;此时设置完Pos Diff的引脚后&#xff0c;Neg Diff默认被绑定在相邻的引脚 我们可以打开上图中Package Pins页面&#xff0c;发现这一对引脚设置完毕

基于Java+Swing+mysql人力资源管理系统_员工信息管理系统

基于JavaSwingmysql人力资源管理系统/员工信息管理系统 一、系统介绍二、效果展示1、登陆2、查看个人信息--员工3、更新个人信息--员工4、管理员主页&#xff08;增删改查&#xff09; 三、其他系统实现四、获取源码 一、系统介绍 系统主要分为两个角色&#xff1a; 员工&…

【LeetCode-中等】剑指 Offer 67. 把字符串转换成整数(详解)

题目 写一个函数 StrToInt&#xff0c;实现把字符串转换成整数这个功能。不能使用 atoi 或者其他类似的库函数。 首先&#xff0c;该函数会根据需要丢弃无用的开头空格字符&#xff0c;直到寻找到第一个非空格的字符为止。 当我们寻找到的第一个非空字符为正或者负号时&#…