🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
- change reserved parameter back to `config.llm.max_token`
Azure Wang73d0d29e81d2
diff --git a/metagpt/actions/research.py b/metagpt/actions/research.pyindex 65962de31..2a99a8d99 100644--- a/metagpt/actions/research.py+++ b/metagpt/actions/research.py@@ -134,7 +134,7 @@ class CollectLinks(Action):breakmodel_name = config.llm.model- prompt = reduce_message_length(gen_msg(), model_name, system_text, 0)+ prompt = reduce_message_length(gen_msg(), model_name, system_text, config.llm.max_token)logger.debug(prompt)queries = await self._aask(prompt, [system_text])try:diff --git a/metagpt/config2.py b/metagpt/config2.pyindex 25569bd93..ed1d23fa5 100644--- a/metagpt/config2.py+++ b/metagpt/config2.py@@ -134,3 +134,4 @@ def merge_dict(dicts: Iterable[Dict]) -> Dict:return result+config = Config.default()diff --git a/tests/mock/mock_llm.py b/tests/mock/mock_llm.pyindex 9c159b4ed..b2052e2b3 100644--- a/tests/mock/mock_llm.py+++ b/tests/mock/mock_llm.py@@ -1,14 +1,13 @@import jsonfrom typing import Optional, Union-from metagpt.config2 import Config+from metagpt.config2 import configfrom metagpt.configs.llm_config import LLMTypefrom metagpt.logs import loggerfrom metagpt.provider.azure_openai_api import AzureOpenAILLMfrom metagpt.provider.openai_api import OpenAILLMfrom metagpt.schema import Message-config = Config.default()OriginalLLM = OpenAILLM if config.llm.api_type == LLMType.OPENAI else AzureOpenAILLM