-
-
Notifications
You must be signed in to change notification settings - Fork 143
各プロバイダーの利用LLMを増やし、マルチモーダル対応を拡張 #392 #397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-Authored-By: ニケちゃん / nikechan <o3nike.teg.14@gmail.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
""" Walkthroughこの変更では、複数のAIサービスのモデルリストとデフォルトモデルが拡張・更新されました。新しいサービス「xai」と「openrouter」が追加され、対応するAPIキー設定とドキュメントも更新されています。コードの制御フローや関数シグネチャの変更はありません。さらに、マルチモーダル対応モデルの判定ロジックを共通ユーティリティ関数に集約し、複数コンポーネントでの判定方法を統一しています。 Changes
Possibly related PRs
Suggested labels
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
npm warn config production Use 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (1)
🔇 Additional comments (5)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Co-Authored-By: ニケちゃん / nikechan <o3nike.teg.14@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
src/components/settings/slide.tsx (2)
73-78: マルチモーダル対応の判定ロジックを改善マルチモーダル対応の判定を直接
multiModalAIServicesリストと照合する代わりに、一元化されたisCurrentModelMultiModal()関数を使用するように変更されています。コメントアウトされた古いコードは、変更の履歴を残す目的があるかもしれませんが、将来的にはクリーンアップすることを検討してください。disabled={ - // !multiModalAIServices.includes( - // selectAIService as multiModalAIServiceKey - // ) !isCurrentModelMultiModal() }
128-133: SlideConvert コンポーネントの条件付きレンダリングを更新同様に、
SlideConvertコンポーネントの条件付きレンダリングもisCurrentModelMultiModal()関数を使用するように変更されています。この変更により、マルチモーダル対応の判定ロジックが一元化され、将来的なモデル追加時の保守が容易になります。- {/* multiModalAIServices.includes( - selectAIService as multiModalAIServiceKey - ) && */} {isCurrentModelMultiModal() && ( <SlideConvert onFolderUpdate={handleFolderUpdate} /> )}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
src/components/menu.tsx(2 hunks)src/components/settings/modelProvider.tsx(2 hunks)src/components/settings/slide.tsx(3 hunks)src/components/settings/slideConvert.tsx(2 hunks)src/features/constants/aiModels.ts(4 hunks)src/features/slide/slideAIHelpers.ts(2 hunks)src/features/utils/multimodal.ts(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- src/features/utils/multimodal.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- src/features/constants/aiModels.ts
🧰 Additional context used
🧬 Code Graph Analysis (5)
src/components/settings/slide.tsx (1)
src/features/utils/multimodal.ts (1)
isCurrentModelMultiModal(8-13)
src/components/settings/slideConvert.tsx (1)
src/features/utils/multimodal.ts (1)
isCurrentModelMultiModal(8-13)
src/features/slide/slideAIHelpers.ts (1)
src/features/utils/multimodal.ts (1)
isCurrentModelMultiModal(8-13)
src/components/menu.tsx (1)
src/features/utils/multimodal.ts (1)
isCurrentModelMultiModal(8-13)
src/components/settings/modelProvider.tsx (1)
src/features/constants/aiModels.ts (2)
defaultModels(129-151)multiModalModels(264-289)
🔇 Additional comments (9)
src/components/menu.tsx (2)
18-18: マルチモーダル検出ロジックの集約のための新しいインポートを追加新しいユーティリティ関数
isCurrentModelMultiModalをインポートして、マルチモーダル検出ロジックを集約しています。これにより、マルチモーダルモデルの判定が統一され、コードの保守性が向上します。
233-237: マルチモーダル判定ロジックを改善AIサービスの直接チェックからモデルベースのチェックに変更されています。これは良い改善で、より正確にマルチモーダル機能をサポートするモデルを識別できるようになります。
-multiModalAIServices.includes( - selectAIService as multiModalAIServiceKey -) +isCurrentModelMultiModal()この変更により、xAIやOpenRouterなどの新しいサービスを含む、さまざまなプロバイダーのマルチモーダル対応モデルをより柔軟にサポートできるようになります。
src/components/settings/slideConvert.tsx (2)
10-10: マルチモーダル検出用ユーティリティのインポート追加
isCurrentModelMultiModal関数をインポートすることで、スライド変換機能においてもマルチモーダル対応の判定ロジックが統一されています。
46-47: サービスベースからモデルベースのマルチモーダル検証に改善以前はAIサービスがマルチモーダル対応かを直接チェックしていましたが、現在選択されているモデルがマルチモーダル対応かをチェックするように変更されています。
-if (!multiModalAIServices.includes(aiService)) { +if (!isCurrentModelMultiModal()) {この変更により、xAIやOpenRouterなどの新しいサービスを含む、より多くのマルチモーダル対応モデルに対応できるようになります。また、アプリケーション全体でマルチモーダル対応の判定ロジックが一貫するようになりました。
src/features/slide/slideAIHelpers.ts (2)
5-5: マルチモーダル判定用ユーティリティのインポート追加
isCurrentModelMultiModal関数をインポートすることで、スライド関連のAIヘルパー機能においてもマルチモーダル対応の判定ロジックが統一されています。
15-16: マルチモーダル対応チェックロジックの改善AIサービスの直接チェックからモデルベースのチェックに変更されています。
-// if (!multiModalAIServices.includes(aiService)) { +if (!isCurrentModelMultiModal()) {この変更により、関数のバリデーションロジックがよりモデル中心になり、xAIやOpenRouterなどの新しいサービスや、それらが提供する最新のマルチモーダル対応モデルをより適切にサポートできるようになります。
src/components/settings/modelProvider.tsx (2)
10-10: マルチモーダルモデルのインポート変更
multiModalAIServicesの代わりにmultiModalModelsをインポートすることで、サービスベースからモデルベースのマルチモーダル判定に移行しています。これにより、より細かなマルチモーダル機能の制御が可能になります。
141-144: マルチモーダル判定ロジックの改善AIサービスの直接チェックから、そのサービスのデフォルトモデルがマルチモーダル対応かをチェックするよう変更されています。
+const newModel = defaultModels[newService] +const isMultiModal = multiModalModels.includes(newModel as any) + +if (!isMultiModal) {この変更により、xAIやOpenRouterなどの新しいサービスの追加に伴い、それらのデフォルトモデルがマルチモーダル対応かどうかを正確に判断できるようになります。これはPRの目的である「各プロバイダーの利用LLMを増やし、マルチモーダル対応を拡張」に合致しています。
src/components/settings/slide.tsx (1)
10-10: 新しいユーティリティ関数のインポートを追加マルチモーダル対応の判定を一元化するために、専用のユーティリティ関数をインポートしています。この変更は、コードの保守性を向上させる良い取り組みです。
Co-Authored-By: ニケちゃん / nikechan <o3nike.teg.14@gmail.com>
Co-Authored-By: ニケちゃん / nikechan <o3nike.teg.14@gmail.com>
Co-Authored-By: ニケちゃん / nikechan <o3nike.teg.14@gmail.com>
各プロバイダーの利用LLMを増やし、マルチモーダル対応を拡張
変更内容
マルチモーダル対応の拡張
xaiとopenrouterをマルチモーダル対応サービスに追加各プロバイダーの最新LLMモデルを追加
デフォルトモデルの更新
llama-3.3-70b-versatileに更新command-r-plus-08-2024に更新llama-3.1-sonar-large-128k-onlineに更新ドキュメントの更新
関連情報
タグ
Summary by CodeRabbit
新機能
ドキュメント