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

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

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

相关文章

了解Unity编辑器之组件篇Mesh(三)

Mesh&#xff1a;是一种三维模型的表示形式&#xff0c;它由一系列顶点、三角形&#xff08;或其他多边形&#xff09;和相关属性组成。Mesh用于表示物体的外观和形状&#xff0c;它是可见物体的基本组成部分。通过操作Mesh&#xff0c;开发者可以实现各种视觉效果、物理模拟和…

Swagger如何将接口分组?

如果不分组管理端和用户端是混在一起的&#xff0c;不好查看。 在 docket创建的时候&#xff0c;加一行分组代码。 .groupName("用户端接口") 如果你加完之后&#xff0c;重启&#xff0c;报错。 这应该是你访问的网址仍是旧网址。 http://localhost:8080/doc.html#…

MySQL高可用之MHA集群

目录 一、MHA概述 1.1 什么是 MHA 1.2 MHA 的组成 1.3 MHA 的特点 二、MySQL MHA搭建准备 2.1 实验思路 2.2 实验准备 MHA一主两从高可用集群示意图&#xff1a; 三、搭建 MySQL MHA 3.1 配置主从复制 1、四台服务器都关闭防火墙 2、修改 Master、Slave1、Slave2 节…

解析 WebRTC

1 主要的类 RTCPeerConnection&#xff1a;用于建立点对点连接&#xff0c;实现音视频传输和数据通信。它负责协商媒体传输的参数、处理ICE候选项以及创建和管理媒体通道。 RTCDataChannel&#xff1a;用于在两个端点之间传输任意类型的数据。通过该通道&#xff0c;可以实现…

azure-cognitiveservices-speech api error while using with AWS Lambda

Azure 语音评估服务 Cancellation Reason 初始化平台失败 1.在mac上安装 pip install azure-cognitiveservices-speech1.30.0正常运行没有问题&#xff0c;服务部署到docker 容器中后调用Azure语音评估服务报错 Cancellation Reason 初始化平台失败 2.解决方案&#xff0c;变…

汇编语言(第4版)实验7 寻址方式在结构化数据访问中的应用

参考答案&#xff1a; ①经分析&#xff0c;完整程序代码如下。 assume cs:codesg data segmentdb 1975,1976,1977,1978,1979,1980,1981,1982,1983db 1984,1985,1986,1987,1988,1989,1990,1991,1992db 1993,1994,1995dd 16,22,382,1356,2390,8000,16000,24486,50065,97479,140…

微服务笔记---Nacos集群搭建

微服务笔记---Nacos集群搭建 Nacos集群搭建1.集群结构图2.搭建集群2.1.初始化数据库2.2.下载nacos2.3.配置Nacos2.4.启动2.5.nginx反向代理2.6.优化 Nacos集群搭建 1.集群结构图 官方给出的Nacos集群图&#xff1a; 其中包含3个nacos节点&#xff0c;然后一个负载均衡器代理…

Clion开发STM32之W5500系列(DNS服务封装)

概述 在w5500基础库中进行封装&#xff0c;通过域名的方式获取实际的ip地址用于动态获取ntp的ip地址 DNS封装 头文件 /*******************************************************************************Copyright (c) [scl]。保留所有权利。****************************…

深入浅出Pytorch函数——torch.nn.Module

分类目录&#xff1a;《深入浅出Pytorch函数》总目录 torch.nn.Module是所有Pytorch中所有神经网络模型的基类&#xff0c;我们的神经网络模型也应该继承这个类。Modules可以包含其它Modules&#xff0c;也允许使用树结构嵌入他们&#xff0c;还可以将子模块赋值给模型属性。 …

7.26作业

用fread和fwrite实现文件拷贝 #include<stdio.h> #include<string.h> #include<stdlib.h> #include<head.h> int main(int argc, const char *argv[]) {FILE* fpfopen("./11.txt","w");FILE* fp1fopen("./12.txt",&quo…

