Merge pull request #636 from Justin-ZL/main

update:tools/moderation unittest,only async
This commit is contained in:
better629 2023-12-26 19:56:41 +08:00 committed by GitHub
commit e86af605f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,21 +11,6 @@ import pytest
from metagpt.tools.moderation import Moderation
@pytest.mark.parametrize(
("content",),
[
[
["I will kill you", "The weather is really nice today", "I want to hit you"],
]
],
)
def test_moderation(content):
moderation = Moderation()
results = moderation.moderation(content=content)
assert isinstance(results, list)
assert len(results) == len(content)
@pytest.mark.asyncio
@pytest.mark.parametrize(
("content",),