mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-20 15:38:09 +02:00
use context instead of FileRepo... done main process.
This commit is contained in:
parent
57581bbb36
commit
7cae857203
9 changed files with 53 additions and 35 deletions
|
|
@ -9,7 +9,7 @@
|
|||
import pytest
|
||||
|
||||
from metagpt.actions.talk_action import TalkAction
|
||||
from metagpt.config import CONFIG
|
||||
from metagpt.context import Context
|
||||
from metagpt.schema import Message
|
||||
|
||||
|
||||
|
|
@ -36,8 +36,9 @@ from metagpt.schema import Message
|
|||
@pytest.mark.usefixtures("llm_mock")
|
||||
async def test_prompt(agent_description, language, context, knowledge, history_summary):
|
||||
# Prerequisites
|
||||
CONFIG.agent_description = agent_description
|
||||
CONFIG.language = language
|
||||
g_context = Context()
|
||||
g_context.kwargs["agent_description"] = agent_description
|
||||
g_context.kwargs["language"] = language
|
||||
|
||||
action = TalkAction(context=context, knowledge=knowledge, history_summary=history_summary)
|
||||
assert "{" not in action.prompt
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue