add context and config2

This commit is contained in:
geekan 2024-01-04 21:16:23 +08:00
parent 42bb40a0f6
commit e5d11a046c
76 changed files with 922 additions and 495 deletions

View file

@ -35,7 +35,6 @@ from pydantic import (
)
from pydantic_core import core_schema
from metagpt.config import CONFIG
from metagpt.const import (
MESSAGE_ROUTE_CAUSE_BY,
MESSAGE_ROUTE_FROM,
@ -151,12 +150,6 @@ class Document(BaseModel):
"""
return os.path.join(self.root_path, self.filename)
@property
def full_path(self):
if not CONFIG.git_repo:
return None
return str(CONFIG.git_repo.workdir / self.root_path / self.filename)
def __str__(self):
return self.content