3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Azure OpenAI プレイグラウンドでのエラーと対処記録

Posted at

背景

プレイグラウンドで、データソースを追加すると簡単に動作確認出来るので便利だなと思い使い始めたところ、えらーに困ることがあったので、その対処記録

記録

Principal does not have access to API/Operation

結論

  • 自身に、Cognitive Services OpenAI Contributorを割り当てるだけ

原因

  • RBACで従来の管理者ロールが終了になったので、言われるがままに追加したら、権限不足だった

詳細

2024/8/31に以前の管理者ロールが消えてしまうので、ロールを割り当てろって連絡があった。
image.png

Azure Portal の一番上には、以下のように出ていた
image.png

で、これの対処として言われるままに、以下を設定していた。
image.png

最小権限の法則に従ったわけだから、当然権限最小化されていて、今回の問題が起きたっぽい

The response was filtered due to the prompt triggering Azure OpenAI's content management policy

詳細は以下

Server responded with status 400. Error message: {'error': {'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: https://go.microsoft.com/fwlink/?linkid=2198766", 'type': None, 'param': 'prompt', 'code': 'content_filter', 'status': 400, 'innererror': {'code': 'ResponsibleAIPolicyViolation', 'content_filter_result': {'hate': {'filtered': False, 'severity': 'safe'}, 'jailbreak': {'filtered': True, 'detected': True}, 'self_harm': {'filtered': False, 'severity': 'safe'}, 'sexual': {'filtered': False, 'severity': 'safe'}, 'violence': {'filtered': False, 'severity': 'safe'}}}}}

対処

ポリシーを設定して、データソースに割り当てる

原因

プレビューできてる、ポリシーの default にひっかかっただけ。

なので、以下のようにして、適当にコンテンツフィルターを作成して
image.png

あとは、データソースに割り当てれば解決。
image.png

あとがき

新しい機能の追加は、喜びと共に、若干の苦痛があるけど、予想して解決させられるようになってくるとなんか Quest やってるみたいで楽しくなりますね :p

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?