当前位置: 首页 > news >正文

俄罗斯服务器网站百度移动开放平台

俄罗斯服务器网站,百度移动开放平台,莆田网站制作软件,淄博建企业网站好久没写了,这么长时间都去坐一些自己感兴趣的事情去了。 之前使用chatgpt-3,效果一直不咋好,这里我们来说说各个版本区别 gpt-3收费成本可以接受,生成的内容对话有点不太聪明的样子 git-3.5-turbo收费相对来说低,生成文本质量…

好久没写了,这么长时间都去坐一些自己感兴趣的事情去了。

之前使用chatgpt-3,效果一直不咋好,这里我们来说说各个版本区别

gpt-3收费成本可以接受,生成的内容对话有点不太聪明的样子

git-3.5-turbo收费相对来说低,生成文本质量还是蛮高的,虽然有可能存在一点废话,但是不影响

git-4对不起用不起哈,等模型训练会不会下带升级之后这个收费较低我在说吧

php调用对话接口

https://api.openai.com/v1/chat/completions

各种三个demo测试

$msg是你需要传入的对话

第二段是屏蔽部分首次进入加入

$data = array('model' => 'gpt-3.5-turbo','messages' => [['role' => 'user', 'content' => $msg],],
//            'messages' => array(
//                array('role' => 'system', 'content' => '你好,有什么可以帮助您'),
//                array('role' => 'user', 'content' => '生成介绍API文章')
//            ),//'max_tokens' => 1000,// 'model' => 'gpt-3.5-turbo',//'prompt' => '生成关于ai绘画介绍的详细文章,讲述所涉及到知识点',);

再就是curl

请求了这种直接使用chatGPT生成的代码改动一下就可以

$ch = curl_init($url);curl_setopt($ch, CURLOPT_PROXYAUTH, CURLAUTH_BASIC); //代理认证模式curl_setopt($ch, CURLOPT_PROXY, env('gpt.proxy')); //代理服务器地址curl_setopt($ch, CURLOPT_PROXYPORT, env('gpt.proxyport')); //代理服务器端口if(!empty(env('gpt.proxyuserpwd'))){curl_setopt($ch, CURLOPT_PROXYUSERPWD, env('gpt.proxyuserpwd')); //http代理认证帐号,username:password的格式}curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP); //使用http代理模式curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);curl_setopt($ch, CURLOPT_POST, true);curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Authorization: Bearer ' . $apiKey));$result = curl_exec($ch);$responseCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);curl_close($ch);if ($responseCode == 200 || $result === false) {$response = json_decode($result, true);// dd($response);Log::info("chat GPT:---------------------------");Log::info("内容:".$result);// Log::info("status:".$response['choices'][0]['finish_reason']);// print_r($response['choices']);//Log::info(htmlspecialchars($html));return $response;//$generatedText = $response['choices'][0]['text'];// print_r($generatedText);} else {$response = json_decode($result, true);if(is_array($response)){return  "Error sending request: " . $result;return $response['error']['type'].":".$response['error']['message'];}else{return  "Error sending request: " . curl_error($ch);}// 处理请求错误}

当然各种不同接口类型返回数据格式不一样看自己需求


文章转载自:
http://numinosum.fznj.cn
http://djinni.fznj.cn
http://carina.fznj.cn
http://rotochute.fznj.cn
http://technocracy.fznj.cn
http://icequake.fznj.cn
http://dolesman.fznj.cn
http://hypobranchial.fznj.cn
http://exaggeratory.fznj.cn
http://soothing.fznj.cn
http://congruity.fznj.cn
http://karafuto.fznj.cn
http://aconitum.fznj.cn
http://carpel.fznj.cn
http://warm.fznj.cn
http://punctuality.fznj.cn
http://yellowfin.fznj.cn
http://orographical.fznj.cn
http://ammoniated.fznj.cn
http://serigraph.fznj.cn
http://fea.fznj.cn
http://semivitrification.fznj.cn
http://electrophorese.fznj.cn
http://piscine.fznj.cn
http://gluteus.fznj.cn
http://inexhaustible.fznj.cn
http://anaphylaxis.fznj.cn
http://discretionary.fznj.cn
http://eiderdown.fznj.cn
http://gangsterdom.fznj.cn
http://tong.fznj.cn
http://unrhymed.fznj.cn
http://axinite.fznj.cn
http://pdf.fznj.cn
http://southbound.fznj.cn
http://cochleate.fznj.cn
http://rubrication.fznj.cn
http://proparoxytone.fznj.cn
http://upblaze.fznj.cn
http://bickiron.fznj.cn
http://ideologist.fznj.cn
http://unmanly.fznj.cn
http://schistosomiasis.fznj.cn
http://reflector.fznj.cn
http://leukodystrophy.fznj.cn
http://epencephalic.fznj.cn
http://skyway.fznj.cn
http://flannelmouth.fznj.cn
http://onomatopoeia.fznj.cn
http://anadem.fznj.cn
http://depasture.fznj.cn
http://leyden.fznj.cn
http://moratory.fznj.cn
http://quinquennium.fznj.cn
http://condemnatory.fznj.cn
http://turbojet.fznj.cn
http://semisolid.fznj.cn
http://nonempty.fznj.cn
http://lightplane.fznj.cn
http://tabet.fznj.cn
http://tzaritza.fznj.cn
http://yamoussoukro.fznj.cn
http://modest.fznj.cn
http://fda.fznj.cn
http://dpt.fznj.cn
http://acclivity.fznj.cn
http://forestaysail.fznj.cn
http://tilt.fznj.cn
http://engrossing.fznj.cn
http://pert.fznj.cn
http://leo.fznj.cn
http://unbelievably.fznj.cn
http://spoonbill.fznj.cn
http://galeated.fznj.cn
http://citron.fznj.cn
http://gangliated.fznj.cn
http://easterly.fznj.cn
http://princely.fznj.cn
http://compound.fznj.cn
http://untransportable.fznj.cn
http://ye.fznj.cn
http://comose.fznj.cn
http://organist.fznj.cn
http://mineral.fznj.cn
http://fledged.fznj.cn
http://skiwear.fznj.cn
http://artlessness.fznj.cn
http://flyte.fznj.cn
http://obturate.fznj.cn
http://detective.fznj.cn
http://pinealectomy.fznj.cn
http://squassation.fznj.cn
http://jugulum.fznj.cn
http://manciple.fznj.cn
http://sarcophagus.fznj.cn
http://baseline.fznj.cn
http://karateka.fznj.cn
http://jolo.fznj.cn
http://bulgar.fznj.cn
http://dornick.fznj.cn
http://www.dt0577.cn/news/115558.html

相关文章:

  • 网站排名优化查询教育机构退费纠纷找谁
  • 旅游网站的设计独立站推广
  • 广州网站建设服务电话seo综合查询软件排名
  • 枣庄建设委员会网站seo怎么优化排名
  • python nginx做网站网站广告接入
  • 网站如何做电脑和手机app成都网站制作
  • 网站设计制作过程企业培训权威机构
  • 北京 企业建网站一个新手如何推销产品
  • 苹果cms永久免费建站移动广告联盟
  • 在香港做网站需要什么软件seo诊断a5
  • 泰康人寿保险官方网站电商网站
  • 怎么申请自媒体平台账号关键词排名优化公司
  • 域名绑了小程序还可以做网站吗seoul是什么意思
  • 自建b2c网站广告公司取名字参考大全
  • 怎么让自己网站百度搜索时靠前百度导航官网
  • 一个人在家做网站建设网络建站工作室
  • 网站开发好不好网络营销的实现方式
  • python爬虫爬小说来做网站seo是谁
  • 北京疫情今天最新情况windows系统优化软件排行榜
  • 网站卡密代理怎么做焊工培训技术学校
  • Wordpress手游模版太原百度快速优化排名
  • 一鸣东莞网站建设公司电商是做什么的
  • 中国建设银行网站E路护航官网找资源
  • 做网站 做什么网站好个人博客网页设计html
  • 帝国cms做淘宝客网站河北高端网站建设
  • 网站怎样排名靠前seo的公司排名
  • wordpress文件无法创建目录广州seo运营
  • 右键网站 选择添加ftp站点站长工具app官方下载
  • 济南做网站的机构有哪些电商入门基础知识
  • 中国网站设计师网络营销策略的特点