10cl / chatdev

ChatDev IDE is an tools for building your ai agent, Whether it's NPCs in games or powerful agent tools, you can design what you want for this platform.
http://chatdev.toscl.com/
GNU General Public License v3.0
504 stars 79 forks source link
ai-agents-framework aigame gpts prompt-engineering prompt-ide promptflow

ChatDev IDE: Building Your AI Agent

[![author][author-image]][author-url] [![license][license-image]][license-url] [![release][release-image]][release-url] [![last commit][last-commit-image]][last-commit-url] [![discord][discord-image]][discord-url] [![chrome-version][chrome-image]][chrome-url] [![chrome-user][chrome-user-image]][chrome-user-url] Get ChatDev for Chromium Get ChatDev for Microsoft Edge [Screenshot](#-screenshot)   |   [GameWindow](#-game-window)   |   [ChatWindow](#-chat-window)   |   [PromptIDE](#-prompt-ide)   |   [Bots](#-bots)   |   [Installation](#-installation)    [author-image]: https://img.shields.io/badge/author-10cl-blue.svg [author-url]: https://github.com/10cl [license-image]: https://img.shields.io/github/license/10cl/chatdev?color=blue [license-url]: https://github.com/10cl/chatdev/blob/main/LICENSE [release-image]: https://img.shields.io/github/v/release/10cl/chatdev?color=blue [release-url]: https://github.com/10cl/chatdev/releases/latest [last-commit-image]: https://img.shields.io/github/last-commit/10cl/chatdev?label=last%20commit [last-commit-url]: https://github.com/10cl/chatdev/commits [discord-image]: https://img.shields.io/discord/977885982579884082?logo=discord [discord-url]: https://discord.gg/fdjWfgGPjb [chrome-url]: https://chromewebstore.google.com/detail/chatdev-ide-building-your/dopllopmmfnghbahgbdejnkebfcmomej [chrome-image]: https://img.shields.io/chrome-web-store/v/dopllopmmfnghbahgbdejnkebfcmomej [chrome-user-url]: https://chromewebstore.google.com/detail/chatdev-ide-building-your/dopllopmmfnghbahgbdejnkebfcmomej [chrome-user-image]: https://img.shields.io/chrome-web-store/users/dopllopmmfnghbahgbdejnkebfcmomej

ChatDev IDE is a tools for building your AI agent, Whether it's NPCs in games or powerful agent tools, you can design what you want for this platform.

It accelerates prompt engineering through JavaScript Support that allows implementing complex prompting techniques.

https://youtu.be/O0gC2Sxm0EQ?feature=shared

📢 TLDR

Feature comparison

Feature ChatDev IDE ChatDev(OpenBMB)
Programming Approach TypeScript Python Code
WorkFlow promptflowx ChatChainConfig.json
Supported LLMs Rich Variety OpenAI-only
PromptIDE
RPG Game
Scalable
One-click Deployment

✨ Game Window

Generative_agents_dev is the most exciting part, all the roles you can customize, you can design a mathematician, a psychological analysis expert to solve various problems for you, you just need to define a reasonable Prompt role definition, the richness of the map will be completely controlled by you, if you are satisfied with your design, you can also share it with us, we will recommend it to other users. In Game Window, you can choose your favorite large model on the left, on the map, control the NPC's actions through the direction keys or mouse, when you are close to the NPC or reach the marked position, the NPC will actively trigger the cold start response, or actively enter your chat content in the input box below. the game is based on a simulated AI town social environment, you can get close to the NPC or walk to a specific location, through the input and NPC to communicate or chat with yourself in a specific location.

✨ Chat Window

Choose Chat Window, and click Switch to Chat Mode... in the upper right corner, select your favorite large model on the left, Chat Window will be a regular LLM Chat UI, and all your inputs will be through the normal LLM interface, output the reply of the large model.

chat_mode.png

✨ Prompt IDE

Promptflowx is a suite of development tools designed to streamline the end-to-end development cycle of LLM-based AI applications, from ideation, prototyping, testing, evaluation. It makes prompt engineering much easier and enables you to build LLM apps with production quality.

prompt_ide.png

PromptFow Editor

Create and iteratively develop flow with PromptFow Editor

left editor is the YAML file of PromptFlow, where path and func are highlighted, indicating that a custom Prompt is referenced. You can move the mouse and click on the node on path or func, and the right side will display the Prompt you customized on the node. The rightmost folded interface is the visual Prompt Flow. You can also edit the Prompt content of the node by double-clicking the node. When you modify the YAML file on the left, the visual Prompt Flow on the right will be updated in real time.

PromptFow visualization

While how LLMs work may be elusive to many developers, how LLM apps work is not - they essentially involve a series of calls to external services such as LLMs/databases/search engines, or intermediate data processing, all glued together. Thus LLM apps are merely Directed Acyclic Graphs (DAGs) of function calls. These DAGs are flows in prompt flow. By observing many internal use cases, we learned that deeper insight into the detail of the execution is critical. Establishing a systematic method for tracking interactions with external systems is one of design priority. Consequently, We adopted an unconventional approach - prompt flow has a YAML file describing how function calls (we call them Tools) are executed and connected into a Directed Acyclic Graph (DAG).

Export & Import

You can export your prompt flow to a json file and import it to another devices. it contains all the information about your prompt flow, including the prompt, the JavaScript functions, and the YAML file.

🤖 Bots

ChatGpt、Bing、Bard、Claude、LLama 2、Vicuna、Falcon、Qianwen、iFlytek Spark

🔨 Installation

1. Install from Web Store

  1. Search for ChatDev in the Chrome Web Store and click "Install."
  2. Search for ChatDev in the Microsoft-Edge-Extensions and click "Get."

2. Manual Installation

  1. Download chatdev1.5.0.zip from the Releases page.
  2. Extract the files.
  3. In Chrome/Edge, open the extensions page (chrome://extensions or edge://extensions).
  4. Enable developer mode.
  5. Drag and drop the extracted folder onto the page to import it (do not delete the folder after importing).

3. Build from Source Code