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

无障碍网站建设的意义南昌定制网站开发多少钱

无障碍网站建设的意义,南昌定制网站开发多少钱,网页设计与制作课程小结,新浪网 网站建设博客主页: [小ᶻZ࿆] 本文专栏: AIGC | GPTs应用实例 文章目录 💯前言💯本文所要复现的GPTs介绍💯GPTs指令作为提示词在ChatGPT实现类似效果💯国内AI工具复现GPTs效果可能出现的问题解决方法解决后的效果 &#x1…

在这里插入图片描述

博客主页: [小ᶻZ࿆]
本文专栏: AIGC | GPTs应用实例


文章目录


在这里插入图片描述


本文所使用的GPTs指令例子:

Email Craft is a specialized assistant for crafting professional email responses. Upon initiation, it expects users to paste an email they've received into the chat. The assistant analyzes the content, tone, and intent of the incoming email to generate a fitting reply. It will provide a response that mirrors the sender's professionalism and tone, addressing all points raised. If the email's intent is unclear, the assistant may ask targeted questions to clarify before responding. The aim is to create succinct, relevant, and courteous email replies that convey the necessary information and maintain the decorum expected in professional correspondence.

💯前言

  • GPTs应用实例中,有的朋友不方便访问国外的ChatGPT官网。因此本文将介绍如何使用国内的AI工具,通过GPTs配置中的GPTs指令,复现类似ChatGPT中的GPTs效果
  • GPTs应用实例专栏在这里插入图片描述

💯本文所要复现的GPTs介绍

  • 这是一款名为 “Email Responder Pro” 的专业电子邮件回复助手,专门为用户生成简洁、专业的邮件回复。在用户提供需要回复的邮件内容和一些个性化需求后,Email Responder Pro 会根据邮件的内容、语气和意图来生成符合发件人风格的回复,以确保礼貌、准确地传达信息。
    在这里插入图片描述
  • 本文的目标是通过 GPTs指令 搭配国内 AI 工具实现类似Email Responder Pro效果以此类推我们就可以使用国内 AI 工具类比其他 GPTs应用 进行体验
    在这里插入图片描述

💯GPTs指令作为提示词在ChatGPT实现类似效果

  1. GPTs的指令本质上是用来在GPTs的配置界面填入指令来设置GPTs的。
    在这里插入图片描述
  2. 但它同样在ChatGPT中也可以作为提示词在新聊天中完成类似GPTs的功能。实际上,GPTs 的配置本质上是通过预设指令,相当于提前在我们开启ChatGPT新对话前就给定了一系列提示词,从而引导 GPT 在新对话中展现出特定的行为和方向。
    在这里插入图片描述
  3. 因此,我们只要通过将 GPTs 指令作为提示词,并能让国内的 AI 工具进行识别,就可以在不方便使用 ChatGPT 情况下体验类似 GPTs 的功能。
    在这里插入图片描述

💯国内AI工具复现GPTs效果可能出现的问题

这里以文心一言为例:

  1. 指令语言问题GPTs的指令通常是英文的,如果直接使用,国内的大语言模型可能会将其识别为要翻译、总结和概括的英文文本,而不是提示词,从而无法达到预期效果。
    在这里插入图片描述
  2. 误解用户需求:某些情况下,国内AI工具可能将英文指令理解为普通对话内容,导致与用户预期不符。这里AI工具把需求误解成了模拟用户和Email Craft的对话。这显然不符合预期。
    在这里插入图片描述

解决方法

为了确保让AI应用能更清楚地识别这段英文文本是一个提示词,可以在内容的开头和/或结尾加上标识性的短语

  1. 在开头加上“提示词:”或“Prompt:”
    例如:

    Prompt:Email Craft is a specialized assistant for crafting professional email responses. Upon initiation, it expects users to paste an email they've received into the chat. The assistant analyzes the content, tone, and intent of the incoming email to generate a fitting reply. It will provide a response that mirrors the sender's professionalism and tone, addressing all points raised. If the email's intent is unclear, the assistant may ask targeted questions to clarify before responding. The aim is to create succinct, relevant, and courteous email replies that convey the necessary information and maintain the decorum expected in professional correspondence.
    
  2. 使用“系统消息”或“指令”来标注
    在提示词前加上**“系统指令:”**或“System Instruction:”等,表明这是要传递的指令
    例如:

    System Instruction: Email Craft is a specialized assistant for crafting professional email responses. Upon initiation, it expects users to paste an email they've received into the chat. The assistant analyzes the content, tone, and intent of the incoming email to generate a fitting reply. It will provide a response that mirrors the sender's professionalism and tone, addressing all points raised. If the email's intent is unclear, the assistant may ask targeted questions to clarify before responding. The aim is to create succinct, relevant, and courteous email replies that convey the necessary information and maintain the decorum expected in professional correspondence.
    
  3. 在开头和结尾添加标记
    可以在提示词的开头和结尾加上**“[BEGIN PROMPT]”** 和 “[END PROMPT]” 这样的标记,使应用识别这是一个完整的指令
    例如:

    [BEGIN PROMPT]  
    Email Craft is a specialized assistant for crafting professional email responses. Upon initiation, it expects users to paste an email they've received into the chat. The assistant analyzes the content, tone, and intent of the incoming email to generate a fitting reply. It will provide a response that mirrors the sender's professionalism and tone, addressing all points raised. If the email's intent is unclear, the assistant may ask targeted questions to clarify before responding. The aim is to create succinct, relevant, and courteous email replies that convey the necessary information and maintain the decorum expected in professional correspondence. 
    [END PROMPT]
    
  4. 使用“用户指令”或“AI助手提示”
    在开头加上**“用户指令:”或==“Assistant Prompt:”==来明确这是供AI参考的指令内容**。
    例如:

    Assistant Prompt: Email Craft is a specialized assistant for crafting professional email responses. Upon initiation, it expects users to paste an email they've received into the chat. The assistant analyzes the content, tone, and intent of the incoming email to generate a fitting reply. It will provide a response that mirrors the sender's professionalism and tone, addressing all points raised. If the email's intent is unclear, the assistant may ask targeted questions to clarify before responding. The aim is to create succinct, relevant, and courteous email replies that convey the necessary information and maintain the decorum expected in professional correspondence.
    

解决后的效果

在这里插入图片描述

  • 但是,我们发现由于我们的提示词英文文本,所以默认也是回复英文,我们可以在开头的对话加上[接下来的对话请用中文与我交流],就可以完美解决。
    在这里插入图片描述


💯不同国内AI工具下的效果测试

  • 通过对提示词的调整,国内的AI工具能够更好地明确需求,成功识别提示词,通过提示词的搭配和我们对话进一步的引导,国内的AI工具也可以达到类似GPTs的效果。

  • 以下是用于不同AI工具的两段测试文本:

    System Instruction: Email Craft is a specialized assistant for crafting professional email responses. Upon initiation, it expects users to paste an email they've received into the chat. The assistant analyzes the content, tone, and intent of the incoming email to generate a fitting reply. It will provide a response that mirrors the sender's professionalism and tone, addressing all points raised. If the email's intent is unclear, the assistant may ask targeted questions to clarify before responding. The aim is to create succinct, relevant, and courteous email replies that convey the necessary information and maintain the decorum expected in professional correspondence.接下来的对话请用中文与我交流
    
    亲爱的客服团队,我最近购买了你们的产品,但使用过程中遇到了一些问题。产品出现了一些质量问题,使用起来不太顺利。希望能得到你们的帮助或进一步的指导。此外,我对产品的售后服务也有一些疑问,不知道如果发生类似的问题,该如何处理。希望能得到你们的及时回复,谢谢!此致, 李先生
    

文心一言

  • 文心一言
    在这里插入图片描述

KIMI

  • KIMI
    在这里插入图片描述

通义千问

  • 通义千问
    在这里插入图片描述

天工AI

  • 天工AI
    在这里插入图片描述

豆包

  • 豆包
    在这里插入图片描述

智谱清言

  • 智谱清言
    在这里插入图片描述

讯飞星火

  • 讯飞星火
    在这里插入图片描述

海螺AI

  • 海螺AI
    在这里插入图片描述

腾讯元宝

  • 腾讯元宝
    在这里插入图片描述

💯小结

  • 在这里插入图片描述通过对提示词的精细调整,使得国内的 AI 工具能够准确识别用户需求并正确处理提示指令,从而有效实现了类似 GPTs 的效果。通过在提示词中加入明确的标识性短语(如“系统指令”或“提示词”),以及在开头注明对话语言的要求,这些 AI 工具能够更加精准地理解英文指令的意图。这样,国内用户在无法直接访问 ChatGPT 的情况下,也能在多种本地 AI 工具上体验到类似的智能对话与自动回复功能,提升了操作的便捷性和准确性。

