From 0cc0a16e521d23d9d6fa5adee1120722b32a3e02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=A3=92=E6=A3=92?= Date: Tue, 23 Jan 2024 17:50:04 +0800 Subject: [PATCH] add new test for tool_calls_rsp. --- tests/metagpt/provider/test_openai.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/metagpt/provider/test_openai.py b/tests/metagpt/provider/test_openai.py index 1743fed92..77820a5f8 100644 --- a/tests/metagpt/provider/test_openai.py +++ b/tests/metagpt/provider/test_openai.py @@ -95,6 +95,10 @@ class TestOpenAI: ChatCompletionMessage( content='"""python\nprint(\'hello world\')"""', role="assistant", tool_calls=None ), + ChatCompletionMessage( + content="'''python\nprint(\"hello world\")'''", role="assistant", tool_calls=None + ), + ChatCompletionMessage(content="```python\nprint('hello world')```", role="assistant", tool_calls=None), ] ) choices = [