このチャプターの目次
AI チャットアプリ構築の続きから実装していきます。
ライブラリ更新
OpenAI のライブラリの更新と新規に必要なライブラリをインストールします。
npm i openai next @heroicons/react formidable mic-recorder-to-mp3 react-timer-hook @types/formidable
最新のライブラリを使用したい方は update してください。
npm outdated
npm update
最新版で動かない場合は、動画のバージョンで試してみてください。
package.json
{
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start"
},
"dependencies": {
"@heroicons/react": "^2.0.16",
"@supabase/auth-helpers-nextjs": "^0.5.4",
"@supabase/supabase-js": "^2.7.1",
"date-fns": "^2.29.3",
"formidable": "^2.1.1",
"mic-recorder-to-mp3": "^2.2.2",
"next": "^13.2.3",
"openai": "^3.2.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-timer-hook": "^3.0.5",
"supabase": "^1.37.1"
},
"devDependencies": {
"@types/node": "18.11.3",
"@types/react": "18.0.21",
"@types/react-dom": "18.0.6",
"autoprefixer": "^10.4.12",
"encoding": "^0.1.13",
"postcss": "^8.4.18",
"tailwindcss": "^3.2.4",
"typescript": "4.9.4"
}
}