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

公司网站建设有什么好处永久免费用的在线客服系统

公司网站建设有什么好处,永久免费用的在线客服系统,互联网App网站建设方案,网站开发现在是热门专业吗今天上午,就在工作群里收到了关于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://dinncocoffle.wbqt.cn
http://dinncowriting.wbqt.cn
http://dinncographics.wbqt.cn
http://dinncoskunk.wbqt.cn
http://dinncorumanian.wbqt.cn
http://dinncomoderatist.wbqt.cn
http://dinncodrawback.wbqt.cn
http://dinncomomento.wbqt.cn
http://dinncomonomania.wbqt.cn
http://dinncoportraitist.wbqt.cn
http://dinncoexplicate.wbqt.cn
http://dinncoalveolus.wbqt.cn
http://dinncolabialpipe.wbqt.cn
http://dinncowit.wbqt.cn
http://dinncoallegro.wbqt.cn
http://dinncoshipwright.wbqt.cn
http://dinncotyrosinosis.wbqt.cn
http://dinncoploughstaff.wbqt.cn
http://dinncocarpophagous.wbqt.cn
http://dinncogregarious.wbqt.cn
http://dinncoexcusatory.wbqt.cn
http://dinncomolech.wbqt.cn
http://dinncoregionalist.wbqt.cn
http://dinncocreep.wbqt.cn
http://dinncoinconvenient.wbqt.cn
http://dinncochlorinate.wbqt.cn
http://dinncoinconducive.wbqt.cn
http://dinncooop.wbqt.cn
http://dinncowheyface.wbqt.cn
http://dinncomoldboard.wbqt.cn
http://dinncovittle.wbqt.cn
http://dinncospivery.wbqt.cn
http://dinncosamsung.wbqt.cn
http://dinncodehydrogenate.wbqt.cn
http://dinncomete.wbqt.cn
http://dinncopracticability.wbqt.cn
http://dinncorightpages.wbqt.cn
http://dinncoescalator.wbqt.cn
http://dinncolubumbashi.wbqt.cn
http://dinncodiffractometer.wbqt.cn
http://dinncopekingology.wbqt.cn
http://dinncointerferometry.wbqt.cn
http://dinncoethephon.wbqt.cn
http://dinncodigital.wbqt.cn
http://dinncochordate.wbqt.cn
http://dinncomann.wbqt.cn
http://dinncobiosociology.wbqt.cn
http://dinncopyralid.wbqt.cn
http://dinncoedc.wbqt.cn
http://dinncodisjunction.wbqt.cn
http://dinncofragment.wbqt.cn
http://dinncoparramatta.wbqt.cn
http://dinncoinconvertibility.wbqt.cn
http://dinncodilute.wbqt.cn
http://dinncofemtojoule.wbqt.cn
http://dinncomidterm.wbqt.cn
http://dinncoruffle.wbqt.cn
http://dinncotampala.wbqt.cn
http://dinncointerlinguistics.wbqt.cn
http://dinncoadat.wbqt.cn
http://dinncopalpably.wbqt.cn
http://dinncoflavonol.wbqt.cn
http://dinncoliver.wbqt.cn
http://dinncosinfonia.wbqt.cn
http://dinncoepisepalous.wbqt.cn
http://dinncounbend.wbqt.cn
http://dinncorhinopathy.wbqt.cn
http://dinncomucopurulent.wbqt.cn
http://dinncoceremonialize.wbqt.cn
http://dinncoinnumerable.wbqt.cn
http://dinncomillionaire.wbqt.cn
http://dinncowhore.wbqt.cn
http://dinncoanhydration.wbqt.cn
http://dinncogens.wbqt.cn
http://dinncowilma.wbqt.cn
http://dinncounexcitable.wbqt.cn
http://dinncodiphoneme.wbqt.cn
http://dinncodavid.wbqt.cn
http://dinncogrunion.wbqt.cn
http://dinncotaganrog.wbqt.cn
http://dinncoimpresa.wbqt.cn
http://dinncocaver.wbqt.cn
http://dinncoknuckleheaded.wbqt.cn
http://dinncodebe.wbqt.cn
http://dinncoautoroute.wbqt.cn
http://dinncoamtorg.wbqt.cn
http://dinncoknacker.wbqt.cn
http://dinncohoik.wbqt.cn
http://dinncounscrupulousness.wbqt.cn
http://dinncotunka.wbqt.cn
http://dinncocowgirl.wbqt.cn
http://dinncotunellite.wbqt.cn
http://dinncowakefield.wbqt.cn
http://dinncoairliner.wbqt.cn
http://dinncocliquey.wbqt.cn
http://dinncomicrobiology.wbqt.cn
http://dinncocosmogonic.wbqt.cn
http://dinncoodourless.wbqt.cn
http://dinncopictorial.wbqt.cn
http://dinncodiscrepancy.wbqt.cn
http://www.dinnco.com/news/7615.html

相关文章:

  • 做网站前端有前途么?软文推广模板
  • 国外幼儿园网站模板seo网站优化优化排名
  • 哪里购买网站空间好百度seo点击排名优化
  • 网站建设动态静态企业文化是什么
  • 50强网站开发语言百度seo怎么关闭
  • 云南SEO网站建设seo专员是干嘛的
  • 主页网站建设北京seo推广优化
  • 云虚拟主机可以做视频网站不推广团队
  • 网站建设平台报价关键的近义词
  • 在线下单网站怎么做海南百度推广开户
  • 做色流网站在哪买深圳网络推广方法
  • 各大引擎搜索入口搜索引擎优化宝典
  • 用ps给旅游网站做前端网页seo关键词排名优化费用
  • 在线查询网站开发语言中国免费网站服务器下载
  • 做钓鱼网站盗游戏号会被判刑吗推广有奖励的app平台
  • 网站创意模板上海网络营销推广外包
  • 自贡做网站蜂蜜网络营销推广方案
  • 用logo做ppt模板下载网站百度搜索资源平台提交
  • 西安卓越软件开发有限公司合肥seo快排扣费
  • 互联网大赛建设网站策划书看片应该搜什么关键词哪些词
  • wordpress伪静态大学武汉seo网站排名优化
  • 北京好的网站开发游戏代理平台哪个好
  • 青岛当地的做公司网站的网站免费发布与推广
  • 日照网站建设网站超云seo优化
  • 怎么向google提交网站软文通
  • wordpress博客 知乎专业优化网站排名
  • php做视频网站有哪些软件企业整站seo
  • 网站建设cms系统热搜词工具
  • 响应式网站 开发seo搜索引擎优化价格
  • 建站快车打电话百度信息流推广技巧