LoginSignup
5
0

Azure OpenAI を利用しようとした際の、エラーメッセージとその対処

Posted at

背景

Azure OpenA で Function Calling を利用しようとした際に出たエラーメッセージとその際の対処の記録

エラーメッセージと対処

Resource not found: リソースが無い

NotFoundError: Error code: 404 - {'error': {'code': '404', 'message': 'Resource not found'}}

  • endpoint の指定が間違っている

https://{yours}.openai.azure.com/openai

みたいに、余分なものがついていたりする場合

DeploymentNotFound: デプロイが見つからない

NotFoundError: Error code: 404 - {'error': {'code': 'DeploymentNotFound', 'message': 'The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again.'}}

  • deployment_id が間違っている

endpoint はあってるが、model/deployment_id 辺りがおかしいと思われる。

OperationNotSupported: オペレーションが無い

BadRequestError: Error code: 400 - {'error': {'code': 'OperationNotSupported', 'message': 'The completion operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here:

  • 対象モデルでは、必要な機能が無い

上記の例では、"completion" が、gpt-35-turbo には無いよって話。

モデルと、機能の関係は、現状は以下な感じ?(バージョンに依る筈)

gpt-35-turbo: chat completion
gpt-35-turbo-instruction: completion
text-embedding-ada-002: embeddings

実際の対応は、以下で調べる。

Unrecognized request argument: 使い方の問題

NotFoundError: Error code: 404 - {'error': {'message': 'Unrecognized request argument supplied: functions', 'type': 'invalid_request_error', 'param': None, 'code': None}}

  • API の使い方が違っている。

api version などによって違っていると思われるので、公式ドキュメントを調べて使い方を正す

あとがき

情報を貯めることで、だんだんと見えてくることがあるよね。

だからこそ、自分で試すしかないのかな、とも。 :thinking:

5
0
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
5
0