/chatMANipulation

“让ChatGPT帮我们生成机器人控制指令吧。”

Primary LanguagePython

安装

安装依赖库:

pip install -r requirements.txt

说明

文件结构

  1. /frchat
  • bot_*.py - 用于不同场景的chatbot
  • gui_*.py - 集成了chatbot的GUI
  • init_*.py - 用于不同场景的prompt
  1. /fr_python_sdk
  • 机器人的Python SDK
  1. /frmovewrapper
  • Python SDK中运动指令的封装
  1. /script
  • GUI启动脚本

基本使用

通过 /script 中的脚本启动 /frchat 中的GUI,例如

python /script/chatbot_gui_palletize.py

启动ChatGPT码垛GUI。

ChatGPT Prompts 技巧

Clear Communication (CC) 原则

Prompts要清晰明确

  1. 定义对话的目的重心
  2. 语言要具体,内容要相关
  3. 避免开放宽泛的prompts
  4. 避免对话离题

术语和歧义的处理

  1. 对术语进行定义
  2. 避免使用带有歧义的语言
  3. 使用清晰、明确的语言

Bad Example

"Hey there! Can you give me some intel on the latest happenings in the interwebz? I'm trying to get a handle on the zeitgeist."

Good Example

"What are the best restaurants in Paris that serve vegetarian food? I'm planning a trip to Paris and I'm looking for some good places to eat that cater to my dietary needs."

创建 Prompts 的一般步骤

  1. 明确目的重心
  2. 使用具体相关的语言
  3. 避免开放宽泛的prompts
  4. 按照CC原则检查修改prompts

如何掌控对话的走向

  1. 用清晰明确的prompt开启对话
  2. 鼓励ChatGPT完善回答
  3. 注意说话的语气,忌过度随意、轻蔑
  4. 时刻注意对话的走向,并做出必要的调整

⭐ “Act as ...” 魔法

作用

创建沉浸式的对话情景,模拟真实世界的场景

示例

  • I want you to act as a javascript console.
  • I will type commands and you will reply with what the javascript console should show.
  • I want you to only reply with the terminal output inside one unique code block, and nothing else.
  • Do not write explanations.
  • Do not type commands unless I instruct you to do so.
  • When I need to tell you something in english, i will do so by putting text inside curly brackets {like this}.
  • My first command is console.log("Hello World");