VSCode WebView UI Toolkit LangChain Samples
このサンプル拡張機能は、Visual Studio Code用のWebview UI Toolkitを使用して、Webviewビュー内でLangChainとOpenAIを統合したチャットボットを実装しています。
https://github.com/user-attachments/assets/642eea42-3c29-4525-869a-7c18c01d0e66
🚀 Features
- VS Code Webviewを使用したインタラクティブなチャットインターフェース
- LangChainとOpenAI APIを利用したAIチャットボット機能
- Webview UI Toolkitを使用したモダンなUI
🛠 Setup
このリポジトリをローカルにクローンします:
git clone https://github.com/your-username/vscode-webview-ui-toolkit-LangChain-samples.git
プロジェクトディレクトリに移動します:
cd vscode-webview-ui-toolkit-LangChain-samples
依存関係をインストールします:
npm install
VS Codeでプロジェクトを開きます:
code .
🔧 Configuration
- OpenAI APIキーを設定します:
🏃♂️ Running the Extension
- VS Code内で、
F5キーを押して新しい拡張機能開発ホストウィンドウを開きます。
- ホストウィンドウ内で、コマンドパレット(
Ctrl+Shift+PまたはCmd+Shift+P(Mac))を開き、LangChain Chatbot: Open Chat Viewと入力します。
📚 Project Structure
src/extension.ts: 拡張機能のメインエントリーポイント
src/providers/ChatViewProvider.ts: Webviewプロバイダーの実装
src/webview/chat.ts: Webviewのフロントエンド実装
src/webview/styles.css: Webviewのスタイル
🤝 Contributing
- このリポジトリをフォークします
- 新しいブランチを作成します(
git checkout -b feature/AmazingFeature)
- 変更をコミットします(
git commit -m 'Add some AmazingFeature')
- ブランチにプッシュします(
git push origin feature/AmazingFeature)
- プルリクエストを作成します
📜 License
MITライセンスの下で配布されています。詳細はLICENSEファイルをご覧ください。
Maki - @Maki@Sunwood AI Labs.
| |