🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
Merge branch 'del-_parse_arguments-in-openai_api.py' into code_intepreter
yzlinca6749b5f190
diff --cc tests/metagpt/provider/test_openai.pyindex 5895c9eb8,3883aab2e..d6aa04c7b--- a/tests/metagpt/provider/test_openai.py+++ b/tests/metagpt/provider/test_openai.py@@@ -107,14 -103,8 +104,20 @@@ class TestOpenAIelse:code["language"] == "python"+ def test_aask_code_json_decode_error(self, json_decode_error):+ instance = OpenAILLM(mock_llm_config)+ with pytest.raises(json.decoder.JSONDecodeError) as e:+ instance.get_choice_function_arguments(json_decode_error)+ assert "JSONDecodeError" in str(e)++++async def test_gen_image():+ llm = LLM()+ model = "dall-e-3"+ prompt = 'a logo with word "MetaGPT"'+ images: list[Image] = await llm.gen_image(model=model, prompt=prompt)+ assert images[0].size == (1024, 1024)++ images: list[Image] = await llm.gen_image(model=model, prompt=prompt, resp_format="b64_json")+ assert images[0].size == (1024, 1024)