Skip to content

Commit 45dd352

Browse files
authored
Merge pull request #928 from shenchucheng/v0.7.3
V0.7.3
2 parents c7b197f + 0a6dc8f commit 45dd352

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

metagpt/software_company.py

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,11 @@
22
# -*- coding: utf-8 -*-
33

44
import asyncio
5-
import shutil
65
from pathlib import Path
76

87
import typer
98

10-
from metagpt.config2 import config
11-
from metagpt.const import CONFIG_ROOT, METAGPT_ROOT
12-
from metagpt.context import Context
9+
from metagpt.const import CONFIG_ROOT
1310
from metagpt.utils.project_repo import ProjectRepo
1411

1512
app = typer.Typer(add_completion=False, pretty_exceptions_show_locals=False)
@@ -30,6 +27,8 @@ def generate_repo(
3027
recover_path=None,
3128
) -> ProjectRepo:
3229
"""Run the startup logic. Can be called from CLI or other Python scripts."""
30+
from metagpt.config2 import config
31+
from metagpt.context import Context
3332
from metagpt.roles import (
3433
Architect,
3534
Engineer,
@@ -122,7 +121,17 @@ def startup(
122121
)
123122

124123

125-
def copy_config_to(config_path=METAGPT_ROOT / "config" / "config2.yaml"):
124+
DEFAULT_CONFIG = """# Full Example: https://github.com/geekan/MetaGPT/blob/main/config/config2.example.yaml
125+
# Reflected Code: https://github.com/geekan/MetaGPT/blob/main/metagpt/config2.py
126+
llm:
127+
api_type: "openai" # or azure / ollama / open_llm etc. Check LLMType for more options
128+
model: "gpt-4-turbo-preview" # or gpt-3.5-turbo-1106 / gpt-4-1106-preview
129+
base_url: "https://api.openai.com/v1" # or forward url / other llm url
130+
api_key: "YOUR_API_KEY"
131+
"""
132+
133+
134+
def copy_config_to():
126135
"""Initialize the configuration file for MetaGPT."""
127136
target_path = CONFIG_ROOT / "config2.yaml"
128137

@@ -136,7 +145,7 @@ def copy_config_to(config_path=METAGPT_ROOT / "config" / "config2.yaml"):
136145
print(f"Existing configuration file backed up at {backup_path}")
137146

138147
# 复制文件
139-
shutil.copy(str(config_path), target_path)
148+
target_path.write_text(DEFAULT_CONFIG, encoding="utf-8")
140149
print(f"Configuration file initialized at {target_path}")
141150

142151

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def run(self):
5757

5858
setup(
5959
name="metagpt",
60-
version="0.7.2",
60+
version="0.7.3",
6161
description="The Multi-Agent Framework",
6262
long_description=long_description,
6363
long_description_content_type="text/markdown",

0 commit comments

Comments
 (0)