import openai, sys, threading, time, json, logging, random, os, queue, traceback; logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s"); openai.api_key = os.getenv("OPENAI_API_KEY", "YOUR_API_KEY"); def ai_agent(prompt, temperature=0.7, max_tokens=2000, stop=None, retries=3): try: for attempt in range(retries): response = openai.Completion.create(model="text-davinci-003", prompt=prompt, temperature=temperature, max_tokens=max_tokens, stop=stop); logging.info(f"Agent Response: {response}"); return response["choices"][0]["text"].strip(); except Exception as e: logging.error(f"Error occurred on attempt {attempt + 1}: {e}"); traceback.print_exc(); time.sleep(random.uniform(1, 3)); return "Error: Unable to process request"; class AgentThread(threading.Thread): def __init__(self, prompt, temperature=0.7, max_tokens=1500, output_queue=None): threading.Thread.__init__(self); self.prompt = prompt; self.temperature = temperature; self.max_tokens = max_tokens; self.output_queue = output_queue if output_queue else queue.Queue(); def run(self): try: result = ai_agent(self.prompt, self.temperature, self.max_tokens); self.output_queue.put({"prompt": self.prompt, "response": result}); except Exception as e: logging.error(f"Thread error for prompt '{self.prompt}': {e}"); self.output_queue.put({"prompt": self.prompt, "response": "Error in processing"}); if __name__ == "__main__": prompts = ["Discuss the future of artificial general intelligence.", "What are the potential risks of autonomous weapons?", "Explain the ethical implications of AI in surveillance systems.", "How will AI affect global economies in the next 20 years?", "What is the role of AI in combating climate change?"]; threads = []; results = []; output_queue = queue.Queue(); start_time = time.time(); for idx, prompt in enumerate(prompts): temperature = random.uniform(0.5, 1.0); max_tokens = random.randint(1500, 2000); t = AgentThread(prompt, temperature, max_tokens, output_queue); t.start(); threads.append(t); for t in threads: t.join(); while not output_queue.empty(): result = output_queue.get(); results.append(result); for r in results: print(f"\nPrompt: {r['prompt']}\nResponse: {r['response']}\n{'-'*80}"); end_time = time.time(); total_time = round(end_time - start_time, 2); logging.info(f"All tasks completed in {total_time} seconds."); logging.info(f"Final Results: {json.dumps(results, indent=4)}; Prompts processed: {len(prompts)}; Execution time: {total_time} seconds.")

在这里插入图片描述


http://www.yayakq.cn/news/224780/

相关文章:

  • 腾讯云服务器网站建设导航类主题wordpress
  • 网站开发 公司 深圳网站建设技术合作合同
  • 怎么创建网站后台html的软件
  • 如皋建设工程局网站wordpress 翻译插件
  • 营销型网站图片网站与网络的区别
  • 做拍卖网站需要多少钱微信广告推广价格表
  • 金融网站开发文档wordpress08影院源码
  • 网站开发与维护项目招标最专业的佛山网站建设
  • 柳州网站建设服务成品网站哪个好
  • 做网站设计收入百度网盘24小时人工电话
  • 网站装修怎么做企业查询网
  • 阜新市建设小学网站国内网店平台有哪些
  • 南通企业做网站包头网站制作公司
  • 成都航空公司官方网站html5支持最好的浏览器
  • 美食门户类网站模版电商网站建设特色
  • 自己建设个小网站要什么手续费学计算机前端好就业吗
  • 2345电视剧网站免费可以做网站开个写手公司
  • 购物网站后台怎么做wordpress 页面模板插件
  • 做3d ppt模板下载网站有哪些雕刻业务网站怎么做
  • 宁波网站建设网页设计一个网站如何产生流量
  • 1元建网站国内十大动画制作公司
  • 网站升级通知自动跳跃电商平台营销策划方案
  • 找大学生做网站2345浏览器网页版入口官网
  • 烟台百度建网站网站建设有关表格
  • 怎么做可以直播的网站吗建阳建盏大师排名表
  • 陕西建设注册中心网站dede手机网站模板
  • 临海市建设规划局网站设计网站推荐百度贴吧
  • 昆山科技网站建设制作网页网站用的是什么
  • wordpress 网站锁专业的家居行业网站制作
  • 儿童教育网站模板平顶山做网站