修改内容:

调整llm引用模式
添加对星火大模型的支持
在模型报错时可以人工输入
可以通过config直接全人工输入
This commit is contained in:
ziming 2023-09-05 21:52:13 +08:00
parent 206bc252de
commit 6046f9c942
18 changed files with 277 additions and 29 deletions

View file

@ -14,7 +14,7 @@ from pydantic import BaseModel, Field
# from metagpt.environment import Environment
from metagpt.config import CONFIG
from metagpt.actions import Action, ActionOutput
from metagpt.llm import LLM
from metagpt import llm as LLM
from metagpt.logs import logger
from metagpt.memory import Memory, LongTermMemory
from metagpt.schema import Message
@ -94,7 +94,7 @@ class Role:
"""角色/代理"""
def __init__(self, name="", profile="", goal="", constraints="", desc=""):
self._llm = LLM()
self._llm=LLM.DEFAULT_LLM
self._setting = RoleSetting(name=name, profile=profile, goal=goal, constraints=constraints, desc=desc)
self._states = []
self._actions = []