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

做网站编辑累不累seo推广软件下载

做网站编辑累不累,seo推广软件下载,企业所得税优惠政策有哪些,深圳做企业网站的公司文章目录 一. 提示词怎么写二. 完整代码三. 基于事实的prompt GPT-4和ChatGPT等LLM专用于生成文本。我们可以使用GPT-4和ChatGPT在各种场景中生成文本#xff0c;举例如下。 电子邮件合同或正式文档创意写作逐步行动计划头脑风暴广告职位描述 对于本项目#xff0c;我们将创建… 文章目录 一. 提示词怎么写二. 完整代码三. 基于事实的prompt GPT-4和ChatGPT等LLM专用于生成文本。我们可以使用GPT-4和ChatGPT在各种场景中生成文本举例如下。 电子邮件合同或正式文档创意写作逐步行动计划头脑风暴广告职位描述 对于本项目我们将创建一个工具它可以根据一系列事实生成新闻稿。我们可以根据目标媒体和受众选择新闻稿的篇幅、语调和风格。 一. 提示词怎么写 这里主要描述prompt提示词的构建逻辑因为大模型可以根据prompt的规定生成符合要求的文档。 给AI模型分配一个角色并尽可能精确地描述任务。如下给AI模型分配的角色是记者助手 prompt_role You are an assistant for journalists. \Your task is to write articles, based on the FACTS that are \given to you. \You should respect the instructions: the TONE, the LENGTH, \and the STYLE其他规定 prompt_role角色的描述以便大模型能够按照角色回答FACTS基于给定的事实数据来回答TONE回答风格这里是informalLENGTH回答的单词数STYLE生成的文本格式这里是blogpost # 拼装messages规定了prompt的格式 # prompt_role角色的描述以便大模型能够按照角色回答 # FACTS基于给定的事实数据来回答 # TONE回答风格这里是informal # LENGTH回答的单词数 # STYLE生成的文本格式这里是blogpost def assist_journalist( facts: List[str], tone: str, length_words: int, style: str ): facts , .join(facts) prompt f{prompt_role} \ FACTS: {facts} \ TONE: {tone} \ LENGTH: {length_words} words \ STYLE: {style} return ask_chatgpt([{role: user, content: prompt}])二. 完整代码 import os import openai from typing import List openai.api_key os.getenv(OPENAI_API_KEY) # 调用openai api def ask_chatgpt(messages): response openai.ChatCompletion.create( modelgpt-3.5-turbo, messagesmessages ) return response[choices][0][message][content] # prompt_role描述 prompt_role You are an assistant for journalists. \ Your task is to write articles, based on the FACTS that are \ given to you. \ You should respect the instructions: the TONE, the LENGTH, \ and the STYLE # 拼装messages规定了prompt的格式 # prompt_role角色的描述以便大模型能够按照角色回答 # FACTS基于给定的事实数据来回答 # TONE回答风格这里是informal # LENGTH回答的单词数 # STYLE生成的文本格式这里是blogpost def assist_journalist( facts: List[str], tone: str, length_words: int, style: str ): facts , .join(facts) prompt f{prompt_role} \ FACTS: {facts} \ TONE: {tone} \ LENGTH: {length_words} words \ STYLE: {style} return ask_chatgpt([{role: user, content: prompt}]) print( assist_journalist( [The sky is blue, The grass is green], informal, \ 100, blogpost ) )输出如下 Hey, everyone! Did you know that the sky is blue and the grass is green? I mean, its something we see every day and probably take for granted, but its still pretty amazing if you think about it! The sky appears blue to us because of something called Rayleigh scattering – basically, the molecules in the Earths atmosphere scatter sunlight in all different directions. Blue light has a shorter wavelength, so it gets scattered more than the other colors in the spectrum. Thats why the sky looks blue most of the time! As for the grass being green... thats due to chlorophyll, the pigment that helps plants capture sunlight to make their food. Chlorophyll absorbs red and blue light, but reflects green light, which is why we see plants as green.Its pretty cool how science explains these things we take for granted, dont you think? Next time youre outside, take a moment to appreciate the color palette around you! 三. 基于事实的prompt 通过明确facts数据让GPT基于事实来回答。 print(assist_journalist(# 这里让facts[A book on ChatGPT has been published last week,The title is Developing Apps with GPT-4 and ChatGPT,The publisher is OReilly.,],toneexcited,length_words50,stylenews flash,) ) 结果如下 Exciting news for tech enthusiasts! OReilly has just published a new book on ChatGPT called Developing Apps with GPT-4 and ChatGPT. Get ready to delve into the world of artificial intelligence and learn how to develop apps using the latest technology. Dont miss out on this opportunity to sharpen your skills!
http://www.dnsts.com.cn/news/1516.html

相关文章:

  • 西峡微网站开发免费站推广网站2022
  • 企业网站的建设 任务书关键词app
  • 郫县网站制作seo网络排名优化
  • 用xampp来搭建wordpress建站环境哪个公司做网站推广最好
  • 济南网站优化厂家文员短期电脑培训
  • 做网站维护师傅带要学多久软文广告经典案例200字
  • 做进出口外贸网站媒体资源网
  • 用ps做一份网站seo关键字排名优化
  • 深圳坂田网站建设网站服务器搭建与管理
  • 做博客网站怎么赚钱昆明seo优化
  • 福永网站建设深圳网络营销信息推荐
  • 如何做网站需求google网页版登录入口
  • 做的网站怎么打开是白板广东网站营销seo方案
  • 怎么做可上传图片的网站西安百度
  • anker 网站谁做的 seo won
  • 成立网站开发公司百度app下载官方
  • 乐至建设局网站seo关键词优化软件合作
  • 网站页面链接怎么做的深圳百度推广开户
  • 不做网站做百家号关键词搜索引擎
  • 视频运营管理平台淄博网站优化
  • 网站接口怎么做windows11优化大师
  • 台州网站优化排名营销策划与运营
  • 网站制作顶级公司百度指数搜索热度
  • 燕郊做网站百度搜索优化关键词排名
  • 微信上登录网站同步怎么做如何在其他平台做推广
  • 招标网站靠谱吗今日头条新闻视频
  • Wordpress带商城的主题seo优化方案
  • 大学生可以做的网站免费友情链接网页
  • 恩施网站开发关键词挖掘
  • 个人主页网站制作网站seo快速优化