Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: RFC116 & RFC135 #552

Merged
merged 272 commits into from
Dec 15, 2023
Merged

feat: RFC116 & RFC135 #552

merged 272 commits into from
Dec 15, 2023

Conversation

garylin2099
Copy link
Collaborator

@garylin2099 garylin2099 commented Dec 12, 2023

feat: RFC116
feat: RFC135

  1. Switched from shared memory to private memory, coupled with a message publishing-subscription mechanism to support distributed deployment.
  2. Added Git repository and file repository utilities.
  3. The SoftwareCompany enhanced incremental iteration capability for meeting requirements, managing versions through Git.
  4. ProductManager introduced the PrepareDocuments action to create project environments like Git repositories.
  5. Engineer added the SummarizeCode action to inspect the code from a global perspective. Its execution can be limited by the --max-auto-summarize-code parameter.
  6. Introduced CLI mode.
  7. Encapsulated the globally unique Config object into a session-level ContextVar to support the creation of multiple logically isolated instances within the same process.
  8. Bugfix: Addressed the issue in the QA phase where dependencies were not automatically installed in the RunCode action.

中:

  1. 共享memory改为私有memory,搭配消息发布订阅机制,以支持分布式部署。
  2. 增加git repository和file repository。
  3. SoftwareCompany增加了需求的增量迭代能力,通过git管理版本。
  4. ProductManager新增PrepareDocuments action,用来创建git repository等项目环境;
  5. Engineer新增SummarizeCode action,从全局视角检查代码。可通过--max-auto-summarize-code参数限制其执行次数。
  6. 新增cli模式。
  7. 将全局唯一的Config对象封装成会话粒度的ContextVar, 以支持同一进程内创建多个逻辑隔离的实例。
  8. bugfix: QA阶段RunCode action没有自动安装依赖包的问题。

metagpt/roles/role.py Outdated Show resolved Hide resolved
metagpt/actions/action.py Outdated Show resolved Hide resolved
metagpt/actions/action_node.py Outdated Show resolved Hide resolved
metagpt/actions/action_node.py Show resolved Hide resolved
metagpt/actions/research.py Outdated Show resolved Hide resolved
metagpt/actions/summarize_code.py Outdated Show resolved Hide resolved
from metagpt.repo_parser import RepoParser


def validate_cols(content_col: str, df: pd.DataFrame):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

most content repeated with metagpt/document_store/document.py

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The two code files have different functionalities, and this has been annotated for clarification. metagpt/document_store/document.py is still under design; please ignore it for now.

metagpt/roles/role.py Outdated Show resolved Hide resolved


class RawMessage(TypedDict):
content: str
role: str


@dataclass
class Message:
class Document(BaseModel):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the difference with Document in metagpt/document.py and Document in metagpt/document_store/document.py

Copy link
Collaborator

@iorisa iorisa Dec 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Document in shema.py is a data structure in memory used to point to files in the file system.
  • metagpt/document.py represents IO layer files in the file system.
  • metagpt/document_store/document.py represents IO layer files in the vector database.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe with different class name is more clear.


async def run(self, n_round=3):
"""Run company until target round or no money"""
while n_round > 0:
# self._save()
n_round -= 1
logger.debug(f"{n_round=}")
logger.debug(f"max {n_round=} left.")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggest logger.debug(f"max {n_round=} left.") before n_round -= 1, or it will print max n_round=0 left, but still to run the last round. It will make a mistake.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"xx left" is correct

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what i mean is that n_round=0 means it won't run more round, but there still a last round to run now.

geekan and others added 2 commits December 15, 2023 15:26
fixbug: The unit test code outputted by DebugError was mistakenly saved in the wrong file.
@geekan
Copy link
Owner

geekan commented Dec 15, 2023

LGTM

@garylin2099 garylin2099 merged commit f97daac into main Dec 15, 2023
@kkdev163
Copy link
Contributor

kkdev163 commented Jan 10, 2024

@garylin2099 Perhaps we could replace the link to RFC116 and RFC135, which are publicly accessible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants