海外からのアクセス:www.kdjingpai.com
Ctrl + D このサイトをブックマークする
現在の場所図頭 " AIアンサー

Next.jsプロジェクトにUpstash RAGチャットコンポーネントをインストールして設定するには?

2025-09-10 1.5 K

Upstash RAGチャットコンポーネントをインストールおよび設定するには、以下の主要な手順に従う必要があります:

設置プロセス

オプションで、パッケージ管理ツールnpm、pnpm、yarnのいずれかを使ってインストールすることもできる:

  • npm install:npm install @upstash/rag-chat-component
  • pnpmのインストール:pnpm add @upstash/rag-chat-component
  • 糸の取り付け:yarn add @upstash/rag-chat-component

環境変数の設定

インストール後、プロジェクトのルート・ディレクトリに.envファイルを作成または変更し、以下の変数を設定する必要があります:

  • upstash_vector_rest_url
  • upstash_vector_rest_token
  • OPENAI_API_KEY
  • together_api_key

永続的なチャットログについては、追加の設定が必要です:

  • upstash_redis_rest_url
  • upstash_redis_rest_token

スタイル構成

tailwind.config.tsファイルに以下を追加し、コンポーネント・スタイルが正しく読み込まれるようにする:

import type { Config } from "tailwindcss";
export default {
content: ["./node_modules/@upstash/rag-chat-component/**/*.{js,mjs}"],
} satisfies Config;

これらの基本的な設定が完了したら、アプリケーションにチャット機能を統合する準備が整いました。

おすすめ

AIツールが見つからない?こちらをお試しください!

キーワードを入力する アクセシビリティこのサイトのAIツールセクションは、このサイトにあるすべてのAIツールを素早く簡単に見つける方法です。

トップに戻る


Fatal error: Uncaught wfWAFStorageFileException: Unable to save temporary file for atomic writing. in /www/wwwroot/www.kdjingpai.com/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/storage/file.php:34 Stack trace: #0 /www/wwwroot/www.kdjingpai.com/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/storage/file.php(658): wfWAFStorageFile::atomicFilePutContents() #1 [internal function]: wfWAFStorageFile->saveConfig() #2 {main} thrown in /www/wwwroot/www.kdjingpai.com/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/storage/file.php on line 34