MacPaw/OpenAI を参考にgpt-4-vision-previewモデルを使ったアプリの開発を進めていたところ、以下のエラーが出た。
Error during image analysis: APIErrorResponse(error: OpenAI.APIError(message: "The model gpt-4-vision-preview has been deprecated, learn more here: https://platform.openai.com/docs/deprecations", type: "invalid_request_error", param: nil, code: Optional("model_not_found")))
OpenAIのプラットフォームによると、
On June 6th, 2024, we notified developers using gpt-4-32k and gpt-4-vision-preview of their upcoming deprecations in one year and six months respectively. As of June 17, 2024, only existing users of these models will be able to continue using them.
とのこと。
モデルをgpt-4oに変更したら解決できた。