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 提交回去,就可以实现多伦对话了,
相关文章:
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…...
嵌入式软件—RK3568开发环境搭建
一、RK3568 1.1 开发板特点 BSP比较大,对于电脑内存和存储空间要求高 1.2 BSP BSP(Board Support Package,板级支持包),类似于PC系统中BIOS和驱动程序的集合,BSP包含的范围更广,除了外设驱动…...
使用 OpenCV 和 GrabCut 算法进行交互式背景去除
一、说明 我想,任何人都可以尝试从图像中删除背景。当然,有大量可用的软件或工具能够做到这一点,但其中一些可能很昂贵。但是,我知道有人使用窗口绘画3D魔术选择或PowerPoint背景去除来删除背景。 如果您是计算机视觉领域的初学者…...
在Windows server 2012上使用virtualBox运行CentOS7虚拟机,被强制休眠(二)
问题场景 本月7月10日处理了一个虚拟机被强制暂停的问题,详见:在Windows server 2012上使用virtualBox运行CentOS7虚拟机,被强制暂停当时是由于C盘存储空间不足,导致虚拟机被强制暂停,将虚拟机迁移后,问题…...
sql学习笔记
sql语句优先级 FROM → WHERE → GROUP BY → SELECT → HAVING → ORDER BY sql case用法 例题: 按照销售单价( sale_price )对练习 3.6 中的 product(商品)表中的商品进行如下分类。 低档商品:销售单价在1000日元以下&#x…...
Ubuntu 20.04.4 LTS安装Terminator终端(Linux系统推荐)
Terminator终端可以在一个窗口中创建多个终端,并且可以水平、垂直分割,运行ROS时很方便。 sudo apt install terminator这样安装完成后,使用快捷键Ctrl Alt T打开的就是新安装的terminator终端,可以使用以下方法仍然打开ubuntu默…...
22. 括号生成
题目描述 数字 n 代表生成括号的对数,请你设计一个函数,用于能够生成所有可能的并且 有效的 括号组合。 示例 1: 输入:n 3 输出:["((()))","(()())","(())()","()(())",&…...
WPF实战学习笔记05-首页界面
首页界面 新建文件 添加文件[类型:用户控件] ./Common/Models/TaskBars.cs ./Common/Models/ToDoDto.cs ./Common/Models/MemoDto.cs 新建类 TaskBars.cs using System; using System.Collections.Generic; using System.Linq; using Sy…...
一文带你迅速入门SprIngMVC,看这一篇就足够了!
0. 什么是SpringMVC 要知道什么是SpringMVC,我们首先得知道什么 MVC,MVC是软件工程中的一种架构模式,分为 Model、View、Control。它把软件系统分为模型、视图和控制器三个基本部分。 Model:模型,应用程序负责数据逻…...
js路由跳转时放弃正在pending的请求
在单页面应用中通常会对请求进行catch处理,如果用户打开a页面后页面发出了一个请求去获取aaa,但是由于某种原因请求一直在pending。此时用户又进入了b页面,在浏览时a页面的请求失败了,然后页面弹出提示:“数据aaa请求失…...
LeetCode(sql)-0723
聚合函数 620 select * from cinema where mod(id,2)1 and description <> boring order by rating desc1251 select p.product_id, Round(sum(price*units)/sum(units),2)as average_price from UnitsSold u left join Prices p using(product_id) where purchase_d…...
【C++】开源:grpc远程过程调用(RPC)配置与使用
😏★,:.☆( ̄▽ ̄)/$:.★ 😏 这篇文章主要介绍grpc远程过程调用(RPC)配置与使用。 无专精则不能成,无涉猎则不能通。。——梁启超 欢迎来到我的博客,一起学习,共同进步。 喜…...
rabbitmq模块启动报java.net.SocketException: socket closed的解决方法
问题 最近在接手一个项目时,使用的是spring-cloud微服务构架,mq消息消费模块是单独一个模块,但启动这个模块一直报如下错误: java.net.SocketException: socket closed 这个错误是这个模块注册不到nacos报的错,刚开…...
uni-app 中定时器的使用
学习目标: 学习目标如下所示: uniapp中通过使用uni-app提供的定时器API来实现定时器功能。 学习内容: 内容如下所示: **uni-app的定时器API分为两种: 1.第一种方式: setTimeout函数,用于设置一…...
基于物联网、视频监控与AI视觉技术的智慧电厂项目智能化改造方案
一、项目背景 现阶段,电力行业很多企业都在部署摄像头对电力巡检现场状况进行远程监控,但是存在人工查看费时、疲劳、出现问题无法第一时间发现等管理弊端,而且安全事件主要依靠人工经验判断分析、管控,效率十分低下。 为解决上述…...
内网穿透远程查看内网监控摄像头
内网穿透远程查看内网监控摄像头 在现代社会中,大家总是奔波于家和公司之间。大部分时间用于工作中,也就很难及时知晓家中的动态情况,对于家中有老人、小孩或宠物的(甚至对居住环境安全不放心的),这已然是…...
【Flume 01】Flume简介、部署、组件
1 Flume简介 Flume是一个高可用、高可靠、分布式的海量日志采集、聚合和传输的系统 主要特性: 它有一个简单、灵活的基于流的数据流结构(使用Event封装)具有负载均衡机制和故障转移机制一个简单可扩展的数据模型(Source、Channel、Sink) Sou…...
三款即时通讯工具推荐:J2L3x、Telegram、WhatsApp 你选哪个?
1、J2L3x J2L3x 是一款受欢迎的即时通讯工具,广泛应用于企业团队之间的沟通和协作。它提供了多种通讯方式,包括群组聊天、私人消息和文件共享等,还可以方便地与其他应用程序和服务集成。即使你不在工作场所,你也可以在任何地方使…...
C++ 单例模式(介绍+实现)
文章目录 一. 设计模式二. 单例模式三. 饿汉模式四. 懒汉模式结束语 一. 设计模式 单例模式是一种设计模式 设计模式(Design Pattern)是一套被反复使用,多数人知晓的,经过分类的,代码设计经验的总结。 为什么要有设计模式 就像人类历史发展会…...
uniapp项目集成本地插件
在项目根目录下创建nativeplugins文件夹 拷贝插件到目录nativeplugins 在manifest.json -> App原生插件配置 -> 本地插件里勾选插件 删除本地基座和手机app从新自定义基座运行...
内存分配函数malloc kmalloc vmalloc
内存分配函数malloc kmalloc vmalloc malloc实现步骤: 1)请求大小调整:首先,malloc 需要调整用户请求的大小,以适应内部数据结构(例如,可能需要存储额外的元数据)。通常,这包括对齐调整,确保分配的内存地址满足特定硬件要求(如对齐到8字节或16字节边界)。 2)空闲…...
深入剖析AI大模型:大模型时代的 Prompt 工程全解析
今天聊的内容,我认为是AI开发里面非常重要的内容。它在AI开发里无处不在,当你对 AI 助手说 "用李白的风格写一首关于人工智能的诗",或者让翻译模型 "将这段合同翻译成商务日语" 时,输入的这句话就是 Prompt。…...
黑马Mybatis
Mybatis 表现层:页面展示 业务层:逻辑处理 持久层:持久数据化保存 在这里插入图片描述 Mybatis快速入门 2.协议名(Protocol Name)3.方法名(Method Name)4.属性名(Property Name)5.局部变量/实例变量(Local / Instance Variables&…...
css3笔记 (1) 自用
outline: none 用于移除元素获得焦点时默认的轮廓线 broder:0 用于移除边框 font-size:0 用于设置字体不显示 list-style: none 消除<li> 标签默认样式 margin: xx auto 版心居中 width:100% 通栏 vertical-align 作用于行内元素 / 表格单元格ÿ…...
ip子接口配置及删除
配置永久生效的子接口,2个IP 都可以登录你这一台服务器。重启不失效。 永久的 [应用] vi /etc/sysconfig/network-scripts/ifcfg-eth0修改文件内内容 TYPE"Ethernet" BOOTPROTO"none" NAME"eth0" DEVICE"eth0" ONBOOT&q…...
在QWebEngineView上实现鼠标、触摸等事件捕获的解决方案
这个问题我看其他博主也写了,要么要会员、要么写的乱七八糟。这里我整理一下,把问题说清楚并且给出代码,拿去用就行,照着葫芦画瓢。 问题 在继承QWebEngineView后,重写mousePressEvent或event函数无法捕获鼠标按下事…...
基于Java+MySQL实现(GUI)客户管理系统
客户资料管理系统的设计与实现 第一章 需求分析 1.1 需求总体介绍 本项目为了方便维护客户信息为了方便维护客户信息,对客户进行统一管理,可以把所有客户信息录入系统,进行维护和统计功能。可通过文件的方式保存相关录入数据,对…...
GO协程(Goroutine)问题总结
在使用Go语言来编写代码时,遇到的一些问题总结一下 [参考文档]:https://www.topgoer.com/%E5%B9%B6%E5%8F%91%E7%BC%96%E7%A8%8B/goroutine.html 1. main()函数默认的Goroutine 场景再现: 今天在看到这个教程的时候,在自己的电…...
02.运算符
目录 什么是运算符 算术运算符 1.基本四则运算符 2.增量运算符 3.自增/自减运算符 关系运算符 逻辑运算符 &&:逻辑与 ||:逻辑或 !:逻辑非 短路求值 位运算符 按位与&: 按位或 | 按位取反~ …...
