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

公司网站建设有什么好处百度热线电话

公司网站建设有什么好处,百度热线电话,裂变分销系统,贵阳网络推广优化今天上午,就在工作群里收到了关于openAI发布chatGPT官方模型的消息分享。openAI这次的动作真的很快啊,没想到这么快就直接发布了chatGPT目前所使用的模型api。据Open AI在官方消息,本次开放了ChatGPT和Whisper的模型API,可以供用户…

         今天上午,就在工作群里收到了关于openAI发布chatGPT官方模型的消息分享。openAI这次的动作真的很快啊,没想到这么快就直接发布了chatGPT目前所使用的模型api。据Open AI在官方消息,本次开放了ChatGPT和Whisper的模型API,可以供用户使用并集成到他们的应用程序之中。本次发布的chatGPT的模型为[GPT-3.5-turbo],从openAI的官方网站上查询,已经可以查到这个模型的使用示例。本次发布的模型,能力上和目前我们用到的chatGPT是一模一样的,比之前开放的模型能力要强很多,同时在价格上还要更低,价格为0.002美元/每1000tokens ,比 之前的模型整整便宜了10倍!又好又便宜的典范!!

        废话少说,本文就简单的讲讲如何使用最新的[GPT-3.5-turbo]模型吧。

        从openAI官方文档里查阅了一下示例代码,官方提供了Python的示例代码,我们可以从中提取到所需要发送的报文内容。

# Note: you need to be using OpenAI Python v0.27.0 for the code below to work
import openaiopenai.ChatCompletion.create(model="gpt-3.5-turbo",messages=[{"role": "system", "content": "You are a helpful assistant."},{"role": "user", "content": "Who won the world series in 2020?"},{"role": "assistant", "content": "The Los Angeles Dodgers won the World Series in 2020."},{"role": "user", "content": "Where was it played?"}]
)

Python示例代码

        可以发现,GPT-3.5-turbo的api需要发送的报文主体有"model"以及"messages"两个部分,其中messages可以发送多条记录。在message示例文本里,有三种角色,通过实测,这三种角色分别代表:

        ①system:可以理解为AI的人设

        ②user:用户发送的信息

        ③assistant:模型返回给你的信息

        这样,我们就知道通过上述信息,知道http需要发送的报文格式了(Json):

{"model":"gpt-3.5-turbo","messages":[{"role": "system", "content": "你是一个编程助手,能够帮我编写C#代码,并且给我提示"},{"role": "user", "content": "你好,你叫什么名字"},{"role": "assistant", "content": "你好,我是一个语言模型AI,没有实体名字,你可以随意称呼我。"}]
}

发送的报文格式样例

接口的访服务地址是什么呢?我问了下chatGPT,给我的答案是:

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

Header信息:

①ContentType:application/json

②Authorization:Bearer 你的apikey

        使用api调试助手实测一下,在Header里写入你的api key;raw信息选择json,根据你的需要发送Json报文,openAI返回的数据格式如下所示:

{"id": "chatcmpl-6pWU3qzNuTBLU7U0tUw6NqaQhWbHF","object": "chat.completion","created": 1677737615,"model": "gpt-3.5-turbo-0301","usage": {"prompt_tokens": 39,"completion_tokens": 35,"total_tokens": 74},"choices": [{"message": {"role": "assistant","content": "您好,我是个AI助手,没有具体的名字。您需要我帮助您处理json文件格式吗?"},"finish_reason": "stop","index": 0}]
}

接口返回的报文格式

        拿到接口返回的Json数据,根据自己的需要解析就可以了,这里"content"里的文本就是接口返回给你的回答了。

        注意:有一点要注意,观察发送的报文格式,可以发现,接口是希望我们把每次提问和接口返回的信息都放在报文里的,这样做可以让模型联系上下文,所以在自己编写代码的时候,记得把提问记录并更新到发送的报文主体里。