idea的Plugins中搜索不到插件

1、ctrlalts 打开设置 ; 2、搜索框输入plugins; 3、点击plugins; 4、点齿轮按钮&#xff0c;选择HTTP Proxy settings; 如下操作&#xff1a; 5、刷新DNS&#xff0c;ipconfig /flushdns 6、重新打开idea 的plugins 插件列表出来了

无涯教程-jQuery - jQuery.ajax( options )方法函数

jQuery.ajax(options)方法使用HTTP请求加载远程页面。 $.ajax()返回它创建的XMLHttpRequest。在大多数情况下&#xff0c;您不需要该对象直接进行操作&#xff0c;但是如果您需要手动中止请求&#xff0c;则可以使用该对象。 jQuery.ajax( options ) - 语法 $.ajax( options…

51单片机--LCD1602

LCD1602的介绍 LCD1602是一种字符型液晶显示模块&#xff0c;通常用于嵌入式系统、单片机等领域。它由LCD&#xff08;液晶显示屏&#xff09;、HD44780控制驱动主电路及其扩展驱动电路、少量电阻、电容元件等组成。 LCD1602具有以下特点和功能&#xff1a; 显示能力&#xf…

面试总结-Redis篇章(八)——Redis分布式锁

JAVA 面试总结-Redis分布式锁 模拟抢券场景 通过下面方法添加Synchronized锁来防止上述情况&#xff0c;如果上面是单体服务没有问题&#xff0c;但是如果项目是集群部署&#xff0c;会出现下面的问题&#xff0c;因为Synchronized是属于本地的锁端口8080和8081同时访问&#x…

单例模式的线程安全形式

目录 1.单例设计模式的概念 2.实现方法&#xff1a; 1.饿汉式 2.懒汉式 3.区分饿汉式和懒汉式&#xff1a; 3.单例模式的双重校验线程安全形式 1.线程安全问题的解决方法 1.1 synchronized关键字&#xff1a; 1.2 volatile关键字&#xff1a; 保证变量可见性&#xff…

Qt 第二讲 登录框完善,登录成功后,进入新的界面;新建工程文件,默认提供的代码注释信息;前两讲思维导图

一&#xff0c;代码完善 头文件 #ifndef ZUOYE_H #define ZUOYE_H#include <QWidget> #include <QDebug> #include <QIcon> #include <QPushButton> #include <QLineEdit> #include <QLabel> //#include <QTextToSpeech>QT_BEGIN_…

⛳ 面向对象面试题

面向对象面试题目录 ⛳ 面向对象面试题&#x1f69c; 一&#xff0c;成员变量&#xff0c;局部变量&#xff0c;类变量存储在内存的什么地方&#xff1f;&#x1f43e; 1.1&#xff0c;类变量&#xff08;静态成员变量&#xff09;&#x1f4dd; 1.2&#xff0c;成员变量⭐ 1.3…

在CSDN学Golang云原生(Kubernetes基础)

一&#xff0c;k8s集群安装和升级 安装 Golang K8s 集群可以参照以下步骤&#xff1a; 准备环境&#xff1a;需要一组 Linux 服务器&#xff0c;并在每台服务器上安装 Docker 和 Kubernetes 工具。初始化集群&#xff1a;使用 kubeadm 工具初始化一个 Kubernetes 集群。例如&…

万恶的Eclipse的使用

恨啊&#xff01;公司用eclipse&#xff0c;这种千年老古董又被翻出来了&#xff0c;我的idea&#xff0c;我的宝&#xff0c;我想你&#xff01; 下面是总结的各种eclipse的使用技巧&#xff1a; 让eclipse像idea一样使用 .sout

Api接口出现Required request body is missing的解决方法

目录 1.问题所示2.原理分析3.解决方法1.问题所示 在使用PostMan 测试接口的时候,出现如下问题: {"code": 400,"success": false,"data": {},"msg":