GithubHelp home page GithubHelp logo

10cl / chatdev Goto Github PK

View Code? Open in Web Editor NEW
454.0 13.0 73.0 39.01 MB

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.

Home Page: http://chatdev.toscl.com/

License: GNU General Public License v3.0

HTML 0.17% TypeScript 97.79% JavaScript 1.12% SCSS 0.46% CSS 0.46%
prompt-ide ai-agents-framework aigame prompt-engineering promptflow gpts

chatdev's Introduction

ChatDev IDE: Building Your AI Agent

author license release last commit discord chrome-version chrome-user

Get ChatDev for Chromium Get ChatDev for Microsoft Edge

Screenshot   |   GameWindow   |   ChatWindow   |   PromptIDE   |   Bots   |   Installation   

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

  • GameMode: in the AI Town Social Simulation, you can customize these NPCs & location mark.
  • Agent Support: import from Agent Community or defined yours.
  • PromptIDE: Automatic completion, Dual screen display, Visualize PromptFlow, JavaScript Support
  • Not just ChatGpt, but the new Bing Chat, Google Bard, Claude, QianWen, iFlytek Spark, and more than 10 open source models.

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

  • Prompt Flow Editor: Used to edit the YAML file of Prompt Flow and the prompt content and JavaScript script of the node
  • Prompt Flow Visualization: Through the visualization of the execution process of the Prompt Flow node, the color of the node will change when it is executed to a certain node
  • JavaScript Support: Through JavaScript scripts, you can use your creativity to realize the cooperation of different NPCs to achieve your Agent
  • Export & Import: You can import other excellent Agent or share your Agent

PromptFow Editor

  • YAML syntax highlighting
  • automatic completion for NPCs name & Prompt Library.
  • dual screen display

Create and iteratively develop flow with PromptFow Editor

  • Create executable flows that link LLMs, prompts, JavaScript code and other tools together.
  • Debug and iterate your flows, especially the interaction with LLMs with ease.

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

  • Clone the source code.
  • Run yarn install to install dependencies.
  • Run yarn build to build the plugin.
  • Follow the steps in "Manual Installation" to load the dist folder into your browser.

chatdev's People

Contributors

10cl avatar dependabot[bot] avatar wong2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chatdev's Issues

chat history / no auto update more

V1.4.0 may there is a bug, or a feature

the history message does not more update autoamtically I have to close and reopen the chat history , but the agent is running and produce output on each node.

Its not very useable in editor mode to test the agent.
Cause you need to open the "chat history"

LayoutChange AceEditor prompt and promt-func change or switch vom horizontal split view to vertical split view

chatdev_vertical_prompt-func-split I would like to edit more comfortable the prompt and prompt-func. It has a column layout I would prefer to switch to a row layout.

| prompt | prompt-funk |
so i have always to scroll in the prompt desciption cause i can not see the hole prompt lines
I would prefer to see the editors like this:

name="prompt"
name="prompt-func"

May a change in "LocalPrompt.tsx" ?

The user should be able to adjust by resize:vertical the divs, so he can focus on prompt or prompt-func.

Enhancement: single shot without complete chat history

Is there a function to set in yaml the the question to the LLM is not with all the history, instead a single shot or completion?

  - node: SingleShot
       history: false  

I want reduce traffic and send only a short question with all information to get the answhere and it should not send all the history data.

langchain embedding

I see you try to add langchain memory and usind embedding for documents.

On my local running LLM i have not running embedding API endpoint.
What do you plan to use for embedding?

May with my other sugesstion #36 (comment) to add more API Endpoints, we can run on one Port llama.cpp with ./server --embedding API ?

npm install error V1.3.2

Describe the bug
V1.3.2 got error during "npm install"

Console log

C:\chatdev>REM git clone https://github.com/10cl/chatdev.git

C:\chatdev>node -v
v20.10.0

C:\chatdev>npm -v
10.2.5

C:\chatdev>npm install
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/youtubei.js
npm ERR!   youtubei.js@"^8.1.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional youtubei.js@"^5.8.0" from [email protected]
npm ERR! node_modules/langchain
npm ERR!   langchain@"^0.0.212" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/youtubei.js
npm ERR!   peerOptional youtubei.js@"^5.8.0" from [email protected]
npm ERR!   node_modules/langchain
npm ERR!     langchain@"^0.0.212" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! C:\Users\User\AppData\Local\npm-cache\_logs\2024-01-10T20_57_36_844Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: C:\Users\User\AppData\Local\npm-cache\_logs\2024-01-10T20_57_36_844Z-debug-0.log