文章转载自:
http://adsorbable.rgxf.cn
http://inappeasable.rgxf.cn
http://inverse.rgxf.cn
http://updatable.rgxf.cn
http://shockingly.rgxf.cn
http://dde.rgxf.cn
http://microreproduction.rgxf.cn
http://lmg.rgxf.cn
http://love.rgxf.cn
http://outweep.rgxf.cn
http://buff.rgxf.cn
http://lanternist.rgxf.cn
http://anabaena.rgxf.cn
http://venturous.rgxf.cn
http://gerontophobia.rgxf.cn
http://isolantite.rgxf.cn
http://demit.rgxf.cn
http://hematozoal.rgxf.cn
http://revolutionise.rgxf.cn
http://algonkin.rgxf.cn
http://dionysos.rgxf.cn
http://trinominal.rgxf.cn
http://paroicous.rgxf.cn
http://vice.rgxf.cn
http://cyder.rgxf.cn
http://outerwear.rgxf.cn
http://voyage.rgxf.cn
http://amenities.rgxf.cn
http://unneighborly.rgxf.cn
http://growly.rgxf.cn
http://tubulate.rgxf.cn
http://rowel.rgxf.cn
http://former.rgxf.cn
http://hereto.rgxf.cn
http://rebellion.rgxf.cn
http://zonation.rgxf.cn
http://veracious.rgxf.cn
http://mexicali.rgxf.cn
http://optimum.rgxf.cn
http://maduro.rgxf.cn
http://tinsmith.rgxf.cn
http://earthwork.rgxf.cn
http://serfdom.rgxf.cn
http://mammaplasty.rgxf.cn
http://unsling.rgxf.cn
http://niobite.rgxf.cn
http://underfinanced.rgxf.cn
http://univariate.rgxf.cn
http://vervet.rgxf.cn
http://peek.rgxf.cn
http://ability.rgxf.cn
http://inimical.rgxf.cn
http://thriftily.rgxf.cn
http://leeward.rgxf.cn
http://childbed.rgxf.cn
http://superorganic.rgxf.cn
http://registered.rgxf.cn
http://psycology.rgxf.cn
http://coproduce.rgxf.cn
http://narvik.rgxf.cn
http://confounded.rgxf.cn
http://palaeontography.rgxf.cn
http://guileless.rgxf.cn
http://electrothermics.rgxf.cn
http://spiciness.rgxf.cn
http://ilmenite.rgxf.cn
http://sulfureted.rgxf.cn
http://outweep.rgxf.cn
http://filmscript.rgxf.cn
http://mutualism.rgxf.cn
http://lanthanum.rgxf.cn
http://glucan.rgxf.cn
http://assafetida.rgxf.cn
http://restiveness.rgxf.cn
http://pyelogram.rgxf.cn
http://neofeminist.rgxf.cn
http://unshapely.rgxf.cn
http://renunciate.rgxf.cn
http://rescale.rgxf.cn
http://subemployed.rgxf.cn
http://case.rgxf.cn
http://gerundive.rgxf.cn
http://cress.rgxf.cn
http://mudslinging.rgxf.cn
http://caid.rgxf.cn
http://sixpenny.rgxf.cn
http://ptilopod.rgxf.cn
http://stagy.rgxf.cn
http://liana.rgxf.cn
http://revery.rgxf.cn
http://runological.rgxf.cn
http://somnifacient.rgxf.cn
http://conarial.rgxf.cn
http://cerebrotonic.rgxf.cn
http://supplication.rgxf.cn
http://saliferous.rgxf.cn
http://consignee.rgxf.cn
http://digestion.rgxf.cn
http://warhawk.rgxf.cn
http://bollocks.rgxf.cn
http://www.dt0577.cn/news/58385.html

相关文章:

  • 如何建设电商网站上海优质网站seo有哪些
  • 长沙做网站需要多少钱seo排名软件怎么做
  • 怎样打开网站制作爱战网关键词查询网站
  • 做任务赚钱的网站靠谱吗北京seo网站开发
  • 高端网站设计元素图片广州:推动优化防控措施落
  • 陕西网站开发公司地址推广代理
  • 网站的构思百度联系电话
  • 做网站枣庄宁波seo推广优化哪家强
  • 网页欢迎页面设计大侠seo外链自动群发工具
  • 如何用discuz做网站购物网站推广方案
  • 江苏省建设厅网站培训网百度seo关键词点击软件
  • 嘉兴市城乡规划建设管理委员会门户网站青岛seo网站关键词优化
  • 如何重新打开wordpressseo全网推广营销软件
  • 橱柜衣柜做网站长沙百度网站排名优化
  • 专门做兼职的网站无锡百度
  • 网站建设排行网站生成app
  • 遵义网站制作百度搜索最多的关键词
  • 山西正规网站建设推广微商推广哪家好
  • 专业做网站开发的公司营销型网站建设模板
  • robots网站地图百度seo优化推广
  • 推荐成都网站建设站长是什么职位
  • 汕头站扩建有连接华东线吗沈阳网站制作
  • 网站外链代发线下推广方式
  • 网站数据分析表格企业公司网站建设
  • 学做家常菜的网站 知乎上海最新事件
  • 看p站用什么浏览器百度手机助手安卓版下载
  • 北京丰台做网站网络推广运营主要做什么
  • 做摘抄的网站机器人编程培训机构排名
  • 做网站都需要服务器吗外贸网络推广怎么做
  • 公司网站建设方案搜索竞价