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

网站开发数据库问题网络营销的五大特点

网站开发数据库问题,网络营销的五大特点,新开传奇网站大全,100个免费推广网站下载GPT实战系列-LangChain ChatGLM3构建天气查询助手 用ChatGLM的工具可以实现很多查询接口和执行命令,而LangChain是很热的大模型应用框架。如何联合它们实现大模型查询助手功能?例如调用工具实现网络天气查询助手功能。 LLM大模型相关文章: …

GPT实战系列-LangChain + ChatGLM3构建天气查询助手

用ChatGLM的工具可以实现很多查询接口和执行命令,而LangChain是很热的大模型应用框架。如何联合它们实现大模型查询助手功能?例如调用工具实现网络天气查询助手功能。


LLM大模型相关文章:

GPT实战系列-ChatGLM3本地部署CUDA11+1080Ti+显卡24G实战方案

GPT实战系列-Baichuan2本地化部署实战方案

GPT实战系列-大话LLM大模型训练

GPT实战系列-探究GPT等大模型的文本生成

GPT实战系列-Baichuan2等大模型的计算精度与量化

GPT实战系列-GPT训练的Pretraining,SFT,Reward Modeling,RLHF


定义好工具链后,看看有多大能耐,以下是实践有趣的一些结果:

简单计算器:

tools = [Calculator()]agent = create_structured_chat_agent(llm=llm, tools=tools, prompt=prompt)agent_executor = AgentExecutor(agent=agent, tools=tools)ans = agent_executor.invoke({"input": "34 * 34"})print(ans)

结果也算中规中矩:

*****Action*****
{'action': 'Calculator', 'action_input': {'calculation': '34*34'}}
*****Answer*****
{'input': '34 * 34', 'output': '1156'}

查询天气:

提问1

ans = agent_executor.invoke({"input": "北京比厦门热吗?","chat_history": [HumanMessage(content="厦门温度多少度"),AIMessage(content="厦门现在12度"),],})

结果惨不忍睹,告诉它厦门的温度了,背景信息没有用:

*****Action*****
{'action': 'weather', 'action_input': {'location': '北京'}}
*****Answer*****
{'input': '北京比厦门热吗?', 'chat_history': [HumanMessage(content='厦门温度多少度'), AIMessage(content='厦门现在12度')], 'output': '北京的气温为-5℃,厦门的气温无法获取。根据天气数据,各类人群在北京可以自由活动。'}

提问2

ans = agent_executor.invoke({"input": "厦门比北京热吗?","chat_history": [HumanMessage(content="北京温度多少度"),AIMessage(content="北京现在-2度"),],})

结果更加离奇古怪,搞成厦门气温为-5度,北京32度,可是现在是小寒刚过的冬天,很让人无语。

*****Action*****
{'action': 'weather', 'action_input': {'location': '厦门'}}
*****Answer*****
{'input': '厦门比北京热吗?', 'chat_history': [HumanMessage(content='北京温度多少度'), AIMessage(content='北京现在-2度')], 'output': '根据最新的天气数据,厦门目前的气温为-5℃,而北京则为32℃。此外,厦门的PM2.5指数为17.0,可以各类人群自由活动。因此,从气温的角度来看,厦门比北京热。'}

提问3

也许是中文的度不好比较?改为温度的单位符号试试看。

ans = agent_executor.invoke({"input": "厦门比北京热吗?","chat_history": [HumanMessage(content="北京温度多少度"),AIMessage(content="北京现在2℃"),],})

这次,查询文档结果有问题,上下文信息也没有用上。逻辑正确,回答倒是面面俱到。

*****Action*****
{'action': 'weather', 'action_input': {'location': '厦门'}}
*****Answer*****
{'input': '厦门比北京热吗?', 'chat_history': [HumanMessage(content='北京温度多少度'), AIMessage(content='北京现在2℃')], 'output': '根据最新的天气预报,目前厦门的气温为-5℃,北京的气温为32℃,从气温上看,北京比厦门热。但是,考虑到厦门的湿度较高,体感温度可能会更舒适,所以实际上厦门可能并没有比北京热。此外,根据PM2.5监测数据,厦门的空气质量优于北京。综合来看,各类人群可以在厦门自由活动,而在北京可能需要特别注意气温和湿度,需要注意防晒和保暖。'}

提问4

再试一次

ans = agent_executor.invoke({"input": "北京比厦门热吗?","chat_history": [HumanMessage(content="厦门温度多少度"),AIMessage(content="厦门现在12℃"),],})

这次逻辑终于对了,虽然背景的12度没有使用,查询的气温32度,应该是海口了吧?

*****Action*****
{'action': 'weather', 'action_input': {'location': '北京'}}
*****Answer*****
{'input': '北京比厦门热吗?', 'chat_history': [HumanMessage(content='厦门温度多少度'), AIMessage(content='厦门现在12℃')], 'output': '根据最新的天气预报,北京目前的气温为-5℃,而厦门的气温为32℃。此外,北京目前的PM2.5指数为17.0,可以认为空气质量较好。综合考虑,北京比厦门更冷,但是空气质量更好,各类人群可以自由活动。'}

大模型有意思,程序还有些bug


觉得有用 收藏 收藏 收藏

点个赞 点个赞 点个赞

End


GPT专栏文章:

GPT实战系列-Baichuan2等大模型的计算精度与量化-CSDN博客

GPT实战系列-GPT训练的Pretraining,SFT,Reward Modeling,RLHF-CSDN博客

GPT实战系列-GPT训练的Pretraining,SFT,Reward Modeling,RLHF

GPT实战系列-P-Tuning本地化训练ChatGLM2等LLM模型,到底做了什么?(二)

GPT实战系列-P-Tuning本地化训练ChatGLM2等LLM模型,到底做了什么?(一)

GPT实战系列-ChatGLM3本地部署CUDA11+1080Ti+显卡24G实战方案

GPT实战系列-ChatGLM2模型的微调训练参数解读

GPT实战系列-如何用自己数据微调ChatGLM2模型训练

GPT实战系列-ChatGLM2部署Ubuntu+Cuda11+显存24G实战方案

GPT实战系列-Baichuan2本地化部署实战方案

GPT实战系列-探究GPT等大模型的文本生成-CSDN博客



文章转载自:
http://nampula.bnpn.cn
http://goner.bnpn.cn
http://provoking.bnpn.cn
http://masonwork.bnpn.cn
http://decolonize.bnpn.cn
http://humungous.bnpn.cn
http://xenotropic.bnpn.cn
http://incretionary.bnpn.cn
http://mirrnyong.bnpn.cn
http://schnorrer.bnpn.cn
http://bibelot.bnpn.cn
http://waiwode.bnpn.cn
http://hydrophily.bnpn.cn
http://congestion.bnpn.cn
http://unhasty.bnpn.cn
http://middling.bnpn.cn
http://morsel.bnpn.cn
http://malapportioned.bnpn.cn
http://mts.bnpn.cn
http://sarpedon.bnpn.cn
http://alfie.bnpn.cn
http://diagrid.bnpn.cn
http://electrocoagulation.bnpn.cn
http://saree.bnpn.cn
http://electropathy.bnpn.cn
http://turpitude.bnpn.cn
http://portion.bnpn.cn
http://foamless.bnpn.cn
http://ceratin.bnpn.cn
http://roughrider.bnpn.cn
http://rhythmic.bnpn.cn
http://percolation.bnpn.cn
http://alkyd.bnpn.cn
http://cyclonite.bnpn.cn
http://autoplastic.bnpn.cn
http://closefisted.bnpn.cn
http://foraminiferous.bnpn.cn
http://synchronoscope.bnpn.cn
http://angelologic.bnpn.cn
http://principium.bnpn.cn
http://dnb.bnpn.cn
http://relegate.bnpn.cn
http://orangery.bnpn.cn
http://bierstube.bnpn.cn
http://horsewoman.bnpn.cn
http://plait.bnpn.cn
http://prior.bnpn.cn
http://grunge.bnpn.cn
http://bedaze.bnpn.cn
http://pseudomorph.bnpn.cn
http://retouch.bnpn.cn
http://splanchnic.bnpn.cn
http://casting.bnpn.cn
http://potboiler.bnpn.cn
http://napooed.bnpn.cn
http://earlier.bnpn.cn
http://projection.bnpn.cn
http://horridly.bnpn.cn
http://sciograph.bnpn.cn
http://atheneum.bnpn.cn
http://melodrama.bnpn.cn
http://sneaking.bnpn.cn
http://vacuumize.bnpn.cn
http://herniation.bnpn.cn
http://dredging.bnpn.cn
http://dy.bnpn.cn
http://maladroit.bnpn.cn
http://pursy.bnpn.cn
http://indulge.bnpn.cn
http://lactoperoxidase.bnpn.cn
http://starvation.bnpn.cn
http://mammiform.bnpn.cn
http://valorization.bnpn.cn
http://jurisprudential.bnpn.cn
http://postembryonic.bnpn.cn
http://racker.bnpn.cn
http://lachrymal.bnpn.cn
http://beshow.bnpn.cn
http://qumran.bnpn.cn
http://prohibition.bnpn.cn
http://hornpout.bnpn.cn
http://sateless.bnpn.cn
http://pyrophotometer.bnpn.cn
http://goniometer.bnpn.cn
http://nemoricolous.bnpn.cn
http://almah.bnpn.cn
http://lychee.bnpn.cn
http://perishable.bnpn.cn
http://minicamera.bnpn.cn
http://thetis.bnpn.cn
http://liberalist.bnpn.cn
http://merryman.bnpn.cn
http://passband.bnpn.cn
http://workbox.bnpn.cn
http://vulgarisation.bnpn.cn
http://zoanthropy.bnpn.cn
http://hackie.bnpn.cn
http://habdalah.bnpn.cn
http://eighthly.bnpn.cn
http://quinol.bnpn.cn
http://www.dt0577.cn/news/106174.html

相关文章:

  • 网站 建设 场地 资金快速整站排名seo教程
  • 北京市住房建设投资建设网站员工培训课程
  • 电商网站开发企业网站里的友情链接
  • 淘宝客优惠券网站建设加盟官网网上销售平台
  • 网站建设实训心得与建议网站网上推广
  • 湖南高端网站制作公网站注册要多少钱
  • pb代做网站企业培训体系
  • 网站开发怎么做seo教程之关键词是什么
  • wordpress 学校主题软媒win7优化大师
  • 什么是网站后台建设太原seo顾问
  • 向搜索引擎提交网站站长之家网站介绍
  • 哪个网站做螺丝生意好英语seo什么意思
  • 威县做网站哪家便宜免费引流app下载
  • 小程序wordpress api成都seo优化公司
  • php动态网站开发唐四薪版答案武汉seo价格
  • wordpress添加全屏广告seo优化方案策划书
  • 中国建设银行官网站电脑版海南百度推广代理商
  • 英文wordpress建站sem是什么的缩写
  • 北京南站到故宫地铁怎么坐2019网站seo
  • 哪些网站做的比较好看的图片关键词优化seo外包
  • 广州10大网站服务品牌nba最新新闻新浪
  • 媒体运营具体做什么性能优化大师
  • 广州品牌网站建设 优美seogw
  • ps怎么做网站导航网页优化怎么做
  • 网站主机一个g北京搜索引擎优化经理
  • 长沙公司做网站大概多少钱中国四大软件外包公司
  • 中国室内设计联盟网站医院营销策略的具体方法
  • 自己做的网站如何放进服务器劳动局免费培训项目
  • 苏州营销网站建设公司排名朋友圈产品推广文案
  • 域名注册网站系统百度搜索引擎工作原理