🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
feat: +log
莘权 马4845dafb9496
diff --git a/tests/metagpt/test_gpt.py b/tests/metagpt/test_gpt.pyindex 285e8134c..431858d4c 100644--- a/tests/metagpt/test_gpt.py+++ b/tests/metagpt/test_gpt.py@@ -15,6 +15,7 @@ from metagpt.logs import loggerclass TestGPT:def test_llm_api_ask(self, llm_api):answer = llm_api.ask("hello chatgpt")+ logger.info(answer)assert len(answer) > 0# def test_gptapi_ask_batch(self, llm_api):@@ -23,16 +24,19 @@ class TestGPT:def test_llm_api_ask_code(self, llm_api):answer = llm_api.ask_code(["请扮演一个Google Python专家工程师,如果理解,回复明白", "写一个hello world"])+ logger.info(answer)assert len(answer) > 0@pytest.mark.asyncioasync def test_llm_api_aask(self, llm_api):answer = await llm_api.aask("hello chatgpt")+ logger.info(answer)assert len(answer) > 0@pytest.mark.asyncioasync def test_llm_api_aask_code(self, llm_api):answer = await llm_api.aask_code(["请扮演一个Google Python专家工程师,如果理解,回复明白", "写一个hello world"])+ logger.info(answer)assert len(answer) > 0@pytest.mark.asyncio@@ -41,3 +45,7 @@ class TestGPT:costs = llm_api.get_costs()logger.info(costs)assert costs.total_cost > 0+++# if __name__ == "__main__":+# pytest.main([__file__, "-s"])diff --git a/tests/metagpt/test_llm.py b/tests/metagpt/test_llm.pyindex 03341212b..49969a2af 100644--- a/tests/metagpt/test_llm.py+++ b/tests/metagpt/test_llm.py@@ -32,3 +32,6 @@ async def test_llm_acompletion(llm):assert len(await llm.acompletion(hello_msg)) > 0assert len(await llm.acompletion_batch([hello_msg])) > 0assert len(await llm.acompletion_batch_text([hello_msg])) > 0++# if __name__ == "__main__":+# pytest.main([__file__, "-s"])