Merge branch 'main' of github.com:OpenBMB/ChatDev
@ -113,9 +113,9 @@
|
||||
"Chief Creative Officer"
|
||||
],
|
||||
"clear_structure": "True",
|
||||
"brainstorming": "False",
|
||||
"gui_design": "True",
|
||||
"git_management": "False",
|
||||
"self_improve": "False",
|
||||
"incremental_develop": "False"
|
||||
"incremental_develop": "False",
|
||||
"background_prompt": "ChatDev is a software company powered by multiple intelligent agents, such as chief executive officer, chief human resources officer, chief product officer, chief technology officer, etc, with a multi-agent organizational structure and the mission of 'changing the digital world through programming'."
|
||||
}
|
@ -94,9 +94,9 @@
|
||||
"Chief Creative Officer"
|
||||
],
|
||||
"clear_structure": "True",
|
||||
"brainstorming": "False",
|
||||
"gui_design": "True",
|
||||
"git_management": "False",
|
||||
"self_improve": "False",
|
||||
"incremental_develop": "False"
|
||||
"incremental_develop": "False",
|
||||
"background_prompt": "ChatDev is a software company powered by multiple intelligent agents, such as chief executive officer, chief human resources officer, chief product officer, chief technology officer, etc, with a multi-agent organizational structure and the mission of 'changing the digital world through programming'."
|
||||
}
|
||||
|
@ -107,9 +107,9 @@
|
||||
"Chief Creative Officer"
|
||||
],
|
||||
"clear_structure": "True",
|
||||
"brainstorming": "False",
|
||||
"gui_design": "True",
|
||||
"git_management": "False",
|
||||
"self_improve": "False",
|
||||
"incremental_develop": "False"
|
||||
"incremental_develop": "False",
|
||||
"background_prompt": "ChatDev is a software company powered by multiple intelligent agents, such as chief executive officer, chief human resources officer, chief product officer, chief technology officer, etc, with a multi-agent organizational structure and the mission of 'changing the digital world through programming'."
|
||||
}
|
||||
|
@ -88,9 +88,9 @@
|
||||
"Chief Creative Officer"
|
||||
],
|
||||
"clear_structure": "True",
|
||||
"brainstorming": "False",
|
||||
"gui_design": "True",
|
||||
"git_management": "False",
|
||||
"self_improve": "False",
|
||||
"incremental_develop": "True"
|
||||
"incremental_develop": "True",
|
||||
"background_prompt": "ChatDev is a software company powered by multiple intelligent agents, such as chief executive officer, chief human resources officer, chief product officer, chief technology officer, etc, with a multi-agent organizational structure and the mission of 'changing the digital world through programming'."
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ RUN pip install --no-cache-dir -r requirements.txt
|
||||
# (you'll need to provide the actual key when running the container)
|
||||
ENV OPENAI_API_KEY=your_OpenAI_API_key
|
||||
|
||||
# Expose the port for online_log/app.py
|
||||
# Expose the port for visualizer/app.py
|
||||
EXPOSE 8000
|
||||
|
||||
# Set an entry point that runs a shell for interactive mode
|
||||
|
BIN
NLDD/NLDD_Category.png
Normal file
After Width: | Height: | Size: 210 KiB |
21
NLDD/README.md
Normal file
@ -0,0 +1,21 @@
|
||||
# NLDD (Natural Language Dataset for Dev)
|
||||
|
||||
<p align="center">
|
||||
<img src='./cover.png' width=800>
|
||||
</p>
|
||||
|
||||
Welcome to NLDD (Natural Language Dataset for Dev), a large prompted dataset tailored for Natural Language to Software (NL2Software) research. This repository contains a rich collection of prompts organized into 5 major categories and further subdivided into 40 subcategories. In total, the dataset comprises 1200 high-quality prompt samples extracted from ChatGPT 3.5, specifically curated to facilitate research in NL2Software.
|
||||
|
||||
## Structure
|
||||
- The generated prompt contains three parts:
|
||||
- Name of the software
|
||||
- Description of this software
|
||||
- Category of this software
|
||||
- Details
|
||||
- check.csv # Check Results
|
||||
- data_ChatDev_format.sh # Data, in the format of executable shell scripts (in ChatDev)
|
||||
- data_attribute_format.csv # Data, in the format of csv, containing three columns, Name/Description/Category
|
||||
## Category
|
||||
<p align="center">
|
||||
<img src='./NLDD_Category.png' width=800>
|
||||
</p>
|
BIN
NLDD/cover.png
Normal file
After Width: | Height: | Size: 1.7 MiB |
1200
NLDD/data/check.csv
Normal file
1200
NLDD/data/data_ChatDev_format.sh
Normal file
1201
NLDD/data/data_attribute_format.csv
Normal file
13
README.md
@ -8,14 +8,14 @@
|
||||
【English | <a href="readme/README-Chinese.md">Chinese</a> | <a href="readme/README-Japanese.md">Japanese</a> | <a href="readme/README-Korean.md">Korean</a> | <a href="readme/README-Filipino.md">Filipino</a> | <a href="readme/README-French.md">French</a> | <a href="readme/README-Slovak.md">Slovak</a> | <a href="readme/README-Portuguese.md">Portuguese</a> | <a href="readme/README-Spanish.md">Spanish</a> | <a href="readme/README-Dutch.md">Dutch</a> | <a href="readme/README-Hindi.md">Hindi</a> | <a href="readme/README-Bahasa-Indonesia.md">Bahasa Indonesia</a>】
|
||||
</p>
|
||||
<p align="center">
|
||||
【📚 <a href="wiki.md">Wiki</a> | 🚀 <a href="wiki.md#local-demo">Local Demo</a> | 👥 <a href="Contribution.md">Community Built Software</a> | 🔧 <a href="wiki.md#customization">Customization</a> | 👾 <a href="https://discord.gg/bn4t2Jy6TT")>Discord</a>】
|
||||
【📚 <a href="wiki.md">Wiki</a> | 🚀 <a href="wiki.md#visualizer">Visualizer</a> | 👥 <a href="Contribution.md">Community Built Software</a> | 🔧 <a href="wiki.md#customization">Customization</a> | 👾 <a href="https://discord.gg/bn4t2Jy6TT")>Discord</a>】
|
||||
|
||||
</p>
|
||||
|
||||
## 📖 Overview
|
||||
|
||||
- **ChatDev** stands as a **virtual software company** that operates through various **intelligent agents** holding
|
||||
different roles, including Chief Executive Officer <img src='online_log/static/figures/ceo.png' height=20>, Chief Product Officer <img src='online_log/static/figures/cpo.png' height=20>, Chief Technology Officer <img src='online_log/static/figures/cto.png' height=20>, programmer <img src='online_log/static/figures/programmer.png' height=20>, reviewer <img src='online_log/static/figures/reviewer.png' height=20>, tester <img src='online_log/static/figures/tester.png' height=20>, art designer <img src='online_log/static/figures/designer.png' height=20>. These
|
||||
different roles, including Chief Executive Officer <img src='visualizer/static/figures/ceo.png' height=20>, Chief Product Officer <img src='visualizer/static/figures/cpo.png' height=20>, Chief Technology Officer <img src='visualizer/static/figures/cto.png' height=20>, programmer <img src='visualizer/static/figures/programmer.png' height=20>, reviewer <img src='visualizer/static/figures/reviewer.png' height=20>, tester <img src='visualizer/static/figures/tester.png' height=20>, art designer <img src='visualizer/static/figures/designer.png' height=20>. These
|
||||
agents form a multi-agent organizational structure and are united by a mission to "revolutionize the digital world
|
||||
through programming." The agents within ChatDev **collaborate** by participating in specialized functional seminars,
|
||||
including tasks such as designing, coding, testing, and documenting.
|
||||
@ -40,16 +40,16 @@
|
||||
<p align="center">
|
||||
<img src='./misc/docker.png' width=400>
|
||||
</p>
|
||||
- September 25, 2023: The **Git** mode is now available, enabling the programmer <img src='online_log/static/figures/programmer.png' height=20> to utilize Git for version control. To enable this feature, simply set ``"git_management"`` to ``"True"`` in ``ChatChainConfig.json``. See [guide](wiki.md#git-mode).
|
||||
- September 25, 2023: The **Git** mode is now available, enabling the programmer <img src='visualizer/static/figures/programmer.png' height=20> to utilize Git for version control. To enable this feature, simply set ``"git_management"`` to ``"True"`` in ``ChatChainConfig.json``. See [guide](wiki.md#git-mode).
|
||||
<p align="center">
|
||||
<img src='./misc/github.png' width=600>
|
||||
</p>
|
||||
- September 20, 2023: The **Human-Agent-Interaction** mode is now available! You can get involved with the ChatDev team by playing the role of reviewer <img src='online_log/static/figures/reviewer.png' height=20> and making suggestions to the programmer <img src='online_log/static/figures/programmer.png' height=20>;
|
||||
- September 20, 2023: The **Human-Agent-Interaction** mode is now available! You can get involved with the ChatDev team by playing the role of reviewer <img src='visualizer/static/figures/reviewer.png' height=20> and making suggestions to the programmer <img src='visualizer/static/figures/programmer.png' height=20>;
|
||||
try ``python3 run.py --task [description_of_your_idea] --config "Human"``. See [guide](wiki.md#human-agent-interaction) and [example](WareHouse/Gomoku_HumanAgentInteraction_20230920135038).
|
||||
<p align="center">
|
||||
<img src='./misc/Human_intro.png' width=600>
|
||||
</p>
|
||||
- September 1, 2023: The **Art** mode is available now! You can activate the designer agent <img src='online_log/static/figures/designer.png' height=20> to generate images used in the software;
|
||||
- September 1, 2023: The **Art** mode is available now! You can activate the designer agent <img src='visualizer/static/figures/designer.png' height=20> to generate images used in the software;
|
||||
try ``python3 run.py --task [description_of_your_idea] --config "Art"``. See [guide](wiki.md#art) and [example](WareHouse/gomokugameArtExample_THUNLP_20230831122822).
|
||||
- August 28, 2023: The system is publicly available.
|
||||
- August 17, 2023: The v1.0.0 version was ready for release.
|
||||
@ -152,8 +152,7 @@ To get started, follow these steps:
|
||||
For more detailed information, please refer to our [Wiki](wiki.md), where you can find:
|
||||
|
||||
- An introduction to all command run parameters.
|
||||
- A straightforward guide for setting up a local web demo, which includes enhanced visualized logs, a replay demo, and a
|
||||
simple ChatChain Visualizer.
|
||||
- A straightforward guide for setting up a local web visualizer demo, which can visualize real-time logs, replayed logs, and ChatChain.
|
||||
- An overview of the ChatDev framework.
|
||||
- A comprehensive introduction to all advanced parameters in ChatChain configuration.
|
||||
- Guides for customizing ChatDev, including:
|
||||
|
@ -17,7 +17,6 @@ from .task_agent import TaskPlannerAgent, TaskSpecifyAgent
|
||||
from .critic_agent import CriticAgent
|
||||
from .tool_agents.base import BaseToolAgent
|
||||
from .tool_agents.hugging_face_tool_agent import HuggingFaceToolAgent
|
||||
from .embodied_agent import EmbodiedAgent
|
||||
from .role_playing import RolePlaying
|
||||
|
||||
__all__ = [
|
||||
@ -28,6 +27,5 @@ __all__ = [
|
||||
'CriticAgent',
|
||||
'BaseToolAgent',
|
||||
'HuggingFaceToolAgent',
|
||||
'EmbodiedAgent',
|
||||
'RolePlaying',
|
||||
]
|
||||
|
@ -29,6 +29,13 @@ from camel.utils import (
|
||||
openai_api_key_required,
|
||||
)
|
||||
|
||||
try:
|
||||
from openai.types.chat import ChatCompletion
|
||||
|
||||
openai_new_api = True # new openai api version
|
||||
except ImportError:
|
||||
openai_new_api = False # old openai api version
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class ChatAgentResponse:
|
||||
@ -189,19 +196,34 @@ class ChatAgent(BaseAgent):
|
||||
|
||||
if num_tokens < self.model_token_limit:
|
||||
response = self.model_backend.run(messages=openai_messages)
|
||||
if not isinstance(response, dict):
|
||||
raise RuntimeError("OpenAI returned unexpected struct")
|
||||
output_messages = [
|
||||
ChatMessage(role_name=self.role_name, role_type=self.role_type,
|
||||
meta_dict=dict(), **dict(choice["message"]))
|
||||
for choice in response["choices"]
|
||||
]
|
||||
info = self.get_info(
|
||||
response["id"],
|
||||
response["usage"],
|
||||
[str(choice["finish_reason"]) for choice in response["choices"]],
|
||||
num_tokens,
|
||||
)
|
||||
if openai_new_api:
|
||||
if not isinstance(response, ChatCompletion):
|
||||
raise RuntimeError("OpenAI returned unexpected struct")
|
||||
output_messages = [
|
||||
ChatMessage(role_name=self.role_name, role_type=self.role_type,
|
||||
meta_dict=dict(), **dict(choice.message))
|
||||
for choice in response.choices
|
||||
]
|
||||
info = self.get_info(
|
||||
response.id,
|
||||
response.usage,
|
||||
[str(choice.finish_reason) for choice in response.choices],
|
||||
num_tokens,
|
||||
)
|
||||
else:
|
||||
if not isinstance(response, dict):
|
||||
raise RuntimeError("OpenAI returned unexpected struct")
|
||||
output_messages = [
|
||||
ChatMessage(role_name=self.role_name, role_type=self.role_type,
|
||||
meta_dict=dict(), **dict(choice["message"]))
|
||||
for choice in response["choices"]
|
||||
]
|
||||
info = self.get_info(
|
||||
response["id"],
|
||||
response["usage"],
|
||||
[str(choice["finish_reason"]) for choice in response["choices"]],
|
||||
num_tokens,
|
||||
)
|
||||
|
||||
# TODO strict <INFO> check, only in the beginning of the line
|
||||
# if "<INFO>" in output_messages[0].content:
|
||||
|
@ -1,132 +0,0 @@
|
||||
# =========== Copyright 2023 @ CAMEL-AI.org. All Rights Reserved. ===========
|
||||
# Licensed under the Apache License, Version 2.0 (the “License”);
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an “AS IS” BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
# =========== Copyright 2023 @ CAMEL-AI.org. All Rights Reserved. ===========
|
||||
from typing import Any, Dict, List, Optional, Tuple
|
||||
|
||||
from colorama import Fore
|
||||
|
||||
from camel.agents import BaseToolAgent, ChatAgent, HuggingFaceToolAgent
|
||||
from camel.messages import ChatMessage, SystemMessage
|
||||
from camel.typing import ModelType
|
||||
from camel.utils import print_text_animated
|
||||
|
||||
|
||||
class EmbodiedAgent(ChatAgent):
|
||||
r"""Class for managing conversations of CAMEL Embodied Agents.
|
||||
|
||||
Args:
|
||||
system_message (SystemMessage): The system message for the chat agent.
|
||||
model (ModelType, optional): The LLM model to use for generating
|
||||
responses. (default :obj:`ModelType.GPT_4`)
|
||||
model_config (Any, optional): Configuration options for the LLM model.
|
||||
(default: :obj:`None`)
|
||||
message_window_size (int, optional): The maximum number of previous
|
||||
messages to include in the context window. If `None`, no windowing
|
||||
is performed. (default: :obj:`None`)
|
||||
action_space (List[Any], optional): The action space for the embodied
|
||||
agent. (default: :obj:`None`)
|
||||
verbose (bool, optional): Whether to print the critic's messages.
|
||||
logger_color (Any): The color of the logger displayed to the user.
|
||||
(default: :obj:`Fore.MAGENTA`)
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
system_message: SystemMessage,
|
||||
model: ModelType = ModelType.GPT_4,
|
||||
model_config: Optional[Any] = None,
|
||||
message_window_size: Optional[int] = None,
|
||||
action_space: Optional[List[BaseToolAgent]] = None,
|
||||
verbose: bool = False,
|
||||
logger_color: Any = Fore.MAGENTA,
|
||||
) -> None:
|
||||
default_action_space = [
|
||||
HuggingFaceToolAgent('hugging_face_tool_agent', model=model.value),
|
||||
]
|
||||
self.action_space = action_space or default_action_space
|
||||
action_space_prompt = self.get_action_space_prompt()
|
||||
system_message.content = system_message.content.format(
|
||||
action_space=action_space_prompt)
|
||||
self.verbose = verbose
|
||||
self.logger_color = logger_color
|
||||
super().__init__(
|
||||
system_message=system_message,
|
||||
model=model,
|
||||
model_config=model_config,
|
||||
message_window_size=message_window_size,
|
||||
)
|
||||
|
||||
def get_action_space_prompt(self) -> str:
|
||||
r"""Returns the action space prompt.
|
||||
|
||||
Returns:
|
||||
str: The action space prompt.
|
||||
"""
|
||||
return "\n".join([
|
||||
f"*** {action.name} ***:\n {action.description}"
|
||||
for action in self.action_space
|
||||
])
|
||||
|
||||
def step(
|
||||
self,
|
||||
input_message: ChatMessage,
|
||||
) -> Tuple[ChatMessage, bool, Dict[str, Any]]:
|
||||
r"""Performs a step in the conversation.
|
||||
|
||||
Args:
|
||||
input_message (ChatMessage): The input message.
|
||||
|
||||
Returns:
|
||||
Tuple[ChatMessage, bool, Dict[str, Any]]: A tuple
|
||||
containing the output messages, termination status, and
|
||||
additional information.
|
||||
"""
|
||||
response = super().step(input_message)
|
||||
|
||||
if response.msgs is None or len(response.msgs) == 0:
|
||||
raise RuntimeError("Got None output messages.")
|
||||
if response.terminated:
|
||||
raise RuntimeError(f"{self.__class__.__name__} step failed.")
|
||||
|
||||
# NOTE: Only single output messages are supported
|
||||
explanations, codes = response.msg.extract_text_and_code_prompts()
|
||||
|
||||
if self.verbose:
|
||||
for explanation, code in zip(explanations, codes):
|
||||
print_text_animated(self.logger_color +
|
||||
f"> Explanation:\n{explanation}")
|
||||
print_text_animated(self.logger_color + f"> Code:\n{code}")
|
||||
|
||||
if len(explanations) > len(codes):
|
||||
print_text_animated(self.logger_color +
|
||||
f"> Explanation:\n{explanations}")
|
||||
|
||||
content = response.msg.content
|
||||
|
||||
if codes is not None:
|
||||
content = "\n> Executed Results:"
|
||||
global_vars = {action.name: action for action in self.action_space}
|
||||
for code in codes:
|
||||
executed_outputs = code.execute(global_vars)
|
||||
content += (
|
||||
f"- Python standard output:\n{executed_outputs[0]}\n"
|
||||
f"- Local variables:\n{executed_outputs[1]}\n")
|
||||
content += "*" * 50 + "\n"
|
||||
|
||||
# TODO: Handle errors
|
||||
content = input_message.content + (Fore.RESET +
|
||||
f"\n> Embodied Actions:\n{content}")
|
||||
message = ChatMessage(input_message.role_name, input_message.role_type,
|
||||
input_message.meta_dict, input_message.role,
|
||||
content)
|
||||
return message, response.terminated, response.info
|
@ -23,7 +23,7 @@ from camel.agents.chat_agent import ChatAgentResponse
|
||||
from camel.messages import ChatMessage, UserChatMessage
|
||||
from camel.messages import SystemMessage
|
||||
from camel.typing import ModelType, RoleType, TaskType, PhaseType
|
||||
from chatdev.utils import log_arguments, log_and_print_online
|
||||
from chatdev.utils import log_arguments, log_visualize
|
||||
|
||||
|
||||
@log_arguments
|
||||
@ -90,6 +90,7 @@ class RolePlaying:
|
||||
sys_msg_generator_kwargs: Optional[Dict] = None,
|
||||
extend_sys_msg_meta_dicts: Optional[List[Dict]] = None,
|
||||
extend_task_specify_meta_dict: Optional[Dict] = None,
|
||||
background_prompt: Optional[str] = ""
|
||||
) -> None:
|
||||
self.with_task_specify = with_task_specify
|
||||
self.with_task_planner = with_task_planner
|
||||
@ -131,9 +132,7 @@ class RolePlaying:
|
||||
|
||||
self.task_prompt = task_prompt
|
||||
|
||||
chatdev_prompt_template = "ChatDev is a software company powered by multiple intelligent agents, such as chief executive officer, chief human resources officer, chief product officer, chief technology officer, etc, with a multi-agent organizational structure and the mission of \"changing the digital world through programming\"."
|
||||
|
||||
sys_msg_meta_dicts = [dict(chatdev_prompt=chatdev_prompt_template, task=task_prompt)] * 2
|
||||
sys_msg_meta_dicts = [dict(chatdev_prompt=background_prompt, task=task_prompt)] * 2
|
||||
if (extend_sys_msg_meta_dicts is None and self.task_type in [TaskType.AI_SOCIETY, TaskType.MISALIGNMENT,
|
||||
TaskType.CHATDEV]):
|
||||
extend_sys_msg_meta_dicts = [dict(assistant_role=assistant_role_name, user_role=user_role_name)] * 2
|
||||
@ -199,8 +198,8 @@ class RolePlaying:
|
||||
self.user_agent.update_messages(pseudo_msg)
|
||||
|
||||
# here we concatenate to store the real message in the log
|
||||
log_and_print_online(self.user_agent.role_name,
|
||||
"**[Start Chat]**\n\n[" + self.assistant_agent.system_message.content + "]\n\n" + content)
|
||||
log_visualize(self.user_agent.role_name,
|
||||
"**[Start Chat]**\n\n[" + self.assistant_agent.system_message.content + "]\n\n" + content)
|
||||
return None, user_msg
|
||||
|
||||
def process_messages(
|
||||
|
@ -24,6 +24,14 @@ from camel.messages import (
|
||||
from camel.prompts import CodePrompt, TextPrompt
|
||||
from camel.typing import ModelType, RoleType
|
||||
|
||||
try:
|
||||
from openai.types.chat.chat_completion_message_tool_call import ChatCompletionMessageToolCall
|
||||
from openai.types.chat.chat_completion_message import FunctionCall
|
||||
|
||||
openai_new_api = True # new openai api version
|
||||
except ImportError:
|
||||
openai_new_api = False # old openai api version
|
||||
|
||||
|
||||
@dataclass
|
||||
class BaseMessage:
|
||||
@ -44,6 +52,9 @@ class BaseMessage:
|
||||
meta_dict: Optional[Dict[str, str]]
|
||||
role: str
|
||||
content: str
|
||||
if openai_new_api:
|
||||
function_call: Optional[FunctionCall] = None
|
||||
tool_calls: Optional[ChatCompletionMessageToolCall] = None
|
||||
|
||||
def __getattribute__(self, name: str) -> Any:
|
||||
r"""Get attribute override to delegate string methods to the
|
||||
|
@ -17,6 +17,14 @@ from typing import Dict, Optional
|
||||
from camel.messages import BaseMessage
|
||||
from camel.typing import RoleType
|
||||
|
||||
try:
|
||||
from openai.types.chat.chat_completion_message_tool_call import ChatCompletionMessageToolCall
|
||||
from openai.types.chat.chat_completion_message import FunctionCall
|
||||
|
||||
openai_new_api = True # new openai api version
|
||||
except ImportError:
|
||||
openai_new_api = False # old openai api version
|
||||
|
||||
|
||||
@dataclass
|
||||
class ChatMessage(BaseMessage):
|
||||
@ -36,6 +44,9 @@ class ChatMessage(BaseMessage):
|
||||
meta_dict: Optional[Dict[str, str]]
|
||||
role: str
|
||||
content: str = ""
|
||||
if openai_new_api:
|
||||
function_call: Optional[FunctionCall] = None
|
||||
tool_calls: Optional[ChatCompletionMessageToolCall] = None
|
||||
|
||||
def set_user_role_at_backend(self: BaseMessage):
|
||||
return self.__class__(
|
||||
|
@ -19,7 +19,22 @@ import tiktoken
|
||||
|
||||
from camel.typing import ModelType
|
||||
from chatdev.statistics import prompt_cost
|
||||
from chatdev.utils import log_and_print_online
|
||||
from chatdev.utils import log_visualize
|
||||
|
||||
try:
|
||||
from openai.types.chat import ChatCompletion
|
||||
|
||||
openai_new_api = True # new openai api version
|
||||
except ImportError:
|
||||
openai_new_api = False # old openai api version
|
||||
|
||||
import os
|
||||
|
||||
OPENAI_API_KEY = os.environ['OPENAI_API_KEY']
|
||||
if 'BASE_URL' in os.environ:
|
||||
BASE_URL = os.environ['BASE_URL']
|
||||
else:
|
||||
BASE_URL = None
|
||||
|
||||
|
||||
class ModelBackend(ABC):
|
||||
@ -27,7 +42,7 @@ class ModelBackend(ABC):
|
||||
May be OpenAI API, a local LLM, a stub for unit tests, etc."""
|
||||
|
||||
@abstractmethod
|
||||
def run(self, *args, **kwargs) -> Dict[str, Any]:
|
||||
def run(self, *args, **kwargs):
|
||||
r"""Runs the query to the backend model.
|
||||
|
||||
Raises:
|
||||
@ -47,45 +62,87 @@ class OpenAIModel(ModelBackend):
|
||||
super().__init__()
|
||||
self.model_type = model_type
|
||||
self.model_config_dict = model_config_dict
|
||||
|
||||
def run(self, *args, **kwargs) -> Dict[str, Any]:
|
||||
|
||||
def run(self, *args, **kwargs):
|
||||
string = "\n".join([message["content"] for message in kwargs["messages"]])
|
||||
encoding = tiktoken.encoding_for_model(self.model_type.value)
|
||||
num_prompt_tokens = len(encoding.encode(string))
|
||||
gap_between_send_receive = 15 * len(kwargs["messages"])
|
||||
num_prompt_tokens += gap_between_send_receive
|
||||
|
||||
num_max_token_map = {
|
||||
"gpt-3.5-turbo": 4096,
|
||||
"gpt-3.5-turbo-16k": 16384,
|
||||
"gpt-3.5-turbo-0613": 4096,
|
||||
"gpt-3.5-turbo-16k-0613": 16384,
|
||||
"gpt-4": 8192,
|
||||
"gpt-4-0613": 8192,
|
||||
"gpt-4-32k": 32768,
|
||||
}
|
||||
num_max_token = num_max_token_map[self.model_type.value]
|
||||
num_max_completion_tokens = num_max_token - num_prompt_tokens
|
||||
self.model_config_dict['max_tokens'] = num_max_completion_tokens
|
||||
if openai_new_api:
|
||||
# Experimental, add base_url
|
||||
if BASE_URL:
|
||||
client = openai.OpenAI(
|
||||
api_key=OPENAI_API_KEY,
|
||||
base_url=BASE_URL,
|
||||
)
|
||||
else:
|
||||
client = openai.OpenAI(
|
||||
api_key=OPENAI_API_KEY
|
||||
)
|
||||
|
||||
try:
|
||||
response = openai.ChatCompletion.create(*args, **kwargs, model=self.model_type.value, **self.model_config_dict)
|
||||
except AttributeError:
|
||||
response = openai.chat.completions.create(*args, **kwargs, model=self.model_type.value, **self.model_config_dict)
|
||||
num_max_token_map = {
|
||||
"gpt-3.5-turbo": 4096,
|
||||
"gpt-3.5-turbo-16k": 16384,
|
||||
"gpt-3.5-turbo-0613": 4096,
|
||||
"gpt-3.5-turbo-16k-0613": 16384,
|
||||
"gpt-4": 8192,
|
||||
"gpt-4-0613": 8192,
|
||||
"gpt-4-32k": 32768,
|
||||
"gpt-4-1106-preview": 4096,
|
||||
"gpt-4-1106-vision-preview": 4096,
|
||||
}
|
||||
num_max_token = num_max_token_map[self.model_type.value]
|
||||
num_max_completion_tokens = num_max_token - num_prompt_tokens
|
||||
self.model_config_dict['max_tokens'] = num_max_completion_tokens
|
||||
|
||||
cost = prompt_cost(
|
||||
self.model_type.value,
|
||||
num_prompt_tokens=response["usage"]["prompt_tokens"],
|
||||
response = client.chat.completions.create(*args, **kwargs, model=self.model_type.value,
|
||||
**self.model_config_dict)
|
||||
|
||||
cost = prompt_cost(
|
||||
self.model_type.value,
|
||||
num_prompt_tokens=response.usage.prompt_tokens,
|
||||
num_completion_tokens=response.usage.completion_tokens
|
||||
)
|
||||
|
||||
log_visualize(
|
||||
"**[OpenAI_Usage_Info Receive]**\nprompt_tokens: {}\ncompletion_tokens: {}\ntotal_tokens: {}\ncost: ${:.6f}\n".format(
|
||||
response.usage.prompt_tokens, response.usage.completion_tokens,
|
||||
response.usage.total_tokens, cost))
|
||||
if not isinstance(response, ChatCompletion):
|
||||
raise RuntimeError("Unexpected return from OpenAI API")
|
||||
return response
|
||||
else:
|
||||
num_max_token_map = {
|
||||
"gpt-3.5-turbo": 4096,
|
||||
"gpt-3.5-turbo-16k": 16384,
|
||||
"gpt-3.5-turbo-0613": 4096,
|
||||
"gpt-3.5-turbo-16k-0613": 16384,
|
||||
"gpt-4": 8192,
|
||||
"gpt-4-0613": 8192,
|
||||
"gpt-4-32k": 32768,
|
||||
}
|
||||
num_max_token = num_max_token_map[self.model_type.value]
|
||||
num_max_completion_tokens = num_max_token - num_prompt_tokens
|
||||
self.model_config_dict['max_tokens'] = num_max_completion_tokens
|
||||
|
||||
response = openai.ChatCompletion.create(*args, **kwargs, model=self.model_type.value,
|
||||
**self.model_config_dict)
|
||||
|
||||
cost = prompt_cost(
|
||||
self.model_type.value,
|
||||
num_prompt_tokens=response["usage"]["prompt_tokens"],
|
||||
num_completion_tokens=response["usage"]["completion_tokens"]
|
||||
)
|
||||
)
|
||||
|
||||
log_and_print_online(
|
||||
"**[OpenAI_Usage_Info Receive]**\nprompt_tokens: {}\ncompletion_tokens: {}\ntotal_tokens: {}\ncost: ${:.6f}\n".format(
|
||||
response["usage"]["prompt_tokens"], response["usage"]["completion_tokens"],
|
||||
response["usage"]["total_tokens"], cost))
|
||||
if not isinstance(response, Dict):
|
||||
raise RuntimeError("Unexpected return from OpenAI API")
|
||||
return response
|
||||
log_visualize(
|
||||
"**[OpenAI_Usage_Info Receive]**\nprompt_tokens: {}\ncompletion_tokens: {}\ntotal_tokens: {}\ncost: ${:.6f}\n".format(
|
||||
response["usage"]["prompt_tokens"], response["usage"]["completion_tokens"],
|
||||
response["usage"]["total_tokens"], cost))
|
||||
if not isinstance(response, Dict):
|
||||
raise RuntimeError("Unexpected return from OpenAI API")
|
||||
return response
|
||||
|
||||
|
||||
class StubModel(ModelBackend):
|
||||
@ -119,7 +176,12 @@ class ModelFactory:
|
||||
default_model_type = ModelType.GPT_3_5_TURBO
|
||||
|
||||
if model_type in {
|
||||
ModelType.GPT_3_5_TURBO, ModelType.GPT_4, ModelType.GPT_4_32k,
|
||||
ModelType.GPT_3_5_TURBO,
|
||||
ModelType.GPT_3_5_TURBO_NEW,
|
||||
ModelType.GPT_4,
|
||||
ModelType.GPT_4_32k,
|
||||
ModelType.GPT_4_TURBO,
|
||||
ModelType.GPT_4_TURBO_V,
|
||||
None
|
||||
}:
|
||||
model_class = OpenAIModel
|
||||
@ -131,6 +193,6 @@ class ModelFactory:
|
||||
if model_type is None:
|
||||
model_type = default_model_type
|
||||
|
||||
# log_and_print_online("Model Type: {}".format(model_type))
|
||||
# log_visualize("Model Type: {}".format(model_type))
|
||||
inst = model_class(model_type, model_config_dict)
|
||||
return inst
|
||||
|
@ -45,8 +45,12 @@ class RoleType(Enum):
|
||||
|
||||
class ModelType(Enum):
|
||||
GPT_3_5_TURBO = "gpt-3.5-turbo-16k-0613"
|
||||
GPT_3_5_TURBO_NEW = "gpt-3.5-turbo-16k"
|
||||
GPT_4 = "gpt-4"
|
||||
GPT_4_32k = "gpt-4-32k"
|
||||
GPT_4_TURBO = "gpt-4-1106-preview"
|
||||
GPT_4_TURBO_V = "gpt-4-1106-vision-preview"
|
||||
|
||||
STUB = "stub"
|
||||
|
||||
@property
|
||||
|
@ -83,7 +83,12 @@ def num_tokens_from_messages(
|
||||
encoding = tiktoken.get_encoding("cl100k_base")
|
||||
|
||||
if model in {
|
||||
ModelType.GPT_3_5_TURBO, ModelType.GPT_4, ModelType.GPT_4_32k,
|
||||
ModelType.GPT_3_5_TURBO,
|
||||
ModelType.GPT_3_5_TURBO_NEW,
|
||||
ModelType.GPT_4,
|
||||
ModelType.GPT_4_32k,
|
||||
ModelType.GPT_4_TURBO,
|
||||
ModelType.GPT_4_TURBO_V,
|
||||
ModelType.STUB
|
||||
}:
|
||||
return count_tokens_openai_chat_models(messages, encoding)
|
||||
@ -109,10 +114,14 @@ def get_model_token_limit(model: ModelType) -> int:
|
||||
"""
|
||||
if model == ModelType.GPT_3_5_TURBO:
|
||||
return 16384
|
||||
elif model == ModelType.GPT_3_5_TURBO_NEW:
|
||||
return 16384
|
||||
elif model == ModelType.GPT_4:
|
||||
return 8192
|
||||
elif model == ModelType.GPT_4_32k:
|
||||
return 32768
|
||||
elif model == ModelType.GPT_4_TURBO:
|
||||
return 128000
|
||||
elif model == ModelType.STUB:
|
||||
return 4096
|
||||
else:
|
||||
|
@ -11,7 +11,7 @@ from camel.configs import ChatGPTConfig
|
||||
from camel.typing import TaskType, ModelType
|
||||
from chatdev.chat_env import ChatEnv, ChatEnvConfig
|
||||
from chatdev.statistics import get_info
|
||||
from chatdev.utils import log_and_print_online, now
|
||||
from chatdev.utils import log_visualize, now
|
||||
|
||||
|
||||
def check_bool(s):
|
||||
@ -67,7 +67,8 @@ class ChatChain:
|
||||
self.chat_env_config = ChatEnvConfig(clear_structure=check_bool(self.config["clear_structure"]),
|
||||
gui_design=check_bool(self.config["gui_design"]),
|
||||
git_management=check_bool(self.config["git_management"]),
|
||||
incremental_develop=check_bool(self.config["incremental_develop"]))
|
||||
incremental_develop=check_bool(self.config["incremental_develop"]),
|
||||
background_prompt=self.config["background_prompt"])
|
||||
self.chat_env = ChatEnv(self.chat_env_config)
|
||||
|
||||
# the user input prompt will be self-improved (if set "self_improve": "True" in ChatChainConfig.json)
|
||||
@ -186,10 +187,11 @@ class ChatChain:
|
||||
Returns: None
|
||||
|
||||
"""
|
||||
filepath = os.path.dirname(__file__)
|
||||
root = os.path.dirname(filepath)
|
||||
directory = os.path.join(root, "WareHouse")
|
||||
|
||||
if self.chat_env.config.clear_structure:
|
||||
filepath = os.path.dirname(__file__)
|
||||
root = os.path.dirname(filepath)
|
||||
directory = os.path.join(root, "WareHouse")
|
||||
for filename in os.listdir(directory):
|
||||
file_path = os.path.join(directory, filename)
|
||||
# logs with error trials are left in WareHouse/
|
||||
@ -234,7 +236,7 @@ class ChatChain:
|
||||
preprocess_msg += "**Log File**: {}\n\n".format(self.log_filepath)
|
||||
preprocess_msg += "**ChatDevConfig**:\n{}\n\n".format(self.chat_env.config.__str__())
|
||||
preprocess_msg += "**ChatGPTConfig**:\n{}\n\n".format(chat_gpt_config)
|
||||
log_and_print_online(preprocess_msg)
|
||||
log_visualize(preprocess_msg)
|
||||
|
||||
# init task prompt
|
||||
if check_bool(self.config['self_improve']):
|
||||
@ -254,14 +256,16 @@ class ChatChain:
|
||||
root = os.path.dirname(filepath)
|
||||
|
||||
if self.chat_env_config.git_management:
|
||||
git_online_log = "**[Git Information]**\n\n"
|
||||
log_git_info = "**[Git Information]**\n\n"
|
||||
|
||||
self.chat_env.codes.version += 1
|
||||
os.system("cd {}; git add .".format(self.chat_env.env_dict["directory"]))
|
||||
git_online_log += "cd {}; git add .\n".format(self.chat_env.env_dict["directory"])
|
||||
os.system("cd {}; git commit -m \"v{} Final Version\"".format(self.chat_env.env_dict["directory"], self.chat_env.codes.version))
|
||||
git_online_log += "cd {}; git commit -m \"v{} Final Version\"\n".format(self.chat_env.env_dict["directory"], self.chat_env.codes.version)
|
||||
log_and_print_online(git_online_log)
|
||||
log_git_info += "cd {}; git add .\n".format(self.chat_env.env_dict["directory"])
|
||||
os.system("cd {}; git commit -m \"v{} Final Version\"".format(self.chat_env.env_dict["directory"],
|
||||
self.chat_env.codes.version))
|
||||
log_git_info += "cd {}; git commit -m \"v{} Final Version\"\n".format(self.chat_env.env_dict["directory"],
|
||||
self.chat_env.codes.version)
|
||||
log_visualize(log_git_info)
|
||||
|
||||
git_info = "**[Git Log]**\n\n"
|
||||
import subprocess
|
||||
@ -276,7 +280,7 @@ class ChatChain:
|
||||
log_output = "Error when executing " + command
|
||||
|
||||
git_info += log_output
|
||||
log_and_print_online(git_info)
|
||||
log_visualize(git_info)
|
||||
|
||||
post_info = "**[Post Info]**\n\n"
|
||||
now_time = now()
|
||||
@ -292,15 +296,15 @@ class ChatChain:
|
||||
post_info += "ChatDev Starts ({})".format(self.start_time) + "\n\n"
|
||||
post_info += "ChatDev Ends ({})".format(now_time) + "\n\n"
|
||||
|
||||
directory = self.chat_env.env_dict['directory']
|
||||
if self.chat_env.config.clear_structure:
|
||||
directory = self.chat_env.env_dict['directory']
|
||||
for filename in os.listdir(directory):
|
||||
file_path = os.path.join(directory, filename)
|
||||
if os.path.isdir(file_path) and file_path.endswith("__pycache__"):
|
||||
shutil.rmtree(file_path, ignore_errors=True)
|
||||
post_info += "{} Removed.".format(file_path) + "\n\n"
|
||||
|
||||
log_and_print_online(post_info)
|
||||
log_visualize(post_info)
|
||||
|
||||
logging.shutdown()
|
||||
time.sleep(1)
|
||||
@ -339,14 +343,14 @@ then you should return a message in a format like \"<INFO> revised_version_of_th
|
||||
model_type=self.model_type,
|
||||
)
|
||||
|
||||
# log_and_print_online("System", role_play_session.assistant_sys_msg)
|
||||
# log_and_print_online("System", role_play_session.user_sys_msg)
|
||||
# log_visualize("System", role_play_session.assistant_sys_msg)
|
||||
# log_visualize("System", role_play_session.user_sys_msg)
|
||||
|
||||
_, input_user_msg = role_play_session.init_chat(None, None, self_task_improve_prompt)
|
||||
assistant_response, user_response = role_play_session.step(input_user_msg, True)
|
||||
revised_task_prompt = assistant_response.msg.content.split("<INFO>")[-1].lower().strip()
|
||||
log_and_print_online(role_play_session.assistant_agent.role_name, assistant_response.msg.content)
|
||||
log_and_print_online(
|
||||
log_visualize(role_play_session.assistant_agent.role_name, assistant_response.msg.content)
|
||||
log_visualize(
|
||||
"**[Task Prompt Self Improvement]**\n**Original Task Prompt**: {}\n**Improved Task Prompt**: {}".format(
|
||||
task_prompt, revised_task_prompt))
|
||||
return revised_task_prompt
|
||||
|
@ -12,18 +12,28 @@ import requests
|
||||
from chatdev.codes import Codes
|
||||
from chatdev.documents import Documents
|
||||
from chatdev.roster import Roster
|
||||
from chatdev.utils import log_and_print_online
|
||||
from chatdev.utils import log_visualize
|
||||
|
||||
try:
|
||||
from openai.types.chat.chat_completion_message_tool_call import ChatCompletionMessageToolCall
|
||||
from openai.types.chat.chat_completion_message import FunctionCall
|
||||
|
||||
openai_new_api = True # new openai api version
|
||||
except ImportError:
|
||||
openai_new_api = False # old openai api version
|
||||
|
||||
|
||||
class ChatEnvConfig:
|
||||
def __init__(self, clear_structure,
|
||||
gui_design,
|
||||
git_management,
|
||||
incremental_develop):
|
||||
self.clear_structure = clear_structure
|
||||
self.gui_design = gui_design
|
||||
self.git_management = git_management
|
||||
self.incremental_develop = incremental_develop
|
||||
incremental_develop,
|
||||
background_prompt):
|
||||
self.clear_structure = clear_structure # Whether to clear non-software files in the WareHouse and cache files in generated software path
|
||||
self.gui_design = gui_design # Encourage ChatDev generate software with GUI
|
||||
self.git_management = git_management # Whether to use git to manage the creation and changes of generated software
|
||||
self.incremental_develop = incremental_develop # Whether to use incremental develop on an existing project
|
||||
self.background_prompt = background_prompt # background prompt that will be added to every inquiry to LLM
|
||||
|
||||
def __str__(self):
|
||||
string = ""
|
||||
@ -31,6 +41,7 @@ class ChatEnvConfig:
|
||||
string += "ChatEnvConfig.git_management: {}\n".format(self.git_management)
|
||||
string += "ChatEnvConfig.gui_design: {}\n".format(self.gui_design)
|
||||
string += "ChatEnvConfig.incremental_develop: {}\n".format(self.incremental_develop)
|
||||
string += "ChatEnvConfig.background_prompt: {}\n".format(self.background_prompt)
|
||||
return string
|
||||
|
||||
|
||||
@ -60,7 +71,7 @@ class ChatEnv:
|
||||
for match in re.finditer(r"No module named '(\S+)'", test_reports, re.DOTALL):
|
||||
module = match.group(1)
|
||||
subprocess.Popen("pip install {}".format(module), shell=True).wait()
|
||||
log_and_print_online("**[CMD Execute]**\n\n[CMD] pip install {}".format(module))
|
||||
log_visualize("**[CMD Execute]**\n\n[CMD] pip install {}".format(module))
|
||||
|
||||
def set_directory(self, directory):
|
||||
assert len(self.env_dict['directory']) == 0
|
||||
@ -73,13 +84,12 @@ class ChatEnv:
|
||||
new_directory = "{}.{}".format(directory, time.strftime("%Y%m%d%H%M%S", time.localtime()))
|
||||
shutil.copytree(directory, new_directory)
|
||||
print("{} Copied to {}".format(directory, new_directory))
|
||||
if self.config.clear_structure:
|
||||
if os.path.exists(self.env_dict['directory']):
|
||||
shutil.rmtree(self.env_dict['directory'])
|
||||
os.mkdir(self.env_dict['directory'])
|
||||
print("{} Created".format(directory))
|
||||
else:
|
||||
os.mkdir(self.env_dict['directory'])
|
||||
if os.path.exists(self.env_dict['directory']):
|
||||
shutil.rmtree(self.env_dict['directory'])
|
||||
os.mkdir(self.env_dict['directory'])
|
||||
print("{} Created".format(directory))
|
||||
else:
|
||||
os.mkdir(self.env_dict['directory'])
|
||||
|
||||
def exist_bugs(self) -> tuple[bool, str]:
|
||||
directory = self.env_dict['directory']
|
||||
@ -216,12 +226,20 @@ class ChatEnv:
|
||||
if desc.endswith(".png"):
|
||||
desc = desc.replace(".png", "")
|
||||
print("{}: {}".format(filename, desc))
|
||||
response = openai.Image.create(
|
||||
prompt=desc,
|
||||
n=1,
|
||||
size="256x256"
|
||||
)
|
||||
image_url = response['data'][0]['url']
|
||||
if openai_new_api:
|
||||
response = openai.images.generate(
|
||||
prompt=desc,
|
||||
n=1,
|
||||
size="256x256"
|
||||
)
|
||||
image_url = response.data[0].url
|
||||
else:
|
||||
response = openai.Image.create(
|
||||
prompt=desc,
|
||||
n=1,
|
||||
size="256x256"
|
||||
)
|
||||
image_url = response['data'][0]['url']
|
||||
download(image_url, filename)
|
||||
|
||||
def get_proposed_images_from_message(self, messages):
|
||||
@ -258,12 +276,22 @@ class ChatEnv:
|
||||
if desc.endswith(".png"):
|
||||
desc = desc.replace(".png", "")
|
||||
print("{}: {}".format(filename, desc))
|
||||
response = openai.Image.create(
|
||||
prompt=desc,
|
||||
n=1,
|
||||
size="256x256"
|
||||
)
|
||||
image_url = response['data'][0]['url']
|
||||
|
||||
if openai_new_api:
|
||||
response = openai.images.generate(
|
||||
prompt=desc,
|
||||
n=1,
|
||||
size="256x256"
|
||||
)
|
||||
image_url = response.data[0].url
|
||||
else:
|
||||
response = openai.Image.create(
|
||||
prompt=desc,
|
||||
n=1,
|
||||
size="256x256"
|
||||
)
|
||||
image_url = response['data'][0]['url']
|
||||
|
||||
download(image_url, filename)
|
||||
|
||||
return images
|
||||
|
@ -3,7 +3,7 @@ import os
|
||||
import re
|
||||
import subprocess
|
||||
|
||||
from chatdev.utils import log_and_print_online
|
||||
from chatdev.utils import log_visualize
|
||||
|
||||
|
||||
class Codes:
|
||||
@ -70,7 +70,7 @@ class Codes:
|
||||
|
||||
'''\n""" + unified_diff + "\n```"
|
||||
|
||||
log_and_print_online(update_codes_content)
|
||||
log_visualize(update_codes_content)
|
||||
self.codebooks[key] = new_codes.codebooks[key]
|
||||
|
||||
def _rewrite_codes(self, git_management, phase_info=None) -> None:
|
||||
@ -91,12 +91,12 @@ class Codes:
|
||||
if git_management:
|
||||
if not phase_info:
|
||||
phase_info = ""
|
||||
git_online_log = "**[Git Information]**\n\n"
|
||||
log_git_info = "**[Git Information]**\n\n"
|
||||
if self.version == 1.0:
|
||||
os.system("cd {}; git init".format(self.directory))
|
||||
git_online_log += "cd {}; git init\n".format(self.directory)
|
||||
log_git_info += "cd {}; git init\n".format(self.directory)
|
||||
os.system("cd {}; git add .".format(self.directory))
|
||||
git_online_log += "cd {}; git add .\n".format(self.directory)
|
||||
log_git_info += "cd {}; git add .\n".format(self.directory)
|
||||
|
||||
# check if there exist diff
|
||||
completed_process = subprocess.run("cd {}; git status".format(self.directory), shell=True, text=True,
|
||||
@ -106,18 +106,18 @@ class Codes:
|
||||
return
|
||||
|
||||
os.system("cd {}; git commit -m \"v{}\"".format(self.directory, str(self.version) + " " + phase_info))
|
||||
git_online_log += "cd {}; git commit -m \"v{}\"\n".format(self.directory,
|
||||
log_git_info += "cd {}; git commit -m \"v{}\"\n".format(self.directory,
|
||||
str(self.version) + " " + phase_info)
|
||||
if self.version == 1.0:
|
||||
os.system("cd {}; git submodule add ./{} {}".format(os.path.dirname(os.path.dirname(self.directory)),
|
||||
"WareHouse/" + os.path.basename(self.directory),
|
||||
"WareHouse/" + os.path.basename(self.directory)))
|
||||
git_online_log += "cd {}; git submodule add ./{} {}\n".format(
|
||||
log_git_info += "cd {}; git submodule add ./{} {}\n".format(
|
||||
os.path.dirname(os.path.dirname(self.directory)),
|
||||
"WareHouse/" + os.path.basename(self.directory),
|
||||
"WareHouse/" + os.path.basename(self.directory))
|
||||
log_and_print_online(rewrite_codes_content)
|
||||
log_and_print_online(git_online_log)
|
||||
log_visualize(rewrite_codes_content)
|
||||
log_visualize(log_git_info)
|
||||
|
||||
def _get_codes(self) -> str:
|
||||
content = ""
|
||||
@ -134,4 +134,4 @@ class Codes:
|
||||
if filename.endswith(".py"):
|
||||
code = open(os.path.join(directory, filename), "r", encoding="utf-8").read()
|
||||
self.codebooks[filename] = self._format_code(code)
|
||||
log_and_print_online("{} files read from {}".format(len(self.codebooks.keys()), directory))
|
||||
log_visualize("{} files read from {}".format(len(self.codebooks.keys()), directory))
|
||||
|
@ -5,7 +5,7 @@ from collections import defaultdict
|
||||
|
||||
from camel.typing import ModelType
|
||||
from chatdev.chat_env import ChatEnv
|
||||
from chatdev.utils import log_and_print_online
|
||||
from chatdev.utils import log_visualize
|
||||
|
||||
|
||||
def check_bool(s):
|
||||
@ -142,7 +142,7 @@ class ComposedPhase(ABC):
|
||||
max_turn_step = phase_item['max_turn_step']
|
||||
need_reflect = check_bool(phase_item['need_reflect'])
|
||||
self.phase_env["cycle_index"] = cycle_index
|
||||
log_and_print_online(
|
||||
log_visualize(
|
||||
f"**[Execute Detail]**\n\nexecute SimplePhase:[{phase}] in ComposedPhase:[{self.phase_name}], cycle {cycle_index}")
|
||||
if phase in self.phases:
|
||||
self.phases[phase].phase_env = self.phase_env
|
||||
@ -246,7 +246,7 @@ class Test(ComposedPhase):
|
||||
|
||||
def break_cycle(self, phase_env) -> bool:
|
||||
if not phase_env['exist_bugs_flag']:
|
||||
log_and_print_online(f"**[Test Info]**\n\nAI User (Software Test Engineer):\nTest Pass!\n")
|
||||
log_visualize(f"**[Test Info]**\n\nAI User (Software Test Engineer):\nTest Pass!\n")
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
@ -7,7 +7,7 @@ from camel.messages import ChatMessage
|
||||
from camel.typing import TaskType, ModelType
|
||||
from chatdev.chat_env import ChatEnv
|
||||
from chatdev.statistics import get_info
|
||||
from chatdev.utils import log_and_print_online, log_arguments
|
||||
from chatdev.utils import log_visualize, log_arguments
|
||||
|
||||
|
||||
class Phase(ABC):
|
||||
@ -65,7 +65,7 @@ class Phase(ABC):
|
||||
"""
|
||||
|
||||
Args:
|
||||
chat_env: global chatchain environment TODO: only for employee detection, can be deleted
|
||||
chat_env: global chatchain environment
|
||||
task_prompt: user query prompt for building the software
|
||||
assistant_role_name: who receives the chat
|
||||
user_role_name: who starts the chat
|
||||
@ -103,10 +103,11 @@ class Phase(ABC):
|
||||
task_type=task_type,
|
||||
with_task_specify=with_task_specify,
|
||||
model_type=model_type,
|
||||
background_prompt=chat_env.config.background_prompt
|
||||
)
|
||||
|
||||
# log_and_print_online("System", role_play_session.assistant_sys_msg)
|
||||
# log_and_print_online("System", role_play_session.user_sys_msg)
|
||||
# log_visualize("System", role_play_session.assistant_sys_msg)
|
||||
# log_visualize("System", role_play_session.user_sys_msg)
|
||||
|
||||
# start the chat
|
||||
_, input_user_msg = role_play_session.init_chat(None, placeholders, phase_prompt)
|
||||
@ -135,8 +136,8 @@ class Phase(ABC):
|
||||
# TODO: max_tokens_exceeded errors here
|
||||
if isinstance(assistant_response.msg, ChatMessage):
|
||||
# we log the second interaction here
|
||||
log_and_print_online(role_play_session.assistant_agent.role_name,
|
||||
conversation_meta + "[" + role_play_session.user_agent.system_message.content + "]\n\n" + assistant_response.msg.content)
|
||||
log_visualize(role_play_session.assistant_agent.role_name,
|
||||
conversation_meta + "[" + role_play_session.user_agent.system_message.content + "]\n\n" + assistant_response.msg.content)
|
||||
if role_play_session.assistant_agent.info:
|
||||
seminar_conclusion = assistant_response.msg.content
|
||||
break
|
||||
@ -145,8 +146,8 @@ class Phase(ABC):
|
||||
|
||||
if isinstance(user_response.msg, ChatMessage):
|
||||
# here is the result of the second interaction, which may be used to start the next chat turn
|
||||
log_and_print_online(role_play_session.user_agent.role_name,
|
||||
conversation_meta + "[" + role_play_session.assistant_agent.system_message.content + "]\n\n" + user_response.msg.content)
|
||||
log_visualize(role_play_session.user_agent.role_name,
|
||||
conversation_meta + "[" + role_play_session.assistant_agent.system_message.content + "]\n\n" + user_response.msg.content)
|
||||
if role_play_session.user_agent.info:
|
||||
seminar_conclusion = user_response.msg.content
|
||||
break
|
||||
@ -175,7 +176,7 @@ class Phase(ABC):
|
||||
else:
|
||||
seminar_conclusion = assistant_response.msg.content
|
||||
|
||||
log_and_print_online("**[Seminar Conclusion]**:\n\n {}".format(seminar_conclusion))
|
||||
log_visualize("**[Seminar Conclusion]**:\n\n {}".format(seminar_conclusion))
|
||||
seminar_conclusion = seminar_conclusion.split("<INFO>")[-1]
|
||||
return seminar_conclusion
|
||||
|
||||
@ -354,7 +355,7 @@ class Coding(Phase):
|
||||
if len(chat_env.codes.codebooks.keys()) == 0:
|
||||
raise ValueError("No Valid Codes.")
|
||||
chat_env.rewrite_codes("Finish Coding")
|
||||
log_and_print_online(
|
||||
log_visualize(
|
||||
"**[Software Info]**:\n\n {}".format(get_info(chat_env.env_dict['directory'], self.log_filepath)))
|
||||
return chat_env
|
||||
|
||||
@ -370,7 +371,7 @@ class ArtDesign(Phase):
|
||||
|
||||
def update_chat_env(self, chat_env) -> ChatEnv:
|
||||
chat_env.proposed_images = chat_env.get_proposed_images_from_message(self.seminar_conclusion)
|
||||
log_and_print_online(
|
||||
log_visualize(
|
||||
"**[Software Info]**:\n\n {}".format(get_info(chat_env.env_dict['directory'], self.log_filepath)))
|
||||
return chat_env
|
||||
|
||||
@ -391,7 +392,7 @@ class ArtIntegration(Phase):
|
||||
chat_env.update_codes(self.seminar_conclusion)
|
||||
chat_env.rewrite_codes("Finish Art Integration")
|
||||
# chat_env.generate_images_from_codes()
|
||||
log_and_print_online(
|
||||
log_visualize(
|
||||
"**[Software Info]**:\n\n {}".format(get_info(chat_env.env_dict['directory'], self.log_filepath)))
|
||||
return chat_env
|
||||
|
||||
@ -422,7 +423,7 @@ class CodeComplete(Phase):
|
||||
if len(chat_env.codes.codebooks.keys()) == 0:
|
||||
raise ValueError("No Valid Codes.")
|
||||
chat_env.rewrite_codes("Code Complete #" + str(self.phase_env["cycle_index"]) + " Finished")
|
||||
log_and_print_online(
|
||||
log_visualize(
|
||||
"**[Software Info]**:\n\n {}".format(get_info(chat_env.env_dict['directory'], self.log_filepath)))
|
||||
return chat_env
|
||||
|
||||
@ -461,7 +462,7 @@ class CodeReviewModification(Phase):
|
||||
if "```".lower() in self.seminar_conclusion.lower():
|
||||
chat_env.update_codes(self.seminar_conclusion)
|
||||
chat_env.rewrite_codes("Review #" + str(self.phase_env["cycle_index"]) + " Finished")
|
||||
log_and_print_online(
|
||||
log_visualize(
|
||||
"**[Software Info]**:\n\n {}".format(get_info(chat_env.env_dict['directory'], self.log_filepath)))
|
||||
self.phase_env['modification_conclusion'] = self.seminar_conclusion
|
||||
return chat_env
|
||||
@ -482,13 +483,13 @@ class CodeReviewHuman(Phase):
|
||||
if "```".lower() in self.seminar_conclusion.lower():
|
||||
chat_env.update_codes(self.seminar_conclusion)
|
||||
chat_env.rewrite_codes("Human Review #" + str(self.phase_env["cycle_index"]) + " Finished")
|
||||
log_and_print_online(
|
||||
log_visualize(
|
||||
"**[Software Info]**:\n\n {}".format(get_info(chat_env.env_dict['directory'], self.log_filepath)))
|
||||
return chat_env
|
||||
|
||||
def execute(self, chat_env, chat_turn_limit, need_reflect) -> ChatEnv:
|
||||
self.update_phase_env(chat_env)
|
||||
log_and_print_online(
|
||||
log_visualize(
|
||||
f"**[Human-Agent-Interaction]**\n\n"
|
||||
f"Now you can participate in the development of the software!\n"
|
||||
f"The task is: {chat_env.env_dict['task_prompt']}\n"
|
||||
@ -507,7 +508,7 @@ class CodeReviewHuman(Phase):
|
||||
break
|
||||
provided_comments.append(user_input)
|
||||
self.phase_env["comments"] = '\n'.join(provided_comments)
|
||||
log_and_print_online(
|
||||
log_visualize(
|
||||
f"**[User Provided Comments]**\n\n In the #{self.phase_env['cycle_index']} of total {self.phase_env['cycle_num']} comments: \n\n" +
|
||||
self.phase_env["comments"])
|
||||
if self.phase_env["comments"].strip().lower() == "exit":
|
||||
@ -544,7 +545,7 @@ class TestErrorSummary(Phase):
|
||||
"codes": chat_env.get_codes(),
|
||||
"test_reports": test_reports,
|
||||
"exist_bugs_flag": exist_bugs_flag})
|
||||
log_and_print_online("**[Test Reports]**:\n\n{}".format(test_reports))
|
||||
log_visualize("**[Test Reports]**:\n\n{}".format(test_reports))
|
||||
|
||||
def update_chat_env(self, chat_env) -> ChatEnv:
|
||||
chat_env.env_dict['error_summary'] = self.seminar_conclusion
|
||||
@ -556,13 +557,13 @@ class TestErrorSummary(Phase):
|
||||
self.update_phase_env(chat_env)
|
||||
if "ModuleNotFoundError" in self.phase_env['test_reports']:
|
||||
chat_env.fix_module_not_found_error(self.phase_env['test_reports'])
|
||||
log_and_print_online(
|
||||
log_visualize(
|
||||
f"Software Test Engineer found ModuleNotFoundError:\n{self.phase_env['test_reports']}\n")
|
||||
pip_install_content = ""
|
||||
for match in re.finditer(r"No module named '(\S+)'", self.phase_env['test_reports'], re.DOTALL):
|
||||
module = match.group(1)
|
||||
pip_install_content += "{}\n```{}\n{}\n```\n".format("cmd", "bash", f"pip install {module}")
|
||||
log_and_print_online(f"Programmer resolve ModuleNotFoundError by:\n{pip_install_content}\n")
|
||||
log_visualize(f"Programmer resolve ModuleNotFoundError by:\n{pip_install_content}\n")
|
||||
self.seminar_conclusion = "nothing need to do"
|
||||
else:
|
||||
self.seminar_conclusion = \
|
||||
@ -599,7 +600,7 @@ class TestModification(Phase):
|
||||
if "```".lower() in self.seminar_conclusion.lower():
|
||||
chat_env.update_codes(self.seminar_conclusion)
|
||||
chat_env.rewrite_codes("Test #" + str(self.phase_env["cycle_index"]) + " Finished")
|
||||
log_and_print_online(
|
||||
log_visualize(
|
||||
"**[Software Info]**:\n\n {}".format(get_info(chat_env.env_dict['directory'], self.log_filepath)))
|
||||
return chat_env
|
||||
|
||||
@ -618,7 +619,7 @@ class EnvironmentDoc(Phase):
|
||||
def update_chat_env(self, chat_env) -> ChatEnv:
|
||||
chat_env._update_requirements(self.seminar_conclusion)
|
||||
chat_env.rewrite_requirements()
|
||||
log_and_print_online(
|
||||
log_visualize(
|
||||
"**[Software Info]**:\n\n {}".format(get_info(chat_env.env_dict['directory'], self.log_filepath)))
|
||||
return chat_env
|
||||
|
||||
|
@ -12,6 +12,8 @@ def prompt_cost(model_type: str, num_prompt_tokens: float, num_completion_tokens
|
||||
"gpt-4": 0.03,
|
||||
"gpt-4-0613": 0.03,
|
||||
"gpt-4-32k": 0.06,
|
||||
"gpt-4-1106-preview": 0.01,
|
||||
"gpt-4-1106-vision-preview": 0.01,
|
||||
}
|
||||
|
||||
output_cost_map = {
|
||||
@ -22,6 +24,8 @@ def prompt_cost(model_type: str, num_prompt_tokens: float, num_completion_tokens
|
||||
"gpt-4": 0.06,
|
||||
"gpt-4-0613": 0.06,
|
||||
"gpt-4-32k": 0.12,
|
||||
"gpt-4-1106-preview": 0.03,
|
||||
"gpt-4-1106-vision-preview": 0.03,
|
||||
}
|
||||
|
||||
if model_type not in input_cost_map or model_type not in output_cost_map:
|
||||
@ -101,14 +105,16 @@ def get_info(dir, log_filepath):
|
||||
if len(sublines) > 0:
|
||||
model_type = sublines[0].split("| **model_type** | ModelType.")[-1].split(" | ")[0]
|
||||
model_type = model_type[:-2]
|
||||
if model_type == "GPT_3_5_TURBO":
|
||||
if model_type == "GPT_3_5_TURBO" or model_type == "GPT_3_5_TURBO_NEW":
|
||||
model_type = "gpt-3.5-turbo"
|
||||
elif model_type == "GPT_4":
|
||||
model_type = "gpt-4"
|
||||
elif model_type == "GPT_4_32k":
|
||||
model_type = "gpt-4-32k"
|
||||
elif model_type == "GPT_4_TURBO":
|
||||
model_type = "gpt-4-1106-preview"
|
||||
# print("model_type:", model_type)
|
||||
|
||||
|
||||
lines = open(log_filepath, "r", encoding="utf8").read().split("\n")
|
||||
start_lines = [line for line in lines if "**[Start Chat]**" in line]
|
||||
chat_lines = [line for line in lines if "<->" in line]
|
||||
|
@ -6,14 +6,24 @@ import time
|
||||
import markdown
|
||||
import inspect
|
||||
from camel.messages.system_messages import SystemMessage
|
||||
from online_log.app import send_msg
|
||||
from visualizer.app import send_msg
|
||||
|
||||
|
||||
def now():
|
||||
return time.strftime("%Y%m%d%H%M%S", time.localtime())
|
||||
|
||||
|
||||
def log_and_print_online(role, content=None):
|
||||
def log_visualize(role, content=None):
|
||||
"""
|
||||
send the role and content to visualizer server to show log on webpage in real-time
|
||||
You can leave the role undefined and just pass the content, i.e. log_visualize("messages"), where the role is "System".
|
||||
Args:
|
||||
role: the agent that sends message
|
||||
content: the content of message
|
||||
|
||||
Returns: None
|
||||
|
||||
"""
|
||||
if not content:
|
||||
logging.info(role + "\n")
|
||||
send_msg("System", role)
|
||||
@ -64,7 +74,7 @@ def log_arguments(func):
|
||||
value = escape_string(value)
|
||||
records_kv.append([name, value])
|
||||
records = f"**[{func.__name__}]**\n\n" + convert_to_markdown_table(records_kv)
|
||||
log_and_print_online("System", records)
|
||||
log_visualize("System", records)
|
||||
|
||||
return func(*args, **kwargs)
|
||||
|
||||
|
BIN
misc/demo.png
Before Width: | Height: | Size: 144 KiB After Width: | Height: | Size: 500 KiB |
@ -5,13 +5,13 @@
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
【📚 <a href="wiki.md">الويكي</a> | 🚀 <a href="wiki.md#local-demo">عرض محلي</a> | 👥 <a href="Contribution.md">برامج تم تطويرها من قبل المجتمع</a> | 🔧 <a href="wiki.md#customization">تخصيص</a>】
|
||||
【📚 <a href="wiki.md">الويكي</a> | 🚀 <a href="wiki.md#visualizer">عرض محلي</a> | 👥 <a href="Contribution.md">برامج تم تطويرها من قبل المجتمع</a> | 🔧 <a href="wiki.md#customization">تخصيص</a>】
|
||||
</p>
|
||||
|
||||
## 📖 نظرة عامة
|
||||
|
||||
- **ChatDev** هي **شركة برمجيات افتراضية** تعمل من خلال مجموعة متنوعة من **وكلاء ذكيين** يشغلون
|
||||
أدوارًا مختلفة، بما في ذلك المدير التنفيذي الرئيسي <img src='../online_log/static/figures/ceo.png' height=20>، المدير التنفيذي للمنتج <img src='../online_log/static/figures/cpo.png' height=20>، المدير التنفيذي للتكنولوجيا <img src='../online_log/static/figures/cto.png' height=20>، مبرمج <img src='../online_log/static/figures/programmer.png' height=20>، مراجع <img src='../online_log/static/figures/reviewer.png' height=20>، اختبار <img src='../online_log/static/figures/tester.png' height=20>، مصمم فني <img src='../online_log/static/figures/designer.png' height=20>. تشكل هؤلاء
|
||||
أدوارًا مختلفة، بما في ذلك المدير التنفيذي الرئيسي <img src='../visualizer/static/figures/ceo.png' height=20>، المدير التنفيذي للمنتج <img src='../visualizer/static/figures/cpo.png' height=20>، المدير التنفيذي للتكنولوجيا <img src='../visualizer/static/figures/cto.png' height=20>، مبرمج <img src='../visualizer/static/figures/programmer.png' height=20>، مراجع <img src='../visualizer/static/figures/reviewer.png' height=20>، اختبار <img src='../visualizer/static/figures/tester.png' height=20>، مصمم فني <img src='../visualizer/static/figures/designer.png' height=20>. تشكل هؤلاء
|
||||
الوكلاء هيكل تنظيمي متعدد الوكلاء وموحد من خلال مهمة "ثورة عالم البرمجة الرقمي". يتعاون وكلاء ChatDev
|
||||
من خلال المشاركة في ندوات وظيفية متخصصة، بما في ذلك مهام التصميم والبرمجة والاختبار والتوثيق.
|
||||
- الهدف الرئيسي لـ ChatDev هو تقديم إطار عمل سهل الاستخدام، قابل للتخصيص بشكل كبير وقابل للتوسيع،
|
||||
@ -27,18 +27,18 @@
|
||||
<p align="center">
|
||||
<img src='../misc/docker.png' width=400>
|
||||
</p>
|
||||
- 25 سبتمبر 2023: وضع **Git** متاح الآن، مما يتيح للمبرمج <img src='../online_log/static/figures/programmer.png' height=20> استخدام Git لمراقبة الإصدار. لتمكين هذه الميزة، قم ببساطة بتعيين ``"git_management"`` إلى ``"True"`` في ``ChatChainConfig.json``. راجع [الدليل](wiki.md#git-mode).
|
||||
- 25 سبتمبر 2023: وضع **Git** متاح الآن، مما يتيح للمبرمج <img src='../visualizer/static/figures/programmer.png' height=20> استخدام Git لمراقبة الإصدار. لتمكين هذه الميزة، قم ببساطة بتعيين ``"git_management"`` إلى ``"True"`` في ``ChatChainConfig.json``. راجع [الدليل](wiki.md#git-mode).
|
||||
<p align="center">
|
||||
<img src='../misc/github.png' width=600>
|
||||
</p>
|
||||
- 20 سبتمبر 2023: وضع **تفاعل الإنسان مع الوكيل** متاح الآن! يمكنك المشاركة مع فريق ChatDev من خلال لعب دور المراجع <img src='../online_log/static/figures/reviewer.png' height=20> وتقديم اقتراحات للمبرمج <img src='../online_log/static/figures/programmer.png' height=20>;
|
||||
- 20 سبتمبر 2023: وضع **تفاعل الإنسان مع الوكيل** متاح الآن! يمكنك المشاركة مع فريق ChatDev من خلال لعب دور المراجع <img src='../visualizer/static/figures/reviewer.png' height=20> وتقديم اقتراحات للمبرمج <img src='../visualizer/static/figures/programmer.png' height=20>;
|
||||
جرب ``python3 run.py --task [وصف فكرتك] --config "Human"``. راجع [الدليل](wiki.md#human-agent-interaction) و[المثال](WareHouse/Gomoku_HumanAgentInteraction_20230920135038).
|
||||
<p align="center">
|
||||
<img src
|
||||
|
||||
='../misc/Human_intro.png' width=600>
|
||||
</p>
|
||||
- 1 سبتمبر 2023: وضع **الفن** متاح الآن! يمكنك تنشيط وكيل المصمم <img src='../online_log/static/figures/designer.png' height=20> لإنشاء صور تستخدم في البرمجيات;
|
||||
- 1 سبتمبر 2023: وضع **الفن** متاح الآن! يمكنك تنشيط وكيل المصمم <img src='../visualizer/static/figures/designer.png' height=20> لإنشاء صور تستخدم في البرمجيات;
|
||||
جرب ``python3 run.py --task [وصف فكرتك] --config "Art"``. راجع [الدليل](wiki.md#art) و[المثال](WareHouse/gomokugameArtExample_THUNLP_20230831122822).
|
||||
- 28 أغسطس 2023: النظام متاح الآن للجمهور.
|
||||
- 17 أغسطس 2023: الإصدار v1.0.0 كان جاهزًا للإصدار.
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
## 📖 Gambaran
|
||||
|
||||
- **ChatDev** berdiri sebagai **perusahaan perangkat lunak virtual** yang beroperasi melalui berbagai **agen cerdas** yang memiliki peran berbeda, termasuk Chief Executive Officer <img src='../online_log/static/figures/ceo.png' height=20>, Chief Product Officer <img src='../online_log/static/figures/cpo.png' height=20>, Chief Technology Officer <img src='../online_log/static/figures/cto.png' height=20>, programmer <img src='../online_log/static/figures/programmer.png' height=20>, reviewer <img src='../online_log/static/figures/reviewer.png' height=20>, tester <img src='../online_log/static/figures/tester.png' height=20>, desainer seni <img src='../online_log/static/figures/designer.png' height=20>. Agen-agen ini membentuk struktur organisasi multi-agen dan bersatu dalam misi "merevolusi dunia digital melalui pemrograman." Agen-agen dalam ChatDev **bekerja sama** dengan berpartisipasi dalam seminar fungsional khusus, termasuk tugas-tugas seperti desain, pemrograman, pengujian, dan dokumentasi.
|
||||
- **ChatDev** berdiri sebagai **perusahaan perangkat lunak virtual** yang beroperasi melalui berbagai **agen cerdas** yang memiliki peran berbeda, termasuk Chief Executive Officer <img src='../visualizer/static/figures/ceo.png' height=20>, Chief Product Officer <img src='../visualizer/static/figures/cpo.png' height=20>, Chief Technology Officer <img src='../visualizer/static/figures/cto.png' height=20>, programmer <img src='../visualizer/static/figures/programmer.png' height=20>, reviewer <img src='../visualizer/static/figures/reviewer.png' height=20>, tester <img src='../visualizer/static/figures/tester.png' height=20>, desainer seni <img src='../visualizer/static/figures/designer.png' height=20>. Agen-agen ini membentuk struktur organisasi multi-agen dan bersatu dalam misi "merevolusi dunia digital melalui pemrograman." Agen-agen dalam ChatDev **bekerja sama** dengan berpartisipasi dalam seminar fungsional khusus, termasuk tugas-tugas seperti desain, pemrograman, pengujian, dan dokumentasi.
|
||||
- Tujuan utama ChatDev adalah menawarkan kerangka kerja yang **mudah digunakan**, **dapat disesuaikan secara tinggi**, dan **dapat diperluas**, yang didasarkan pada model bahasa besar (Large Language Models atau LLMs) dan menjadi skenario ideal untuk mempelajari kecerdasan kolektif.
|
||||
|
||||
<p align="center">
|
||||
@ -26,15 +26,15 @@
|
||||
<p align="center">
|
||||
<img src='../misc/docker.png' width=400>
|
||||
</p>
|
||||
- 25 September 2023: Mode **Git** kini tersedia, memungkinkan programmer <img src='../online_log/static/figures/programmer.png' height=20> untuk menggunakan Git untuk kontrol versi. Untuk mengaktifkan fitur ini, cukup atur ``"git_management"`` menjadi ``"True"`` di ``ChatChainConfig.json``. Lihat [panduan](wiki.md#mode-git).
|
||||
- 25 September 2023: Mode **Git** kini tersedia, memungkinkan programmer <img src='../visualizer/static/figures/programmer.png' height=20> untuk menggunakan Git untuk kontrol versi. Untuk mengaktifkan fitur ini, cukup atur ``"git_management"`` menjadi ``"True"`` di ``ChatChainConfig.json``. Lihat [panduan](wiki.md#mode-git).
|
||||
<p align="center">
|
||||
<img src='../misc/github.png' width=600>
|
||||
</p>
|
||||
- 20 September 2023: Mode **Interaksi Manusia-Agen** kini tersedia! Anda dapat terlibat dengan tim ChatDev dengan memainkan peran reviewer <img src='../online_log/static/figures/reviewer.png' height=20> dan memberikan saran kepada programmer <img src='../online_log/static/figures/programmer.png' height=20>; coba ``python3 run.py --task [deskripsi_ide_anda] --config "Manusia"``. Lihat [panduan](wiki.md#interaksi-manusia-agen) dan [contoh](WareHouse/Gomoku_HumanAgentInteraction_20230920135038).
|
||||
- 20 September 2023: Mode **Interaksi Manusia-Agen** kini tersedia! Anda dapat terlibat dengan tim ChatDev dengan memainkan peran reviewer <img src='../visualizer/static/figures/reviewer.png' height=20> dan memberikan saran kepada programmer <img src='../visualizer/static/figures/programmer.png' height=20>; coba ``python3 run.py --task [deskripsi_ide_anda] --config "Manusia"``. Lihat [panduan](wiki.md#interaksi-manusia-agen) dan [contoh](WareHouse/Gomoku_HumanAgentInteraction_20230920135038).
|
||||
<p align="center">
|
||||
<img src='../misc/Human_intro.png' width=600>
|
||||
</p>
|
||||
- 1 September 2023: Mode **Seni** kini tersedia! Anda dapat mengaktifkan agen desainer <img src='../online_log/static/figures/designer.png' height=20> untuk menghasilkan gambar yang digunakan dalam perangkat lunak; coba ``python3 run.py --task [deskripsi_ide_anda] --config "Seni"``. Lihat [panduan](wiki.md#seni) dan [contoh](WareHouse/gomokugameArtExample_THUNLP_20230831122822).
|
||||
- 1 September 2023: Mode **Seni** kini tersedia! Anda dapat mengaktifkan agen desainer <img src='../visualizer/static/figures/designer.png' height=20> untuk menghasilkan gambar yang digunakan dalam perangkat lunak; coba ``python3 run.py --task [deskripsi_ide_anda] --config "Seni"``. Lihat [panduan](wiki.md#seni) dan [contoh](WareHouse/gomokugameArtExample_THUNLP_20230831122822).
|
||||
- 28 Agustus 2023: Sistem tersedia untuk publik.
|
||||
- 17 Agustus 2023: Versi v1.0.0 siap untuk dirilis.
|
||||
- 30 Juli 2023: Pengguna dapat menyesuaikan pengaturan ChatChain, Fase, dan Peran. Selain itu, mode Log online dan mode pemutaran kini didukung.
|
||||
|
@ -5,7 +5,7 @@
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
【📚 <a href="../wiki.md">Wiki</a> | 🚀 <a href="../wiki.md#local-demo">Local Demo</a> | 👥 <a href="../Contribution.md">Community Built Software</a> | 🔧 <a href="../wiki.md#customization">Customization</a>】
|
||||
【📚 <a href="../wiki.md">Wiki</a> | 🚀 <a href="../wiki.md#visualizer">Visualizer</a> | 👥 <a href="../Contribution.md">Community Built Software</a> | 🔧 <a href="../wiki.md#customization">Customization</a>】
|
||||
</p>
|
||||
|
||||
## 📖 概述
|
||||
|
@ -5,12 +5,12 @@
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
【📚 <a href="../wiki.md">Wiki</a> | 🚀 <a href="../wiki.md#local-demo">Lokale Demo</a> | 👥 <a href="../Contribution.md">Community Gebouwde Software</a> | 🔧 <a href="../wiki.md#customization">Aanpassing</a>】
|
||||
【📚 <a href="../wiki.md">Wiki</a> | 🚀 <a href="../wiki.md#visualizer">Lokale Demo</a> | 👥 <a href="../Contribution.md">Community Gebouwde Software</a> | 🔧 <a href="../wiki.md#customization">Aanpassing</a>】
|
||||
</p>
|
||||
|
||||
## 📖 Overzicht
|
||||
|
||||
- **ChatDev** fungeert als een **virtueel softwarebedrijf** dat werkt met verschillende **intelligente agenten** die verschillende rollen vervullen, waaronder Chief Executive Officer <img src='../online_log/static/figures/ceo.png' height=20>, Chief Product Officer <img src='../online_log/static/figures/cpo.png' height=20>, Chief Technology Officer <img src='../online_log/static/figures/cto.png' height=20>, programmeur <img src='../online_log/static/figures/programmer.png' height=20>, recensent <img src='../online_log/static/figures/reviewer.png' height=20>, tester <img src='../online_log/static/figures/tester.png' height=20>, kunstontwerper <img src='../online_log/static/figures/designer.png' height=20>. Deze agenten vormen een multi-agent organisatiestructuur en zijn verenigd door een missie om "de digitale wereld te revolutioneren door middel van programmeren." De agenten binnen ChatDev **werken samen** door deel te nemen aan gespecialiseerde functionele seminars, waaronder taken zoals ontwerpen, coderen, testen en documenteren.
|
||||
- **ChatDev** fungeert als een **virtueel softwarebedrijf** dat werkt met verschillende **intelligente agenten** die verschillende rollen vervullen, waaronder Chief Executive Officer <img src='../visualizer/static/figures/ceo.png' height=20>, Chief Product Officer <img src='../visualizer/static/figures/cpo.png' height=20>, Chief Technology Officer <img src='../visualizer/static/figures/cto.png' height=20>, programmeur <img src='../visualizer/static/figures/programmer.png' height=20>, recensent <img src='../visualizer/static/figures/reviewer.png' height=20>, tester <img src='../visualizer/static/figures/tester.png' height=20>, kunstontwerper <img src='../visualizer/static/figures/designer.png' height=20>. Deze agenten vormen een multi-agent organisatiestructuur en zijn verenigd door een missie om "de digitale wereld te revolutioneren door middel van programmeren." De agenten binnen ChatDev **werken samen** door deel te nemen aan gespecialiseerde functionele seminars, waaronder taken zoals ontwerpen, coderen, testen en documenteren.
|
||||
- Het primaire doel van ChatDev is het aanbieden van een **eenvoudig te gebruiken**, **zeer aanpasbaar** en **uitbreidbaar** framework, dat is gebaseerd op grote taalmodellen (LLM's) en dient als een ideaal scenario voor het bestuderen van collectieve intelligentie.
|
||||
<p align="center">
|
||||
<img src='../misc/company.png' width=600>
|
||||
@ -18,15 +18,15 @@
|
||||
|
||||
## 🎉 Nieuws
|
||||
|
||||
* **25 september 2023: De **Git**-functie is nu beschikbaar**, waardoor de programmeur <img src='../online_log/static/figures/programmer.png' height=20> GitHub kan gebruiken voor versiebeheer. Om deze functie in te schakelen, stelt u eenvoudigweg ``"git_management"`` in op ``"True"`` in ``ChatChainConfig.json``.
|
||||
* **25 september 2023: De **Git**-functie is nu beschikbaar**, waardoor de programmeur <img src='../visualizer/static/figures/programmer.png' height=20> GitHub kan gebruiken voor versiebeheer. Om deze functie in te schakelen, stelt u eenvoudigweg ``"git_management"`` in op ``"True"`` in ``ChatChainConfig.json``.
|
||||
<p align="center">
|
||||
<img src='../misc/github.png' width=600>
|
||||
</p>
|
||||
* 20 september 2023: De **Human-Agent-Interaction**-modus is nu beschikbaar! U kunt deelnemen aan het ChatDev-team door de rol van recensent <img src='../online_log/static/figures/reviewer.png' height=20> te spelen en suggesties te doen aan de programmeur <img src='../online_log/static/figures/programmer.png' height=20>; probeer ``python3 run.py --task [beschrijving_van_uw_idee] --configuratie "Human"``. Zie [handleiding](../wiki.md#human-agent-interactie) en [voorbeeld](../WareHouse/Gomoku_HumanAgentInteraction_20230920135038).
|
||||
* 20 september 2023: De **Human-Agent-Interaction**-modus is nu beschikbaar! U kunt deelnemen aan het ChatDev-team door de rol van recensent <img src='../visualizer/static/figures/reviewer.png' height=20> te spelen en suggesties te doen aan de programmeur <img src='../visualizer/static/figures/programmer.png' height=20>; probeer ``python3 run.py --task [beschrijving_van_uw_idee] --configuratie "Human"``. Zie [handleiding](../wiki.md#human-agent-interactie) en [voorbeeld](../WareHouse/Gomoku_HumanAgentInteraction_20230920135038).
|
||||
<p align="center">
|
||||
<img src='../misc/Human_intro.png' width=600>
|
||||
</p>
|
||||
* 1 september 2023: De **Art**-modus is nu beschikbaar! U kunt de ontwerpagent <img src='../online_log/static/figures/designer.png' height=20> activeren om afbeeldingen te genereren die in de software worden gebruikt; probeer ``python3 run.py --task [beschrijving_van_uw_idee] --configuratie "Art"``. Zie [handleiding](../wiki.md#art) en [voorbeeld](../WareHouse/gomokugameArtExample_THUNLP_20230831122822).
|
||||
* 1 september 2023: De **Art**-modus is nu beschikbaar! U kunt de ontwerpagent <img src='../visualizer/static/figures/designer.png' height=20> activeren om afbeeldingen te genereren die in de software worden gebruikt; probeer ``python3 run.py --task [beschrijving_van_uw_idee] --configuratie "Art"``. Zie [handleiding](../wiki.md#art) en [voorbeeld](../WareHouse/gomokugameArtExample_THUNLP_20230831122822).
|
||||
* 28 augustus 2023: Het systeem is nu openbaar beschikbaar.
|
||||
* 17 augustus 2023: De v1.0.0-versie was gereed voor release.
|
||||
* 30 juli 2023: Gebruikers kunnen ChatChain-, Fase- en Rolvermeldingen aanpassen. Bovendien worden zowel online Log-modus als herhalingsmodus ondersteund.
|
||||
|
@ -6,12 +6,12 @@
|
||||
|
||||
|
||||
<p align="center">
|
||||
【📚 <a href="../wiki.md">Wiki</a> | 🚀 <a href="../wiki.md#local-demo">Lokal na Demo</a> | 👥 <a href="../Contribution.md">Komunidad ng Kontribusyon sa Software</a> | 🔧 <a href="../wiki.md#customization">Kostomisasyon</a>】
|
||||
【📚 <a href="../wiki.md">Wiki</a> | 🚀 <a href="../wiki.md#visualizer">Lokal na Demo</a> | 👥 <a href="../Contribution.md">Komunidad ng Kontribusyon sa Software</a> | 🔧 <a href="../wiki.md#customization">Kostomisasyon</a>】
|
||||
</p>
|
||||
|
||||
## 📖 Pangkalahatan
|
||||
|
||||
- Ang **ChatDev** ay isang **birtwal na kumpanya ng software** na nag-ooperate sa pamamagitan ng iba't-ibang **matalinong ahente** na may iba't-ibang mga papel, kabilang ang Chief Executive Officer <img src='../online_log/static/figures/ceo.png' height=20>, Chief Product Officer <img src='../online_log/static/figures/cpo.png' height=20>, Chief Technology Officer <img src='../online_log/static/figures/cto.png' height=20>, programmer <img src='../online_log/static/figures/programmer.png' height=20>, reviewer <img src='../online_log/static/figures/reviewer.png' height=20>, tester <img src='../online_log/static/figures/tester.png' height=20>, at art designer <img src='../online_log/static/figures/designer.png' height=20>. Ang mga ahente na ito ay bumubuo ng isang multi-agent na istruktura ng organisasyon at nagkakaisa sa isang misyon na "baguhin ang digital na mundo sa pamamagitan ng programming." Ang mga ahente sa loob ng ChatDev ay **nagkakaisa** sa pamamagitan ng pagsali sa mga espesyalisadong seminar na may mga gawain tulad ng pagdi-disenyo, pagko-coding, pagte-test, at pagsusuri.
|
||||
- Ang **ChatDev** ay isang **birtwal na kumpanya ng software** na nag-ooperate sa pamamagitan ng iba't-ibang **matalinong ahente** na may iba't-ibang mga papel, kabilang ang Chief Executive Officer <img src='../visualizer/static/figures/ceo.png' height=20>, Chief Product Officer <img src='../visualizer/static/figures/cpo.png' height=20>, Chief Technology Officer <img src='../visualizer/static/figures/cto.png' height=20>, programmer <img src='../visualizer/static/figures/programmer.png' height=20>, reviewer <img src='../visualizer/static/figures/reviewer.png' height=20>, tester <img src='../visualizer/static/figures/tester.png' height=20>, at art designer <img src='../visualizer/static/figures/designer.png' height=20>. Ang mga ahente na ito ay bumubuo ng isang multi-agent na istruktura ng organisasyon at nagkakaisa sa isang misyon na "baguhin ang digital na mundo sa pamamagitan ng programming." Ang mga ahente sa loob ng ChatDev ay **nagkakaisa** sa pamamagitan ng pagsali sa mga espesyalisadong seminar na may mga gawain tulad ng pagdi-disenyo, pagko-coding, pagte-test, at pagsusuri.
|
||||
- Ang pangunahing layunin ng ChatDev ay mag-alok ng isang **madaling gamitin**, **mabilis ma-customize**, at **napapalawak** na framework, na batay sa malalaking modelo ng wika (LLMs) at naglilingkod bilang isang ideal na scenario para pag-aralan ang kolektibong kaalaman.
|
||||
|
||||
<p align="center">
|
||||
@ -20,15 +20,15 @@
|
||||
|
||||
## 📰 Balita
|
||||
|
||||
* **Setyembre 25, 2023: Ang **Git** na feature ay available na**, nagbibigay-daan sa programmer <img src='../online_log/static/figures/programmer.png' height=20> na gamitin ang GitHub para sa version control. Upang paganahin ang feature na ito, i-set ang ``"git_management"`` sa ``"True"`` sa ``ChatChainConfig.json``.
|
||||
* **Setyembre 25, 2023: Ang **Git** na feature ay available na**, nagbibigay-daan sa programmer <img src='../visualizer/static/figures/programmer.png' height=20> na gamitin ang GitHub para sa version control. Upang paganahin ang feature na ito, i-set ang ``"git_management"`` sa ``"True"`` sa ``ChatChainConfig.json``.
|
||||
<p align="center">
|
||||
<img src='../misc/github.png' width=600>
|
||||
</p>
|
||||
* Setyembre 20, 2023: Ang **Human-Agent-Interaction** mode ay available na! Maaari kang makilahok sa ChatDev team sa pamamagitan ng pagganap ng papel ng reviewer <img src='../online_log/static/figures/reviewer.png' height=20> at pagbibigay ng mga suhestiyon sa programmer <img src='../online_log/static/figures/programmer.png' height=20>; subukan ang ``python3 run.py --task [description_ng_ideya_mo] --config "Human"``. Tingnan ang [gabay](../wiki.md#human-agent-interaction) at [halimbawa](../WareHouse/Gomoku_HumanAgentInteraction_20230920135038).
|
||||
* Setyembre 20, 2023: Ang **Human-Agent-Interaction** mode ay available na! Maaari kang makilahok sa ChatDev team sa pamamagitan ng pagganap ng papel ng reviewer <img src='../visualizer/static/figures/reviewer.png' height=20> at pagbibigay ng mga suhestiyon sa programmer <img src='../visualizer/static/figures/programmer.png' height=20>; subukan ang ``python3 run.py --task [description_ng_ideya_mo] --config "Human"``. Tingnan ang [gabay](../wiki.md#human-agent-interaction) at [halimbawa](../WareHouse/Gomoku_HumanAgentInteraction_20230920135038).
|
||||
<p align="center">
|
||||
<img src='../misc/Human_intro.png' width=600>
|
||||
</p>
|
||||
* Setyembre 1, 2023: Ang **Art** mode ay available na! Maaari mong paganahin ang ahenteng designer <img src='../online_log/static/figures/designer.png' height=20> upang lumikha ng mga imahe na ginagamit sa software; subukan ang ``python3 run.py --task [description_ng_ideya_mo] --config "Art"``. Tingnan ang [gabay](../wiki.md#art) at [halimbawa](../WareHouse/gomokugameArtExample_THUNLP_20230831122822).
|
||||
* Setyembre 1, 2023: Ang **Art** mode ay available na! Maaari mong paganahin ang ahenteng designer <img src='../visualizer/static/figures/designer.png' height=20> upang lumikha ng mga imahe na ginagamit sa software; subukan ang ``python3 run.py --task [description_ng_ideya_mo] --config "Art"``. Tingnan ang [gabay](../wiki.md#art) at [halimbawa](../WareHouse/gomokugameArtExample_THUNLP_20230831122822).
|
||||
* Agosto 28, 2023: Ang sistema ay magagamit na ng publiko.
|
||||
* Agosto 17, 2023: Ang bersyon v1.0.0 ay handa na para ilabas.
|
||||
* Hulyo 30, 2023: Maaaring baguhin ng mga user ang mga ChatChain, Phase, at Role settings. Bukod dito, sinusuportahan na rin ang online Log mode at replay mode.
|
||||
|
@ -6,13 +6,13 @@
|
||||
|
||||
|
||||
<p align="center">
|
||||
【📚 <a href="../wiki.md">Wiki</a> | 🚀 <a href="../wiki.md#local-demo">Démo Locale</a> | 👥 <a href="../Contribution.md">Logiciels de la Communauté</a> | 🔧 <a href="../wiki.md#customization">Personnalisation</a>】
|
||||
【📚 <a href="../wiki.md">Wiki</a> | 🚀 <a href="../wiki.md#visualizer">Démo Locale</a> | 👥 <a href="../Contribution.md">Logiciels de la Communauté</a> | 🔧 <a href="../wiki.md#customization">Personnalisation</a>】
|
||||
</p>
|
||||
|
||||
## 📖 Vue d'ensemble
|
||||
|
||||
- **ChatDev** se présente comme une **société de logiciels virtuelle** opérant par le biais de divers **agents intelligents** tenant
|
||||
différents rôles, incluant le Directeur Général <img src='../online_log/static/figures/ceo.png' height=20>, le Directeur de Produit <img src='../online_log/static/figures/cpo.png' height=20>, le Directeur Technologique <img src='../online_log/static/figures/cto.png' height=20>, programmeur <img src='../online_log/static/figures/programmer.png' height=20>, l'auditeur <img src='../online_log/static/figures/reviewer.png' height=20>, le testeur <img src='../online_log/static/figures/tester.png' height=20> et le designer graphique <img src='../online_log/static/figures/designer.png' height=20>. Ces agents forment une structure organisationnelle multi-agents et sont unis par une mission de "révolutionner le monde numérique à travers la programmation." Les agents de ChatDev **collaborent** en participant à des séminaires fonctionnels spécialisés, incluant des tâches telles que la conception, le codage, les tests et la documentation.
|
||||
différents rôles, incluant le Directeur Général <img src='../visualizer/static/figures/ceo.png' height=20>, le Directeur de Produit <img src='../visualizer/static/figures/cpo.png' height=20>, le Directeur Technologique <img src='../visualizer/static/figures/cto.png' height=20>, programmeur <img src='../visualizer/static/figures/programmer.png' height=20>, l'auditeur <img src='../visualizer/static/figures/reviewer.png' height=20>, le testeur <img src='../visualizer/static/figures/tester.png' height=20> et le designer graphique <img src='../visualizer/static/figures/designer.png' height=20>. Ces agents forment une structure organisationnelle multi-agents et sont unis par une mission de "révolutionner le monde numérique à travers la programmation." Les agents de ChatDev **collaborent** en participant à des séminaires fonctionnels spécialisés, incluant des tâches telles que la conception, le codage, les tests et la documentation.
|
||||
- L'objectif principal de ChatDev est de proposer un cadre **facile à utiliser**, **hautement personnalisable** et **extensible**, basé sur de grands modèles linguistiques (LLMs) et servant de scénario idéal pour étudier l'intelligence collective.
|
||||
<p align="center">
|
||||
<img src='../misc/company.png' width=600>
|
||||
@ -20,16 +20,16 @@
|
||||
|
||||
## 📰 Actualités
|
||||
|
||||
* **25 septembre 2023 : La fonctionnalité **Git** est maintenant disponible**, permettant au programmeur <img src='../online_log/static/figures/programmer.png' height=20> d'utiliser GitHub pour le contrôle de version. Pour activer cette fonction, définissez simplement ``"git_management"`` sur ``"True"`` dans ``ChatChainConfig.json``.
|
||||
* **25 septembre 2023 : La fonctionnalité **Git** est maintenant disponible**, permettant au programmeur <img src='../visualizer/static/figures/programmer.png' height=20> d'utiliser GitHub pour le contrôle de version. Pour activer cette fonction, définissez simplement ``"git_management"`` sur ``"True"`` dans ``ChatChainConfig.json``.
|
||||
<p align="center">
|
||||
<img src='../misc/github.png' width=600>
|
||||
</p>
|
||||
* 20 septembre 2023 : Le mode **Interaction Humain-Agent** est maintenant disponible ! Vous pouvez interagir avec l'équipe ChatDev en jouant le rôle de l'examinateur <img src='../online_log/static/figures/reviewer.png' height=20> et en faisant des suggestions au programmeur <img src='../online_log/static/figures/programmer.png' height=20>;
|
||||
* 20 septembre 2023 : Le mode **Interaction Humain-Agent** est maintenant disponible ! Vous pouvez interagir avec l'équipe ChatDev en jouant le rôle de l'examinateur <img src='../visualizer/static/figures/reviewer.png' height=20> et en faisant des suggestions au programmeur <img src='../visualizer/static/figures/programmer.png' height=20>;
|
||||
essayez ``python3 run.py --task [description_de_votre_idée] --config "Humain"``. Voir le [guide](../wiki.md#human-agent-interaction) et l'[exemple](../WareHouse/Gomoku_HumanAgentInteraction_20230920135038).
|
||||
<p align="center">
|
||||
<img src='../misc/Human_intro.png' width=600>
|
||||
</p>
|
||||
* 1er septembre 2023 : Le mode **Art** est maintenant disponible ! Vous pouvez activer l'agent designer <img src='../online_log/static/figures/designer.png' height=20> pour générer des images utilisées dans le logiciel;
|
||||
* 1er septembre 2023 : Le mode **Art** est maintenant disponible ! Vous pouvez activer l'agent designer <img src='../visualizer/static/figures/designer.png' height=20> pour générer des images utilisées dans le logiciel;
|
||||
essayez ``python3 run.py --task [description_de_votre_idée] --config "Art"``. Voir le [guide](../wiki.md#art) et l'[exemple](../WareHouse/gomokugameArtExample_THUNLP_20230831122822).
|
||||
* 28 août 2023 : Le système est désormais disponible au public.
|
||||
* 17 août 2023 : La version v1.0.0 était prête à être publiée.
|
||||
|
@ -6,13 +6,13 @@
|
||||
|
||||
|
||||
<p align="center">
|
||||
【📚 <a href="../wiki.md">विकि</a> | 🚀 <a href="../wiki.md#local-demo">स्थानीय डेमो</a> | 👥 <a href="../Contribution.md">समुदाय निर्मित सॉफ्टवेयर</a> | 🔧 <a href="../wiki.md#customization">अनुकूलन</a>】
|
||||
【📚 <a href="../wiki.md">विकि</a> | 🚀 <a href="../wiki.md#visualizer">स्थानीय डेमो</a> | 👥 <a href="../Contribution.md">समुदाय निर्मित सॉफ्टवेयर</a> | 🔧 <a href="../wiki.md#customization">अनुकूलन</a>】
|
||||
</p>
|
||||
|
||||
## 📖 Overview
|
||||
|
||||
- **ChatDev** एक **वर्चुअल सॉफ्टवेयर कंपनी** के रूप में खड़ी है जो विभिन्न **बुद्धिमान एजेंटों** होल्डिंग के माध्यम से संचालित होता है|
|
||||
मुख्य कार्यकारी अधिकारी सहित विभिन्न भूमिकाएँ <img src='../online_log/static/figures/ceo.png' height=20>, मुख्य उत्पाद अधिकारी <img src='../online_log/static/figures/cpo.png' height=20>, मुख्य तकनीकी अधिकारी <img src='../online_log/static/figures/cto.png' height=20>, प्रोग्रामर <img src='../online_log/static/figures/programmer.png' height=20>, reviewer <img src='../online_log/static/figures/reviewer.png' height=20>, टेस्टर <img src='../online_log/static/figures/tester.png' height=20>, कला डिजाइनर <img src='../online_log/static/figures/designer.png' height=20>. इन
|
||||
मुख्य कार्यकारी अधिकारी सहित विभिन्न भूमिकाएँ <img src='../visualizer/static/figures/ceo.png' height=20>, मुख्य उत्पाद अधिकारी <img src='../visualizer/static/figures/cpo.png' height=20>, मुख्य तकनीकी अधिकारी <img src='../visualizer/static/figures/cto.png' height=20>, प्रोग्रामर <img src='../visualizer/static/figures/programmer.png' height=20>, reviewer <img src='../visualizer/static/figures/reviewer.png' height=20>, टेस्टर <img src='../visualizer/static/figures/tester.png' height=20>, कला डिजाइनर <img src='../visualizer/static/figures/designer.png' height=20>. इन
|
||||
एजेंट एक बहु-एजेंट संगठनात्मक संरचना बनाते हैं और "डिजिटल दुनिया में क्रांति लाने" के मिशन से एकजुट होते हैं
|
||||
प्रोग्रामिंग के माध्यम से।" ChatDev के एजेंट विशेष कार्यात्मक सेमिनारों में भाग लेकर **सहयोग** करते हैं,
|
||||
जिसमें डिज़ाइनिंग, कोडिंग, परीक्षण और दस्तावेज़ीकरण जैसे कार्य शामिल हैं।
|
||||
@ -24,16 +24,16 @@
|
||||
|
||||
## 🎉 News
|
||||
|
||||
* **25 सितंबर, 2023: **गिट** सुविधा अब उपलब्ध है**, जो प्रोग्रामर को सक्षम बनाती है <img src='../online_log/static/figures/programmer.png' height=20> संस्करण नियंत्रण के लिए GitHub का उपयोग करना। इस सुविधा को सक्षम करने के लिए, बस सेट करें ``"git_management"`` को ``"True"`` में ``ChatChainConfig.json``.
|
||||
* **25 सितंबर, 2023: **गिट** सुविधा अब उपलब्ध है**, जो प्रोग्रामर को सक्षम बनाती है <img src='../visualizer/static/figures/programmer.png' height=20> संस्करण नियंत्रण के लिए GitHub का उपयोग करना। इस सुविधा को सक्षम करने के लिए, बस सेट करें ``"git_management"`` को ``"True"`` में ``ChatChainConfig.json``.
|
||||
<p align="center">
|
||||
<img src='../misc/github.png' width=600>
|
||||
</p>
|
||||
* 20 सितंबर, 2023: **ह्यूमन-एजेंट-इंटरैक्शन** मोड अब उपलब्ध है! आप समीक्षक की भूमिका निभाकर ChatDev टीम से जुड़ सकते हैं <img src='../online_log/static/figures/reviewer.png' height=20> और प्रोग्रामर को सुझाव देना <img src='../online_log/static/figures/programmer.png' height=20>;
|
||||
* 20 सितंबर, 2023: **ह्यूमन-एजेंट-इंटरैक्शन** मोड अब उपलब्ध है! आप समीक्षक की भूमिका निभाकर ChatDev टीम से जुड़ सकते हैं <img src='../visualizer/static/figures/reviewer.png' height=20> और प्रोग्रामर को सुझाव देना <img src='../visualizer/static/figures/programmer.png' height=20>;
|
||||
कोशिश ``python3 run.py --task [आपके_विचार_का_वर्णन] --config "Human"``. देखना [मार्गदर्शक](../wiki.md#human-agent-interaction) and [उदाहरण](../WareHouse/Gomoku_HumanAgentInteraction_20230920135038).
|
||||
<p align="center">
|
||||
<img src='../misc/Human_intro.png' width=600>
|
||||
</p>
|
||||
* 1 सितंबर, 2023: **कला** मोड अब उपलब्ध है! आप डिज़ाइनर एजेंट को सक्रिय कर सकते हैं <img src='../online_log/static/figures/designer.png' height=20> सॉफ़्टवेयर में प्रयुक्त छवियाँ उत्पन्न करने के लिए;
|
||||
* 1 सितंबर, 2023: **कला** मोड अब उपलब्ध है! आप डिज़ाइनर एजेंट को सक्रिय कर सकते हैं <img src='../visualizer/static/figures/designer.png' height=20> सॉफ़्टवेयर में प्रयुक्त छवियाँ उत्पन्न करने के लिए;
|
||||
कोशिश ``python3 run.py --task [आपके_विचार_का_वर्णन] --config "Art"``. देखना [मार्गदर्शक](../wiki.md#art) and [उदाहरण](../WareHouse/gomokugameArtExample_THUNLP_20230831122822).
|
||||
* 28 अगस्त, 2023: सिस्टम सार्वजनिक रूप से उपलब्ध है।
|
||||
* 17 अगस्त, 2023: v1.0.0 संस्करण रिलीज़ के लिए तैयार था।
|
||||
|
@ -6,14 +6,14 @@
|
||||
|
||||
|
||||
<p align="center">
|
||||
【📚 <a href="../wiki.md">Wiki</a> | 🚀 <a href="../wiki.md#local-demo">ローカルデモ</a> | 👥 <a href="../Contribution.md">コミュニティにより作られたソフト</a> | 🔧 <a href="../wiki.md#customization">カスタマイズ</a> | 👾 <a href="https://discord.gg/bn4t2Jy6TT")>Discord</a>】
|
||||
【📚 <a href="../wiki.md">Wiki</a> | 🚀 <a href="../wiki.md#visualizer">ローカルデモ</a> | 👥 <a href="../Contribution.md">コミュニティにより作られたソフト</a> | 🔧 <a href="../wiki.md#customization">カスタマイズ</a> | 👾 <a href="https://discord.gg/bn4t2Jy6TT")>Discord</a>】
|
||||
|
||||
</p>
|
||||
|
||||
## 📖 概要
|
||||
|
||||
- **ChatDev** は、最高経営責任者 <img src='../online_log/static/figures/ceo.png' height=20>、
|
||||
最高製品責任者 <img src='../online_log/static/figures/cpo.png' height=20>、最高技術責任者 <img src='../online_log/static/figures/cto.png' height=20>、プログラマー <img src='../online_log/static/figures/programmer.png' height=20>、レビュアー <img src='../online_log/static/figures/reviewer.png' height=20>、テスター <img src='../online_log/static/figures/tester.png' height=20>、アートデザイナー <img src='../online_log/static/figures/designer.png' height=20> などさまざまな役割を持つさまざまな**インテリジェントエージェント**を擁する**バーチャルソフトウェア企業**である。これらのエージェントはマルチエージェントの組織構造を形成し、
|
||||
- **ChatDev** は、最高経営責任者 <img src='../visualizer/static/figures/ceo.png' height=20>、
|
||||
最高製品責任者 <img src='../visualizer/static/figures/cpo.png' height=20>、最高技術責任者 <img src='../visualizer/static/figures/cto.png' height=20>、プログラマー <img src='../visualizer/static/figures/programmer.png' height=20>、レビュアー <img src='../visualizer/static/figures/reviewer.png' height=20>、テスター <img src='../visualizer/static/figures/tester.png' height=20>、アートデザイナー <img src='../visualizer/static/figures/designer.png' height=20> などさまざまな役割を持つさまざまな**インテリジェントエージェント**を擁する**バーチャルソフトウェア企業**である。これらのエージェントはマルチエージェントの組織構造を形成し、
|
||||
"プログラミングを通じてデジタル世界に革命を起こす"というミッションで
|
||||
結束しています。ChatDev 内のエージェントは、設計、コーディング、テスト、ドキュメント作成などのタスクを含む専門的な機能セミナーに参加することで、
|
||||
**共同作業** を行います。
|
||||
@ -38,16 +38,16 @@
|
||||
<p align="center">
|
||||
<img src='../misc/docker.png' width=400>
|
||||
</p>
|
||||
- 2023年9月25日: **Git** 機能が利用可能になりました、プログラマー <img src='../online_log/static/figures/programmer.png' height=20> がバージョン管理に GitHub を利用できるようになります。この機能を有効にするには、``ChatChainConfig.json`` で ``"git_management"`` を ``"True"`` に設定するだけです。
|
||||
- 2023年9月25日: **Git** 機能が利用可能になりました、プログラマー <img src='../visualizer/static/figures/programmer.png' height=20> がバージョン管理に GitHub を利用できるようになります。この機能を有効にするには、``ChatChainConfig.json`` で ``"git_management"`` を ``"True"`` に設定するだけです。
|
||||
<p align="center">
|
||||
<img src='../misc/github.png' width=600>
|
||||
</p>
|
||||
- 2023年9月20日: **Human-Agent-Interaction** モードが利用可能になりました!レビュアー <img src='../online_log/static/figures/reviewer.png' height=20> になってプログラマー <img src='../online_log/static/figures/programmer.png' height=20> に提案することで、ChatDev チームに参加することができます;
|
||||
- 2023年9月20日: **Human-Agent-Interaction** モードが利用可能になりました!レビュアー <img src='../visualizer/static/figures/reviewer.png' height=20> になってプログラマー <img src='../visualizer/static/figures/programmer.png' height=20> に提案することで、ChatDev チームに参加することができます;
|
||||
``python3 run.py --task [description_of_your_idea] --config "Human"`` を試してみてください。また、[ガイド](../wiki.md#human-agent-interaction)と[例](../WareHouse/Gomoku_HumanAgentInteraction_20230920135038)を参照してください。
|
||||
<p align="center">
|
||||
<img src='../misc/Human_intro.png' width=600>
|
||||
</p>
|
||||
- 2023年9月1日: **Art** モードが利用可能になりました!デザイナーエージェント <img src='../online_log/static/figures/designer.png' height=20> を有効にすると、ソフトウェアで使用する画像を生成できます;
|
||||
- 2023年9月1日: **Art** モードが利用可能になりました!デザイナーエージェント <img src='../visualizer/static/figures/designer.png' height=20> を有効にすると、ソフトウェアで使用する画像を生成できます;
|
||||
``python3 run.py --task [description_of_your_idea] --config "Art"`` を試してみてください。また、[ガイド](../wiki.md#art)と[例](../WareHouse/gomokugameArtExample_THUNLP_20230831122822)を参照してください。
|
||||
- 2023年8月28日: システムが一般公開されました。
|
||||
- 2023年8月17日: v1.0.0 のリリース準備が整いました。
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
|
||||
<p align="center">
|
||||
【📚 <a href="../wiki.md">Wiki</a> | 🚀 <a href="../wiki.md#local-demo">Local Demo</a> | 👥 <a href="../Contribution.md">Community Built Software</a> | 🔧 <a href="../wiki.md#customization">Customization</a>】
|
||||
【📚 <a href="../wiki.md">Wiki</a> | 🚀 <a href="../wiki.md#visualizer">Visualizer</a> | 👥 <a href="../Contribution.md">Community Built Software</a> | 🔧 <a href="../wiki.md#customization">Customization</a>】
|
||||
</p>
|
||||
|
||||
## 📖 개요
|
||||
|
@ -6,13 +6,13 @@
|
||||
|
||||
|
||||
<p align="center">
|
||||
【📚 <a href="../wiki.md">Wiki</a> | 🚀 <a href="../wiki.md#local-demo">Demo Local</a> | 👥 <a href="../Contribution.md">Software Construído pela Comunidade</a> | 🔧 <a href="../wiki.md#customization">Personalização</a>】
|
||||
【📚 <a href="../wiki.md">Wiki</a> | 🚀 <a href="../wiki.md#visualizer">Demo Local</a> | 👥 <a href="../Contribution.md">Software Construído pela Comunidade</a> | 🔧 <a href="../wiki.md#customization">Personalização</a>】
|
||||
</p>
|
||||
|
||||
## 📖 Overview
|
||||
|
||||
- **ChatDev** é uma **empresa de software virtual** que opera por meio de vários **agentes inteligentes** desempenhando
|
||||
diferentes papéis, incluindo Diretor Executivo <img src='../online_log/static/figures/ceo.png' height=20>, Diretor de Produtos <img src='../online_log/static/figures/cpo.png' height=20>, Diretor de Tecnologia <img src='../online_log/static/figures/cto.png' height=20>, programador <img src='../online_log/static/figures/programmer.png' height=20>, revisor <img src='../online_log/static/figures/reviewer.png' height=20>, testador <img src='../online_log/static/figures/tester.png' height=20>, designer de arte <img src='../online_log/static/figures/designer.png' height=20>. Esses
|
||||
diferentes papéis, incluindo Diretor Executivo <img src='../visualizer/static/figures/ceo.png' height=20>, Diretor de Produtos <img src='../visualizer/static/figures/cpo.png' height=20>, Diretor de Tecnologia <img src='../visualizer/static/figures/cto.png' height=20>, programador <img src='../visualizer/static/figures/programmer.png' height=20>, revisor <img src='../visualizer/static/figures/reviewer.png' height=20>, testador <img src='../visualizer/static/figures/tester.png' height=20>, designer de arte <img src='../visualizer/static/figures/designer.png' height=20>. Esses
|
||||
agentes formam uma estrutura organizacional multiagente e estão unidos por uma missão de "revolucionar o mundo digital
|
||||
por meio da programação." Os agentes dentro do ChatDev **colaboram** participando de seminários funcionais especializados,
|
||||
incluindo tarefas como design, codificação, teste e documentação.
|
||||
@ -25,17 +25,17 @@ incluindo tarefas como design, codificação, teste e documentação.
|
||||
|
||||
## 🎉 Notícias
|
||||
|
||||
* **25 de setembro de 2023: A funcionalidade Git agora está disponível**, permitindo que o programador <img src='../online_log/static/figures/programmer.png' height=20> utilize o GitHub para controle de versão. Para ativar essa funcionalidade, basta definir ``"git_management"`` para ``"True"`` no arquivo ``ChatChainConfig.json``.
|
||||
* **25 de setembro de 2023: A funcionalidade Git agora está disponível**, permitindo que o programador <img src='../visualizer/static/figures/programmer.png' height=20> utilize o GitHub para controle de versão. Para ativar essa funcionalidade, basta definir ``"git_management"`` para ``"True"`` no arquivo ``ChatChainConfig.json``.
|
||||
<p align="center">
|
||||
<img src='../misc/github.png' width=600>
|
||||
</p>
|
||||
* 20 de setembro de 2023: O modo **Interação Humano-Agent** agora está disponível! Você pode se envolver com a equipe do ChatDev desempenhando o papel de revisor <img src='../online_log/static/figures/reviewer.png' height=20> e fazendo sugestões ao programador <img src='../online_log/static/figures/programmer.png' height=20>;
|
||||
* 20 de setembro de 2023: O modo **Interação Humano-Agent** agora está disponível! Você pode se envolver com a equipe do ChatDev desempenhando o papel de revisor <img src='../visualizer/static/figures/reviewer.png' height=20> e fazendo sugestões ao programador <img src='../visualizer/static/figures/programmer.png' height=20>;
|
||||
tente ``python3 run.py --task [descrição_da_sua_ideia] --config "Human"``. Veja [guia](../wiki.md#human-agent-interaction) e [exemplo](../WareHouse/Gomoku_HumanAgentInteraction_20230920135038).
|
||||
<p align="center">
|
||||
<img src='../misc/Human_intro.png' width=600>
|
||||
</p>
|
||||
|
||||
* 1º de setembro de 2023: O modo **Arte** está disponível agora! Você pode ativar o agente designer <img src='../online_log/static/figures/designer.png' height=20> para gerar imagens usadas no software;
|
||||
* 1º de setembro de 2023: O modo **Arte** está disponível agora! Você pode ativar o agente designer <img src='../visualizer/static/figures/designer.png' height=20> para gerar imagens usadas no software;
|
||||
try ``python3 run.py --task [descrição_da_sua_ideia] --config "Art"``. Veja o [guia](../wiki.md#art) e o [exemplo](../WareHouse/gomokugameArtExample_THUNLP_20230831122822).
|
||||
* 28 de agosto de 2023: O sistema está disponível publicamente.
|
||||
* 17 de agosto de 2023: A versão v1.0.0 estava pronta para ser lançada.
|
||||
|
@ -6,13 +6,13 @@
|
||||
|
||||
|
||||
<p align="center">
|
||||
【📚 <a href="../wiki.md">Wiki</a> | 🚀 <a href="../wiki.md#local-demo">Lokalne Demo</a> | 👥 <a href="../Contribution.md">Softvér vytvorený komunitou</a> | 🔧 <a href="../wiki.md#customization">Prispôsobenie</a>】
|
||||
【📚 <a href="../wiki.md">Wiki</a> | 🚀 <a href="../wiki.md#visualizer">Lokalne Demo</a> | 👥 <a href="../Contribution.md">Softvér vytvorený komunitou</a> | 🔧 <a href="../wiki.md#customization">Prispôsobenie</a>】
|
||||
</p>
|
||||
|
||||
## 📖 Prehľad
|
||||
|
||||
- **ChatDev** je **virtuálna softvérová spoločnosť**, ktorá pôsobí prostredníctvom rôznych **inteligentných agentov**.
|
||||
rôznych funkcií, vrátane riaditeľa <img src='../online_log/static/figures/ceo.png' height=20>, produktového riaditeľa <img src='../online_log/static/figures/cpo.png' height=20>, technologického riaditeľa <img src="online_log/static/figures/cto.png" height=20>, programátor <img src='../online_log/static/figures/programmer.png' height=20>, recenzent <img src='../online_log/static/figures/reviewer.png' height=20>, tester <img src='../online_log/static/figures/tester.png' height=20>, výtvarník <img src='../online_log/static/figures/designer.png' height=20>. Týto
|
||||
rôznych funkcií, vrátane riaditeľa <img src='../visualizer/static/figures/ceo.png' height=20>, produktového riaditeľa <img src='../visualizer/static/figures/cpo.png' height=20>, technologického riaditeľa <img src="visualizer/static/figures/cto.png" height=20>, programátor <img src='../visualizer/static/figures/programmer.png' height=20>, recenzent <img src='../visualizer/static/figures/reviewer.png' height=20>, tester <img src='../visualizer/static/figures/tester.png' height=20>, výtvarník <img src='../visualizer/static/figures/designer.png' height=20>. Týto
|
||||
agenti tvoria multiagentovú organizačnú štruktúru a spája ich poslanie "revolučne zmeniť digitálny svet
|
||||
prostredníctvom programovania." Agenti v rámci ChatDev **spolupracujú** účasťou na špecializovaných funkčných seminároch,
|
||||
vrátane úloh, ako je navrhovanie, kódovanie, testovanie a dokumentovanie.
|
||||
@ -24,16 +24,16 @@
|
||||
|
||||
## 🎉 Novinky
|
||||
|
||||
* september 25. 2023: Teraz je k dispozícii funkcia **Git**, ktorá umožňuje programátorovi <img src='../online_log/static/figures/programmer.png' height=20> využívať GitHub na version control. Ak chcete túto funkciu povoliť, jednoducho nastavte ``"git_management"`` na ``"True"`` v súbore ``ChatChainConfig.json``.
|
||||
* september 25. 2023: Teraz je k dispozícii funkcia **Git**, ktorá umožňuje programátorovi <img src='../visualizer/static/figures/programmer.png' height=20> využívať GitHub na version control. Ak chcete túto funkciu povoliť, jednoducho nastavte ``"git_management"`` na ``"True"`` v súbore ``ChatChainConfig.json``.
|
||||
<p align="center">
|
||||
<img src='../misc/github.png' width=600>
|
||||
</p>
|
||||
* september 20. 2023: Režim **Human-Agent-Interaction** je teraz k dispozícii! Môžete sa zapojiť do tímu ChatDev tým, že budete hrať úlohu recenzenta <img src='../online_log/static/figures/reviewer.png' height=20> a predkladať návrhy programátorovi <img src='../online_log/static/figures/programmer.png' height=20>;
|
||||
* september 20. 2023: Režim **Human-Agent-Interaction** je teraz k dispozícii! Môžete sa zapojiť do tímu ChatDev tým, že budete hrať úlohu recenzenta <img src='../visualizer/static/figures/reviewer.png' height=20> a predkladať návrhy programátorovi <img src='../visualizer/static/figures/programmer.png' height=20>;
|
||||
skúste ``python3 run.py --task [description_of_your_idea] --config "Human"``. Pozri [návod](../wiki.md#human-agent-interaction) a [príklad](../WareHouse/Gomoku_HumanAgentInteraction_20230920135038).
|
||||
<p align="center">
|
||||
<img src='../misc/Human_intro.png' width=600>
|
||||
</p>
|
||||
* september 1. 2023: Režim **Art** je už k dispozícii! Môžete si aktivovať agenta dizajnéra <img src='../online_log/static/figures/designer.png' height=20> na generovanie obrázkov používaných v programe;
|
||||
* september 1. 2023: Režim **Art** je už k dispozícii! Môžete si aktivovať agenta dizajnéra <img src='../visualizer/static/figures/designer.png' height=20> na generovanie obrázkov používaných v programe;
|
||||
skúste ``python3 run.py --task [description_of_your_idea] --config "Art"``. Pozri [návod](../wiki.md#art) a [príklad](../WareHouse/gomokugameArtExample_THUNLP_20230831122822).
|
||||
* august 28. 2023: Systém je verejne dostupný.
|
||||
* august 17. 2023: Verzia v1.0.0 bola pripravená na vydanie.
|
||||
|
@ -6,12 +6,12 @@
|
||||
|
||||
|
||||
<p align="center">
|
||||
【📚 <a href="../wiki.md">Wiki</a> | 🚀 <a href="../wiki.md#local-demo">Local Demo</a> | 👥 <a href="../Contribution.md">Community Built Software</a> | 🔧 <a href="../wiki.md#customization">Customization</a>】
|
||||
【📚 <a href="../wiki.md">Wiki</a> | 🚀 <a href="../wiki.md#visualizer">Visualizer</a> | 👥 <a href="../Contribution.md">Community Built Software</a> | 🔧 <a href="../wiki.md#customization">Customization</a>】
|
||||
</p>
|
||||
|
||||
## 📖 Overview
|
||||
|
||||
- **ChatDev** es una **empresa de software virtual** que opera a través de varios **agentes inteligentes** que desempeñan diferentes roles, incluyendo al Director Ejecutivo <img src='../online_log/static/figures/ceo.png' height=20>, Director de Producto <img src='../online_log/static/figures/cpo.png' height=20>, Director Tecnológico <img src='../online_log/static/figures/cto.png' height=20>, programador <img src='../online_log/static/figures/programmer.png' height=20>, revisor <img src='../online_log/static/figures/reviewer.png' height=20>, tester <img src='../online_log/static/figures/tester.png' height=20>, diseñador de arte <img src='../online_log/static/figures/designer.png' height=20>. Estos agentes forman una estructura organizacional multi-agente y están unidos por una misión de "revolucionar el mundo digital a través de la programación." Los agentes dentro de ChatDev **colaboran** participando en seminarios funcionales especializados, incluyendo tareas como diseñar, codificar, probar y documentar.
|
||||
- **ChatDev** es una **empresa de software virtual** que opera a través de varios **agentes inteligentes** que desempeñan diferentes roles, incluyendo al Director Ejecutivo <img src='../visualizer/static/figures/ceo.png' height=20>, Director de Producto <img src='../visualizer/static/figures/cpo.png' height=20>, Director Tecnológico <img src='../visualizer/static/figures/cto.png' height=20>, programador <img src='../visualizer/static/figures/programmer.png' height=20>, revisor <img src='../visualizer/static/figures/reviewer.png' height=20>, tester <img src='../visualizer/static/figures/tester.png' height=20>, diseñador de arte <img src='../visualizer/static/figures/designer.png' height=20>. Estos agentes forman una estructura organizacional multi-agente y están unidos por una misión de "revolucionar el mundo digital a través de la programación." Los agentes dentro de ChatDev **colaboran** participando en seminarios funcionales especializados, incluyendo tareas como diseñar, codificar, probar y documentar.
|
||||
- El objetivo principal de ChatDev es ofrecer un marco de trabajo **fácil de usar**, **altamente personalizable** y **extensible**, que se basa en modelos de grandems modelos de lenguaje (LLMs, por sus siglas en inglés) y sirve como un escenario ideal para estudiar la inteligencia colectiva.
|
||||
<p align="center">
|
||||
<img src='../misc/company.png' width=600>
|
||||
@ -19,16 +19,16 @@
|
||||
|
||||
## 🎉 Noticias
|
||||
|
||||
* **25 de septiembre de 2023: La característica **Git** ya está disponible**, permite al programador <img src='../online_log/static/figures/programmer.png' height=20> utilizar GitHub para el control de versiones. Para habilitar esta función, simplemente asigna el valor ``"True"`` igual a ``"git_management"`` en ``ChatChainConfig.json``.
|
||||
* **25 de septiembre de 2023: La característica **Git** ya está disponible**, permite al programador <img src='../visualizer/static/figures/programmer.png' height=20> utilizar GitHub para el control de versiones. Para habilitar esta función, simplemente asigna el valor ``"True"`` igual a ``"git_management"`` en ``ChatChainConfig.json``.
|
||||
<p align="center">
|
||||
<img src='../misc/github.png' width=600>
|
||||
</p>
|
||||
* 20 de septiembre de 2023: ¡El modo **Interacción Humano-Agente** ya está disponible! Puedes involucrarte con el equipo de ChatDev asumiendo el rol de revisor <img src='../online_log/static/figures/reviewer.png' height=20> y haciendo sugerencias al programador <img src='../online_log/static/figures/programmer.png' height=20>;
|
||||
* 20 de septiembre de 2023: ¡El modo **Interacción Humano-Agente** ya está disponible! Puedes involucrarte con el equipo de ChatDev asumiendo el rol de revisor <img src='../visualizer/static/figures/reviewer.png' height=20> y haciendo sugerencias al programador <img src='../visualizer/static/figures/programmer.png' height=20>;
|
||||
prueba ``python3 run.py --task [description_of_your_idea] --config "Human"``. Consulta la [guía](../wiki.md#human-agent-interaction) y el [ejemplo](../WareHouse/Gomoku_HumanAgentInteraction_20230920135038).
|
||||
<p align="center">
|
||||
<img src='../misc/Human_intro.png' width=600>
|
||||
</p>
|
||||
* 1 de septiembre de 2023: ¡El modo **Arte** ya está disponible! Puedes activar al agente de diseño <img src='../online_log/static/figures/designer.png' height=20> para generar imágenes utilizadas en el software;
|
||||
* 1 de septiembre de 2023: ¡El modo **Arte** ya está disponible! Puedes activar al agente de diseño <img src='../visualizer/static/figures/designer.png' height=20> para generar imágenes utilizadas en el software;
|
||||
prueba ``python3 run.py --task [description_of_your_idea] --config "Art"``. Consulta la [guía](../wiki.md#art) y el [ejemplo](../WareHouse/gomokugameArtExample_THUNLP_20230831122822).
|
||||
* 28 de agosto de 2023: El sistema está disponible al público.
|
||||
* 17 de agosto de 2023: La versión v1.0.0 estaba lista para ser lanzada.
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
## 📖 Genel Bakış
|
||||
|
||||
- **ChatDev**, farklı rolleri olan çeşitli **akıllı ajanlar** aracılığıyla işleyen bir **sanal yazılım şirketi** olarak duruyor, bu roller arasında İcra Kurulu Başkanı <img src='../online_log/static/figures/ceo.png' height=20>, Baş Ürün Sorumlusu <img src='../online_log/static/figures/cpo.png' height=20>, Baş Teknoloji Sorumlusu <img src='../online_log/static/figures/cto.png' height=20>, programcı <img src='../online_log/static/figures/programmer.png' height=20>, inceleyici <img src='../online_log/static/figures/reviewer.png' height=20>, testçi <img src='../online_log/static/figures/tester.png' height=20>, sanat tasarımcısı <img src='../online_log/static/figures/designer.png' height=20> bulunur. Bu ajanlar çoklu ajan organizasyon yapısı oluşturur ve "programlama yoluyla dijital dünyayı devrimleştirmek" misyonuyla birleşirler. ChatDev içindeki ajanlar, özel işlevsel seminerlere katılarak işbirliği yaparlar, bu seminerler tasarım, kodlama, test etme ve belgeleme gibi görevleri içerir.
|
||||
- **ChatDev**, farklı rolleri olan çeşitli **akıllı ajanlar** aracılığıyla işleyen bir **sanal yazılım şirketi** olarak duruyor, bu roller arasında İcra Kurulu Başkanı <img src='../visualizer/static/figures/ceo.png' height=20>, Baş Ürün Sorumlusu <img src='../visualizer/static/figures/cpo.png' height=20>, Baş Teknoloji Sorumlusu <img src='../visualizer/static/figures/cto.png' height=20>, programcı <img src='../visualizer/static/figures/programmer.png' height=20>, inceleyici <img src='../visualizer/static/figures/reviewer.png' height=20>, testçi <img src='../visualizer/static/figures/tester.png' height=20>, sanat tasarımcısı <img src='../visualizer/static/figures/designer.png' height=20> bulunur. Bu ajanlar çoklu ajan organizasyon yapısı oluşturur ve "programlama yoluyla dijital dünyayı devrimleştirmek" misyonuyla birleşirler. ChatDev içindeki ajanlar, özel işlevsel seminerlere katılarak işbirliği yaparlar, bu seminerler tasarım, kodlama, test etme ve belgeleme gibi görevleri içerir.
|
||||
- ChatDev'in asıl amacı, büyük dil modellerine (LLM'ler) dayanan ve kolektif zeka çalışmaları için ideal bir senaryo olarak hizmet veren, **kullanımı kolay**, **yüksek özelleştirilebilir** ve **genişletilebilir** bir çerçeve sunmaktır.
|
||||
|
||||
<p align="center">
|
||||
@ -25,15 +25,15 @@
|
||||
<p align="center">
|
||||
<img src='../misc/docker.png' width=400>
|
||||
</p>
|
||||
- 25 Eylül 2023: **Git** modu artık kullanılabilir durumda, programcının <img src='../online_log/static/figures/programmer.png' height=20> sürüm kontrolü için Git'i kullanmasına izin verir. Bu özelliği etkinleştirmek için sadece ``ChatChainConfig.json`` içinde ``"git_management"`` değerini ``"True"`` olarak ayarlamanız yeterlidir. [Kılavuza](wiki.md#git-mode) bakınız.
|
||||
- 25 Eylül 2023: **Git** modu artık kullanılabilir durumda, programcının <img src='../visualizer/static/figures/programmer.png' height=20> sürüm kontrolü için Git'i kullanmasına izin verir. Bu özelliği etkinleştirmek için sadece ``ChatChainConfig.json`` içinde ``"git_management"`` değerini ``"True"`` olarak ayarlamanız yeterlidir. [Kılavuza](wiki.md#git-mode) bakınız.
|
||||
<p align="center">
|
||||
<img src='../misc/github.png' width=600>
|
||||
</p>
|
||||
- 20 Eylül 2023: **İnsan-Ajan-İletişimi** modu artık kullanılabilir! ChatDev ekibine katılarak inceleyici <img src='../online_log/static/figures/reviewer.png' height=20> rolünü üstlenebilir ve programcıya <img src='../online_log/static/figures/programmer.png' height=20> önerilerde bulunabilirsiniz; ``python3 run.py --task [fikrinizin açıklaması] --config "İnsan"`` komutunu deneyin. [Kılavuza](wiki.md#human-agent-interaction) ve [örneğe](WareHouse/Gomoku_HumanAgentInteraction_20230920135038) bakınız.
|
||||
- 20 Eylül 2023: **İnsan-Ajan-İletişimi** modu artık kullanılabilir! ChatDev ekibine katılarak inceleyici <img src='../visualizer/static/figures/reviewer.png' height=20> rolünü üstlenebilir ve programcıya <img src='../visualizer/static/figures/programmer.png' height=20> önerilerde bulunabilirsiniz; ``python3 run.py --task [fikrinizin açıklaması] --config "İnsan"`` komutunu deneyin. [Kılavuza](wiki.md#human-agent-interaction) ve [örneğe](WareHouse/Gomoku_HumanAgentInteraction_20230920135038) bakınız.
|
||||
<p align="center">
|
||||
<img src='../misc/Human_intro.png' width=600>
|
||||
</p>
|
||||
- 1 Eylül 2023: **Sanat** modu şimdi kullanılabilir! Yazılımda kullanılan görselleri oluşturmak için tasarımcı ajanını <img src='../online_log/static/figures/designer.png' height=20> etkinleştirebilirsiniz; ``python3 run.py --task [fikrinizin açıklaması] --config "Sanat"`` komutunu deneyin. [Kılavuza](wiki.md#art) ve [örneğe](WareHouse/gomokugameArtExample_THUNLP_20230831122822) bakınız.
|
||||
- 1 Eylül 2023: **Sanat** modu şimdi kullanılabilir! Yazılımda kullanılan görselleri oluşturmak için tasarımcı ajanını <img src='../visualizer/static/figures/designer.png' height=20> etkinleştirebilirsiniz; ``python3 run.py --task [fikrinizin açıklaması] --config "Sanat"`` komutunu deneyin. [Kılavuza](wiki.md#art) ve [örneğe](WareHouse/gomokugameArtExample_THUNLP_20230831122822) bakınız.
|
||||
- 28 Ağustos 2023: Sistem halka açık durumda.
|
||||
- 17 Ağustos 2023: v1.0.0 sürümü hazırlandı.
|
||||
- 30 Temmuz 2023: Kullanıcılar ChatChain, Aşama ve Rol ayarlarını özelleştirebilirler. Ayrıca, hem çevrimiçi Log modu hem de yeniden oynatma mod
|
||||
|
@ -3,7 +3,7 @@ Flask==2.3.2
|
||||
Flask-SocketIO==5.3.4
|
||||
importlib-metadata==6.8.0
|
||||
numpy==1.24.3
|
||||
openai==0.27.8
|
||||
openai==1.3.3
|
||||
regex==2023.6.3
|
||||
requests==2.31.0
|
||||
tenacity==8.2.2
|
||||
|
24
run.py
@ -23,6 +23,18 @@ sys.path.append(root)
|
||||
|
||||
from chatdev.chat_chain import ChatChain
|
||||
|
||||
try:
|
||||
from openai.types.chat.chat_completion_message_tool_call import ChatCompletionMessageToolCall
|
||||
from openai.types.chat.chat_completion_message import FunctionCall
|
||||
|
||||
openai_new_api = True # new openai api version
|
||||
except ImportError:
|
||||
openai_new_api = False # old openai api version
|
||||
print(
|
||||
"Warning: Your OpenAI version is outdated. \n "
|
||||
"Please update as specified in requirement.txt. \n "
|
||||
"The old API interface is deprecated and will no longer be supported.")
|
||||
|
||||
|
||||
def get_config(company):
|
||||
"""
|
||||
@ -67,7 +79,7 @@ parser.add_argument('--task', type=str, default="Develop a basic Gomoku game.",
|
||||
parser.add_argument('--name', type=str, default="Gomoku",
|
||||
help="Name of software, your software will be generated in WareHouse/name_org_timestamp")
|
||||
parser.add_argument('--model', type=str, default="GPT_3_5_TURBO",
|
||||
help="GPT Model, choose from {'GPT_3_5_TURBO','GPT_4','GPT_4_32K'}")
|
||||
help="GPT Model, choose from {'GPT_3_5_TURBO','GPT_4','GPT_4_32K', 'GPT_4_TURBO'}")
|
||||
parser.add_argument('--path', type=str, default="",
|
||||
help="Your file directory, ChatDev will build upon your software in the Incremental mode")
|
||||
args = parser.parse_args()
|
||||
@ -78,7 +90,15 @@ args = parser.parse_args()
|
||||
# Init ChatChain
|
||||
# ----------------------------------------
|
||||
config_path, config_phase_path, config_role_path = get_config(args.config)
|
||||
args2type = {'GPT_3_5_TURBO': ModelType.GPT_3_5_TURBO, 'GPT_4': ModelType.GPT_4, 'GPT_4_32K': ModelType.GPT_4_32k}
|
||||
args2type = {'GPT_3_5_TURBO': ModelType.GPT_3_5_TURBO,
|
||||
'GPT_4': ModelType.GPT_4,
|
||||
'GPT_4_32K': ModelType.GPT_4_32k,
|
||||
'GPT_4_TURBO': ModelType.GPT_4_TURBO,
|
||||
'GPT_4_TURBO_V': ModelType.GPT_4_TURBO_V
|
||||
}
|
||||
if openai_new_api:
|
||||
args2type['GPT_3_5_TURBO'] = ModelType.GPT_3_5_TURBO_NEW
|
||||
|
||||
chat_chain = ChatChain(config_path=config_path,
|
||||
config_phase_path=config_phase_path,
|
||||
config_role_path=config_role_path,
|
||||
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 67 KiB |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 1.4 MiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 2.4 MiB After Width: | Height: | Size: 2.4 MiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 3.4 MiB After Width: | Height: | Size: 3.4 MiB |
Before Width: | Height: | Size: 523 KiB After Width: | Height: | Size: 523 KiB |
Before Width: | Height: | Size: 1.7 MiB After Width: | Height: | Size: 1.7 MiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 3.4 MiB After Width: | Height: | Size: 3.4 MiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
@ -20,6 +20,34 @@
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.28.0/themes/prism-okaidia.min.css">
|
||||
<link rel="stylesheet" href="static/css/style.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.2.0/styles/monokai-sublime.min.css">
|
||||
<style>
|
||||
.custom-text-block {
|
||||
background-color: #f0f0f0;
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
margin: 20px 0;
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.visualizer-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.visualizer-box {
|
||||
width: 30%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.visualizer-info {
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
color: #666;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
hljs.initHighlightingOnLoad();
|
||||
</script>
|
||||
@ -29,24 +57,30 @@
|
||||
<div class="d-flex justify-content-center">
|
||||
<img src="static/figures/title.png" alt="ChatDev Title" id="title-image" style="width: 100%; max-width: 300px;">
|
||||
</div>
|
||||
<div style="display: flex; width:auto;justify-content: center;align-items: center;">
|
||||
<div style="width: 30%;">
|
||||
<div class="visualizer-container">
|
||||
<div class="visualizer-box">
|
||||
<br>
|
||||
<a href="static/chain_visualizer.html">
|
||||
<button>ChatChain Visualizer</button>
|
||||
</a>
|
||||
<p class="visualizer-info">Explore all the phases and settings in ChatChain.</p>
|
||||
</div>
|
||||
<div>
|
||||
<div class="visualizer-box">
|
||||
<br>
|
||||
<a href="static/replay.html">
|
||||
<button>Chat Replay</button>
|
||||
<button>Replay Visualizer</button>
|
||||
</a>
|
||||
<p class="visualizer-info">Replay the agents' dialog from other ChatDev-generated software.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Inserted text block -->
|
||||
<div class="custom-text-block">
|
||||
Log Visualizer <br> Visualize the log in real-time when generating software, in agent dialog-style. Execute "python3 run.py" to start.
|
||||
</div>
|
||||
|
||||
<div class="container d-flex flex-column" id="chat-box"></div>
|
||||
<script src="static/js/main.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
32
wiki.md
@ -60,16 +60,16 @@
|
||||
python3 main.py
|
||||
```
|
||||
|
||||
## Local Demo
|
||||
|
||||
- you can start a flask app first to get a local demo, including enhanced visualized logs, replay demo, and a simple
|
||||
ChatChain Visualizer.
|
||||
## Visualizer
|
||||
|
||||
- you can start a flask app to get a Visualizer, which is local web demo for visualizing real-time logs, replayed logs, and ChatChain.
|
||||
- the difference between real-time logs and replayed logs lies in that the former is mainly for debugging, which can print the agent's dialogue information, environment changes and many additional system information in real time during the process of software generation, such as file changes and git information. The latter is used to replay the generated log and only prints the dialogue information of the agent.
|
||||
- just run
|
||||
```
|
||||
python3 chat_visualizer/app.py
|
||||
python3 visualizer/app.py
|
||||
```
|
||||
|
||||
then go to [Local Demo Website](http://127.0.0.1:8000/) to see an online visualized version of logs such as
|
||||
then go to [Visualizer Website](http://127.0.0.1:8000/) to see an online visualized version of logs such as
|
||||
|
||||
![demo](misc/demo.png)
|
||||
|
||||
@ -78,7 +78,7 @@ then go to [Local Demo Website](http://127.0.0.1:8000/) to see an online visuali
|
||||
|
||||
![ChatChain Visualizer](misc/chatchain_vis.png)
|
||||
|
||||
- You can also goto the Chat Replay page to replay log file in the software folder
|
||||
- You can also goto the [Chat Replay page](http://127.0.0.1:8000/static/replay.html) to replay log file in the software folder
|
||||
- click the ``File Upload`` bottom to upload a log, then click ``Replay``
|
||||
- The replay only shows the dialogues in natural languages between agents, it will not contain debug logs.
|
||||
|
||||
@ -121,7 +121,7 @@ then go to [Local Demo Website](http://127.0.0.1:8000/) to see an online visuali
|
||||
```
|
||||
⚠️ You need to replace ``YOUR_OPENAI_KEY`` with your key and replace ``YOUR_IP`` with your inet address.
|
||||
- Then you can just play with ChatDev running ``python3 run.py``.
|
||||
- You can run ``python3 chat_visualizer/app.py &`` first to start a background program so that you can use online log with a WebUI.
|
||||
- You can run ``python3 visualizer/app.py &`` first to start a background program so that you can use online log with a WebUI.
|
||||
|
||||
### Copy the generated software out of Docker
|
||||
- run
|
||||
@ -256,7 +256,7 @@ then go to [Local Demo Website](http://127.0.0.1:8000/) to see an online visuali
|
||||
|
||||
def break_cycle(self, phase_env) -> bool:
|
||||
if not phase_env['exist_bugs_flag']:
|
||||
log_and_print_online(f"**[Test Info]**\n\nAI User (Software Test Engineer):\nTest Pass!\n")
|
||||
log_visualize(f"**[Test Info]**\n\nAI User (Software Test Engineer):\nTest Pass!\n")
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
@ -271,13 +271,13 @@ then go to [Local Demo Website](http://127.0.0.1:8000/) to see an online visuali
|
||||
|
||||
## ChatChain Parameters
|
||||
|
||||
- *clear_structure*: clean cache folders.
|
||||
- *brainstorming*: TBD
|
||||
- *gui_design*: whether create gui for software.
|
||||
- *git_management*: open git management on software project or not.
|
||||
- *self_improve*: flag for self-improvement on user input prompt. It is a special chatting that LLM plays as a prompt
|
||||
engineer to improve the user input prompt. **⚠️ Attention** Model generated prompts contains uncertainty and there may
|
||||
- *clear_structure*: Whether to clear non-software files in the WareHouse and cache files in generated software path.
|
||||
- *gui_design*: Encourage ChatDev generate software with GUI.
|
||||
- *git_management*: Whether to use git to manage the creation and changes of generated software.
|
||||
- *incremental_develop*: Whether to use incremental develop on an existing project.
|
||||
- *self_improve*: flag for self-improvement on user input prompt. It is a special chatting that LLM plays as a prompt engineer to improve the user input prompt. **⚠️ Attention** Model generated prompts contains uncertainty and there may
|
||||
be a deviation from the requirement meaning contained in the original prompt.
|
||||
- *background_prompt*: background prompt that will be added to every inquiry to LLM
|
||||
- params in SimplePhase:
|
||||
- *max_turn_step*: Max number of chatting turn. You can increase max_turn_step for better performance but it will
|
||||
take longer time to finish the phase.
|
||||
@ -294,7 +294,7 @@ then go to [Local Demo Website](http://127.0.0.1:8000/) to see an online visuali
|
||||
├── camel # Camel RolePlay component
|
||||
├── chatdev # ChatDev core code
|
||||
├── misc # assets of example and demo
|
||||
├── chat_visualizer # Demo Folder
|
||||
├── visualizer # Visualizer Folder
|
||||
├── run.py # Entry of ChatDev
|
||||
├── requirements.txt
|
||||
├── README.md
|
||||
|