C\chatdev>

Error @tanstack/react-router'

Describe the bug

tsc && vite build

src/app/components/Sidebar/NavLink.tsx:1:16 - error TS2724: '"@tanstack/react-router"' has no exported member named 'LinkPropsOptions'. Did you mean 'UseLinkPropsOptions'?

1 import { Link, LinkPropsOptions } from '@tanstack/react-router'
~~~~~~~~~~~~~~~~

src/app/router.tsx:1:29 - error TS2305: Module '"@tanstack/react-router"' has no exported member 'ReactRouter'.

1 import { createHashHistory, ReactRouter, RootRoute, Route, useParams } from '@tanstack/react-router'
~~~~~~~~~~~

Found 2 errors in 2 files.

Errors Files
1 src/app/components/Sidebar/NavLink.tsx:1
1 src/app/router.tsx:1

I have done that "Fix:" TanStack/router#698 (comment)

Desktop (please complete the following information):

  • OS:Win10
  • npm 10.2.5

Support for image upload

We now have support for file upload on Bard and ChatGPT. Makes sense to allow ChatDev input to have that option as well.

You are an professional prompt engineer

Describe the bug
I just get this reply whatever I write in the prompt:

You are an professional prompt engineer that can improve user input prompt to make LLM better understand these prompts.

I will give you a short description of a business goal, please rewrite it into a detailed prompt that can make large language model know how to make this business goal better based this prompt.
here is the short description: ">>>>Develop a NES game<<<<".

the prompt should ensure LLMs make your business goal that can be more feasible
Response should not contain more than 200 words
Output language: en-US
The following examples has nothing to do with prompt
START EXAMPLES
------ Example Inputs ------
Develop a student-focused mobile application dedicated to managing and regulating children's daily smartphone usage.

------ Example Outputs ------
Develop a student-focused mobile application for parents and guardians, aimed at managing and regulating children's daily smartphone usage. The app should provide features such as setting time limits, monitoring screen time, tracking app usage, and sending notifications to remind children to take breaks from their devices. Additionally, the app should encourage healthy habits by promoting physical activity, social interaction, and academic engagement during designated device-free times. The app should be user-friendly, accessible on both Android and iOS platforms, and offer personalized recommendations based on each child's interests and needs.

END EXAMPLES

Desktop (please complete the following information):

  • OS: MacOS
  • Browser Chrome

有办法通过得到一些和场景有关的数据对NPC的决策做知识蒸馏,然后在NPC决策的时候不需要调用LLM只需要蒸馏出来的小模型吗

观察到NPC的状态中有如下数据:

您附近的 NPCS 活动:
海莉·约翰逊 (Hailey Johnson) 在艺术家的共同居住空间、公共休息室、公共休息室沙发上看电视(观看新节目) @ the Ville:艺术家的共同居住空间:公共休息室:公共休息室沙发
阿比盖尔·陈 (Abigail Chen) 在艺术家的共同居住空间、公共休息室、公共房间的桌子上休息并看电视(讨论拉吉夫·帕特尔 (Rajiv Patel) 和阿比盖尔·陈 (Abigail Chen) 关于创意项目的潜在合作的讨论、参加市长选举讨论和市政厅会议,并探索各种兴趣,例如演奏音乐和讨论自然界的数学模式。)@ the Ville:艺术家的共同居住空间:公共休息室:公共房间的桌子
拉托亚·威廉姆斯 (Latoya Williams) 在艺术家的共同居住空间、公共休息室里创作她的摄影系列(从她的旅行中选择最好的照片) @ the Ville:艺术家的共同居住空间:拉托亚·威廉姆斯的房间:办公桌
弗朗西斯科·洛佩兹 (Francisco Lopez) 在艺术家的共同居住空间、海莉·约翰逊 (Hailey Johnson) 的房间里洗衣服(将衣物转移到烘干机) @ the Ville:艺术家的共同居住空间:弗朗西斯科·洛佩兹 (Francisco Lopez) 的房间:壁橱
Ryan Park 在 Ville 户外慢跑(在附近慢跑) @ the Ville:Johnson Park:park:park 花园
拉吉夫·帕特尔 (Rajiv Patel) 在艺术家的共同居住空间、公共休息室、公共休息室沙发上看电视(看节目) @ the Ville:艺术家的共同居住空间:公共休息室:公共休息室沙发

