首页 > 其他分享 >冰橙Ai- ChatGPT开放接口最新版4.0 1106接口 gpt-4-1106-preview gpt-3.5-turbo-1106 多模态接口

冰橙Ai- ChatGPT开放接口最新版4.0 1106接口 gpt-4-1106-preview gpt-3.5-turbo-1106 多模态接口

时间:2023-11-07 22:14:09浏览次数:64  
标签:completion turbo index 接口 1106 3.5 gpt model

冰橙Ai- ChatGPT开放接口最新版4.0 1106接口 gpt-4-1106-preview gpt-3.5-turbo-1106  图像生成 DALL·E 3 多模态接口

冰橙GPT chatGPT开放接口使用说明 【接入了腾讯云内容安全检测】

冰橙GPT稳定提供API接口服务

定时有人进行问题排查处理

1小时内问题响应

接入了腾讯云的内容安全检测

有任何疑问请加入QQ交流群:310872519                    冰橙GPT交流群2

 


1.请求地址:https://gpt.bcwhkj.cn/api/v2.Gptliu/search   

2.请求方式: POST  

3.body格式:json

4.请求内容(sse 流式请求,输出效果较好,响应速度快)(非流式请求,可不加stream这一行):

{
       "messages" : [{"role":"user","content":"你是谁?"}],
       "model": "gpt-3.5-turbo-1106",
       "stream":true //非SSE流式请求,这一行可不加
}

  

5.请求头

{
    "Content-Type": application/json,
    "Authorization": "Bearer 这段中文换成你自己的TOKEN(注意前面有个英文空格需保留)"
}

 

 

说明:

token获取方式:访问yewu.bcwhkj.cn进入菜单冰橙GPT后,访问右上角 / API密钥(首次访问免费赠送10000字符,可通过充值增加字符数)可查看 token

 

SSE流式请求与非流式请求的区别:
    流式POST请求:内容将进行逐家响应和返回,响应速度快。
    普通POST请求:将等待OPENAI的CHATGPT官方接口全部内容都响应完成后,服务器这边才会将内容将通过接口回复给前端,速度较慢。


也可通过微信扫以下图片进入:

 

5.响应体格式:json

6.响应内容(非流式请求时的响应内容):

{
    "id": "chatcmpl-77dQj73rIl0GJyTpAH4QlcSnhOFKp",
    "object": "chat.completion",
    "created": 1682054221,
    "model": "gpt-3.5-turbo-1106",
    "usage": {
        "prompt_tokens": 13,
        "completion_tokens": 30,
        "total_tokens": 43
    },
    "choices": [
        {
            "message": {
                "role": "assistant",
                "content": "我是一个人工智能语言模型,可以根据用户提供的输入进行回答和交流。"
            },
            "finish_reason": "stop",
            "index": 0
        }
    ]
}

 

 

6.响应内容(流式请求时的响应内容):

data: {"id":"chatcmpl-783jPdq1a1ZG6KQc9pq98FDRSqNmp","object":"chat.completion.chunk","created":1682155323,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"role":"assistant"},"index":0,"finish_reason":null}]}

