DEV Community

2

DifyにAmazon Bedrockを組み込む

皆さんDifyは利用されていますでしょうか?
DifyのモデルプロバイダーにAmazon Bedrockを選択できるため、アクセスキーとシークレットアクセスキーの設定を行えば、Amazon Bedrockの幅広いモデルが利用できます。

Difyはクラウド版とオンプレミス版があり、クラウド版ではSANDBOXという無料プランでは利用できる範囲に制約があるため、セルフホスティングのCOMMUNITY版を利用することで、Amazon Bedrockを選択することができます。

社内などのローカル環境下で利用すれば、Amazon Bedrockとの通信は発生するもののローカルのRAGを作ったり、モデルに学習される心配をせずに利用した分だけを使用するということができるため、まずは慣れ親しんでみたいと思われる中小企業では最適な選択肢になります。

またローカルLLMを用意することで、インターネットとの通信を発生させないクローズドな環境で利用することができるようになります。

なお、オンプレミス版はDockerイメージで提供されているため、比較的セットアップも容易で導入が可能です。

以下はDify オンプレミス版に Amazon Bedrock/Nova Cross-Region 推論を組み込む方法を参考にして、EC2に構築したDifyにパブリックIP経由で接続していますが、ローカル環境に構築することでローカル接続することが同様にできます。

また、引用元ではオレゴンリージョンを利用した説明となっていますが、私はバージニア北部リージョンで実施してみたところ、モデルの選択では、US.Cross Region Inferenceと表示されていないモデルでも正しく応答していました。

Image description

是非皆さんも試してみてください。

Heroku

Built for developers, by developers.

Whether you're building a simple prototype or a business-critical product, Heroku's fully-managed platform gives you the simplest path to delivering apps quickly — using the tools and languages you already love!

Learn More

Top comments (0)

Best Practices for Running  Container WordPress on AWS (ECS, EFS, RDS, ELB) using CDK cover image

Best Practices for Running Container WordPress on AWS (ECS, EFS, RDS, ELB) using CDK

This post discusses the process of migrating a growing WordPress eShop business to AWS using AWS CDK for an easily scalable, high availability architecture. The detailed structure encompasses several pillars: Compute, Storage, Database, Cache, CDN, DNS, Security, and Backup.

Read full post

👋 Kindness is contagious

Value this insightful article and join the thriving DEV Community. Developers of every skill level are encouraged to contribute and expand our collective knowledge.

A simple “thank you” can uplift someone’s spirits. Leave your appreciation in the comments!

On DEV, exchanging expertise lightens our path and reinforces our bonds. Enjoyed the read? A quick note of thanks to the author means a lot.

Okay