您在艺术家的共同居住空间,公共休息室
你附近有一些建筑物:
艺术家的共同居住空间
约翰逊公园

在艺术家的共享居住空间中,您附近有一些家具:
画架
壁橱
桌子

吉他
淋浴
浴室水槽
洗手间
冰箱
公共休息室沙发
公共房间的桌子
烤面包机
厨房水槽
烹饪区

每個NPC的状态似乎都包含了他附近的NPC和家具有哪些,然后可否通过这些信息用NER结合LLM给出的数据训练出一个类似于状态机或者分层策略网络的算法,这样的好处是可能可以把NPC的数量从25扩大到2000以上,因为分层策略网络算法实际上很节省,另外也可以和一些必要的逻辑结合起来,然后只是在聊天的时候调用LLM

No overload matches this call

Describe the bug

src/app/state/index.ts:25:31 - error TS2769: No overload matches this call.
in
25 export const licenseKeyAtom = atomWithStorage('licenseKey', '', undefined, { unstable_getOnInit: true })

Details
Win10
npm -v
10.2.5

Workflow
V1.3.2 dezip
run npm update
and
run npm run build

Enhancement: Node Flow Control

Is it possible to change the next node in Javascript.
It would be nice to change the next node to another node.
So we can change the way depends of analysis of output to different tasks.

Multiple Edit Windows are opening instead of one

Below is the image of the bug

image

I am unable edit like this , can you help
to recreate open edit GPT's and click on GPTs and click import , Then you can recreate,

To remove it go to settings and click save then it will go

  • OS: Windows
  • Browser chrome

When I use the chrome extension, only Bing work.

Describe the bug
When I use the chrome extension, only Bing work.
It seems that it can't log in those chatbot sites with the caches.

Desktop (please complete the following information):

  • OS: Windows
  • Browser chrome

Lost Projects

Describe the bug
On more than one occasion I've spent several hours working on projects, to have the system seemingly lose its place and all work it had completed. Is there a way to recover?

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Chrome

src/app/components/Chat/ConversationPanel.tsx

Describe the bug
I tried to fix youtubei and installed "youtubei": "^1.3.3"

npm -v
10.2.5
node -v
v20.10.0

git clone https://github.com/10cl/chatdev.git
npm run build

src/app/components/Chat/ConversationPanel.tsx:28:26 - error TS2307: Cannot find module './LocalPrompts' or its corresponding type declarations.

28 import LocalPrompts from './LocalPrompts'

and yes the main source (git clone https://github.com/10cl/chatdev.git) try to import a non more existing file "LocalPrompts"

Gemini images not working

Describe the bug
prompt:
Show me photos of elephant

Output:

Sure, here are some photos of elephants:

[Image of African bush elephant]
[Image of African forest elephant]
[Image of Asian elephant]

Expected: images pf elephants

Desktop (please complete the following information):

  • OS: macos
  • Browser: brave

add more API LMMs

I can run on server a CPU LLM with llama.cpp
and may with oobabooga one or two models on the GPUs each on different openai compatibility ports
like :5000 , :5001, :5002.
May it would be possible to ad some API Bots in Configuration,today i use the ChatGPT Bots with API Configuration and I change it to a local API. This can also be running GPT4ALL localy.

More API Bots 👍
BOT-A http://Local-IP:Port/v1
BOT-B http://Local-IP:Port/v1
BOT-C http://Local-IP:Port/v1

Changing the NPCs, map, player, and other things in game mode

Hello there,

I really love your project! Kudos! Is there any way I could change the player's speed, the NPCs or the map in game mode? If not, could you implement it?

I just want to create an office with the CEO, CFO, PO and tester, so i don't have to run around the city/village to find them. Also, there are NPCs that are just members, I would like to delete them. They are a bit confusing. I would like to change the player speed to make him faster. I think he is kinda slow.

With what did you build the map?

Best Regards
Nik

AI Issue

Hello,
I just installed the extension onto Chrome and started the simulation but I keep getting an error.
It keeps telling me this "Failed to establish websocket connection."
How do I fix?

I want to use Falcon and/or Vicuna

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.