data: {"id":"chatcmpl-783jPdq1a1ZG6KQc9pq98FDRSqNmp","object":"chat.completion.chunk","created":1682155323,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":"我"},"index":0,"finish_reason":null}]}

data: {"id":"chatcmpl-783jPdq1a1ZG6KQc9pq98FDRSqNmp","object":"chat.completion.chunk","created":1682155323,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":"是"},"index":0,"finish_reason":null}]}

data: {"id":"chatcmpl-783jPdq1a1ZG6KQc9pq98FDRSqNmp","object":"chat.completion.chunk","created":1682155323,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":"一个"},"index":0,"finish_reason":null}]}

data: {"id":"chatcmpl-783jPdq1a1ZG6KQc9pq98FDRSqNmp","object":"chat.completion.chunk","created":1682155323,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":"AI"},"index":0,"finish_reason":null}]}

data: {"id":"chatcmpl-783jPdq1a1ZG6KQc9pq98FDRSqNmp","object":"chat.completion.chunk","created":1682155323,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":"语"},"index":0,"finish_reason":null}]}

data: {"id":"chatcmpl-783jPdq1a1ZG6KQc9pq98FDRSqNmp","object":"chat.completion.chunk","created":1682155323,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":"言"},"index":0,"finish_reason":null}]}

data: {"id":"chatcmpl-783jPdq1a1ZG6KQc9pq98FDRSqNmp","object":"chat.completion.chunk","created":1682155323,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":"模"},"index":0,"finish_reason":null}]}

data: {"id":"chatcmpl-783jPdq1a1ZG6KQc9pq98FDRSqNmp","object":"chat.completion.chunk","created":1682155323,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":"型"},"index":0,"finish_reason":null}]}

data: {"id":"chatcmpl-783jPdq1a1ZG6KQc9pq98FDRSqNmp","object":"chat.completion.chunk","created":1682155323,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":","},"index":0,"finish_reason":null}]}

data: {"id":"chatcmpl-783jPdq1a1ZG6KQc9pq98FDRSqNmp","object":"chat.completion.chunk","created":1682155323,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":"专"},"index":0,"finish_reason":null}]}

data: {"id":"chatcmpl-783jPdq1a1ZG6KQc9pq98FDRSqNmp","object":"chat.completion.chunk","created":1682155323,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":"门"},"index":0,"finish_reason":null}]}

data: {"id":"chatcmpl-783jPdq1a1ZG6KQc9pq98FDRSqNmp","object":"chat.completion.chunk","created":1682155323,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":"用"},"index":0,"finish_reason":null}]}

data: {"id":"chatcmpl-783jPdq1a1ZG6KQc9pq98FDRSqNmp","object":"chat.completion.chunk","created":1682155323,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":"来"},"index":0,"finish_reason":null}]}

data: {"id":"chatcmpl-783jPdq1a1ZG6KQc9pq98FDRSqNmp","object":"chat.completion.chunk","created":1682155323,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":"回"},"index":0,"finish_reason":null}]}

data: {"id":"chatcmpl-783jPdq1a1ZG6KQc9pq98FDRSqNmp","object":"chat.completion.chunk","created":1682155323,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":"答"},"index":0,"finish_reason":null}]}

data: {"id":"chatcmpl-783jPdq1a1ZG6KQc9pq98FDRSqNmp","object":"chat.completion.chunk","created":1682155323,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":"问题"},"index":0,"finish_reason":null}]}

data: {"id":"chatcmpl-783jPdq1a1ZG6KQc9pq98FDRSqNmp","object":"chat.completion.chunk","created":1682155323,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":"和"},"index":0,"finish_reason":null}]}

data: {"id":"chatcmpl-783jPdq1a1ZG6KQc9pq98FDRSqNmp","object":"chat.completion.chunk","created":1682155323,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":"提"},"index":0,"finish_reason":null}]}

data: {"id":"chatcmpl-783jPdq1a1ZG6KQc9pq98FDRSqNmp","object":"chat.completion.chunk","created":1682155323,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":"供"},"index":0,"finish_reason":null}]}

data: {"id":"chatcmpl-783jPdq1a1ZG6KQc9pq98FDRSqNmp","object":"chat.completion.chunk","created":1682155323,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":"帮"},"index":0,"finish_reason":null}]}

data: {"id":"chatcmpl-783jPdq1a1ZG6KQc9pq98FDRSqNmp","object":"chat.completion.chunk","created":1682155323,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":"助"},"index":0,"finish_reason":null}]}

data: {"id":"chatcmpl-783jPdq1a1ZG6KQc9pq98FDRSqNmp","object":"chat.completion.chunk","created":1682155323,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":"的"},"index":0,"finish_reason":null}]}

data: {"id":"chatcmpl-783jPdq1a1ZG6KQc9pq98FDRSqNmp","object":"chat.completion.chunk","created":1682155323,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":"。"},"index":0,"finish_reason":null}]}

data: {"id":"chatcmpl-783jPdq1a1ZG6KQc9pq98FDRSqNmp","object":"chat.completion.chunk","created":1682155323,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{},"index":0,"finish_reason":"stop"}]}

data: [DONE]

 

 

 

image.png

 

 

 

特别说明【连续对话功能】:

如果需要有上下文语境,请把之前问的问题和答案一起通过Q参数传过来,其中问题和答案前面分别加上“ Q:” 和 “ A:”参数 ,Q和A前面有空格,举例:

Q = "你好!"

A : 你好,有什么可以帮助你的。

Q: "今天天气怎么样?"

那么第二次提交带上之前的问题和答案,请求体里面的Q就是:

keyword = " Q:你好! A:你好,有什么可以帮助你的。 Q:今天天气怎么样?"

JS方法如下:

keyword='';                
that.list={   
    wen:'老婆和妈妈同时掉水里,我要先救谁?',   
    da:'这种情况下,是理所当然应该先救妈妈的。救人的原则是先救生命危险的人,有可能先救老婆,这取决于老婆和妈妈的实际情况,而且也要考虑到逃生的可能性。假如老婆游泳能力很强,可能先救老婆,能在短时间内将她救出水面,否则,先救妈妈也是明智之举。 '
};        

//新问题
newQ:'我不同意?';        

//将之前的所有问答列表进行循环
that.list.forEach((v,k)=>{  
    //将问和答案组合,<|endoftext|>是用于给OPENAI官方接口进行分段识别的  
    keyword=keyword+' Q: '+v.wen + ' A: '+v.da+'。 <|endoftext|> ';
})        

//将新的问题组合          
keyword=keyword+'Q: '+newQ + 'A: ';

 

 

这样获取的答案就是支持上下文语境了哈~

 

 

标签:completion,turbo,index,接口,1106,3.5,gpt,model
From: https://www.cnblogs.com/bingcheng/p/17816158.html

相关文章

  • VUE监听网页关闭和隐藏显示(页签关闭调用某一个接口)
    mounted(){this.id=this.$route.query.id;window.addEventListener("beforeunload",async(e)=>awaitthis.beforeunloadHandler(e));window.addEventListener("unload",(e)=>this.unloadHandle......
  • 创建一个Cookie缓存,进行接口防抖
    1.新创建一个Cookie缓存 Name:SavePInformationHttpCookienewCookie=newHttpCookie("request");newCookie["SavePInformation"]=DateTime.Now.ToString("yyyy-MM-ddHH:mm:ss");newCookie.Expires=DateTime.Now.AddDays(1);Response.Co......
  • 若依框架AjaxResult改造适应Swagger接口文档
    一、概述若依框架后端使用的响应对象AjaxResult,和Swagger存在不兼容问题,导致返回体即使使用了Swagger注解,但是Swagger接口文档中,不显示返回体的对象Swagger文档: 若依Gitee上,也存在此问题:https://gitee.com/y_project/RuoYi-Vue/commit/6805a96e533f56b86aaeecccc2693c6ff40......
  • 文心一言 VS 讯飞星火 VS chatgpt (130)-- 算法导论11.2 2题
    二、用go语言,对于一个用链接法解决冲突的散列表,说明将关键字5,28,19,15,20,33,12,17,10插入到该表中的过程。设该表中有9个槽位,并设其散列函数为h(k)=kmod9。文心一言:在这个问题中,我们使用Go语言来解决一个散列(Hash)表的问题,该问题需要我们使用链接法解决冲突。我们的散......
  • 禅道18.0_beta如何添加自己的api接口
    有自定义功能,但又不想修改原有的api接口,可以添加新的api接口,这样不会很大影响以后的版本升级,具体步骤1.在config/routes.php中添加映射,为了方便维护,在$config->routes=$routes;这一句代码的上面进行添加//添加的api$routes['/tasks/project']='taskproj......
  • Go 接口-契约介绍
    Go接口-契约介绍目录Go接口-契约介绍一、接口基本介绍1.1接口类型介绍1.2为什么要使用接口1.3面向接口编程1.4接口的定义二、空接口2.1空接口的定义2.2空接口的应用2.2.1空接口作为函数的参数2.2.2空接口作为map的值2.3接口类型变量2.4类型断言三、尽量定义“小接口......
  • 20231106
    //circumstance,consult,customary,deposit,explain,reluctant,remit,settle,universally,beshortof,cashondelivery,creditnote,creditperiod,debitnote,deferredpayment,downpayment,fullpayment,multiplepayment,openingbankcircumstance......
  • springboot mybatis-plus 登录接口
    下面是使用SpringBoot和MyBatis-Plus实现登录接口的示例代码:添加依赖在pom.xml文件中添加以下依赖:<dependencies><!--SpringBoot--><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</a......
  • 20231106学习总结ini文件读写
    INI(Initialization)文件是一种常见的配置文件格式,通常用于存储应用程序的配置信息。INI文件通常包含一系列的节(sections)和键-值对(key-valuepairs)。每个节包含一组相关的键-值对。;这是注释[Database]Server=localhostPort=3306Username=myuserPassword=mypassword......
  • 每日总结20231106
    代码时间(包括上课)3h代码量(行):100行博客数量(篇):1篇相关事项:1、今天是周一,一周里面最困的一天,但是今天没有迟到呦,今天第一节课是软件设计模式,写的是适配器模式和桥接模式,这次还很简单,是自己写的。2、今天第二节课上的是人机交互技术,看了相关C#的相关知识点的视频。3、今天晚上打......