geekan / MetaGPT

🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
https://deepwisdom.ai/
MIT License
41.52k stars 4.95k forks source link

Prompt triggering Azure OpenAI's content management policy #1029

Open jinchihe opened 3 months ago

jinchihe commented 3 months ago

Bug description

Seems the write_code_review prompt triggerred Azure OpenAI's content management policy, so that some response was filtered.

Bug solved method

Environment information

Screenshots or logs

2024-03-18 17:34:53.145 | INFO     | metagpt.actions.write_code_review:run:183 - Code review and rewrite board.py: 1/2 | len(iterative_code)=1601, len(self.i_context.code_doc.content)=1601
2024-03-18 17:38:48.672 | WARNING  | metagpt.utils.common:wrapper:572 - There is a exception in role's execution, in order to resume, we delete the newest role communication message in the role's memory.
2024-03-18 17:38:48.681 | ERROR    | metagpt.utils.common:wrapper:554 - Exception occurs, start to serialize the project, exp:
Traceback (most recent call last):
  File "/Users/jason/python/llm/lib/python3.11/site-packages/metagpt/utils/common.py", line 549, in wrapper
    result = await func(self, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jason/python/llm/lib/python3.11/site-packages/metagpt/team.py", line 134, in run
    await self.env.run()
openai.BadRequestError: Error code: 400 - {'error': {'code': 'BadRequest', 'message': "The response was filtered due to the prompt triggering Azure OpenAI's content management policy. Please modify your prompt and retry. To learn more about our content filtering policies please read our documentation: \r\nhttps://go.microsoft.com/fwlink/?linkid=2198766.", 'param': None, 'type': None}}
iorisa commented 3 months ago

This is the bug of Azure OpenAI's content management policy on the LLM side. You can send the board.py source code under the project to Microsoft to report the issue.

geekan commented 3 months ago

Could you please show me the original prompt word?