0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Einstein Generative AI を使ってみる

0
Last updated at Posted at 2025-08-17

まとめページに戻る
まとめA~M



プロンプトは確かに Apex から呼び出すことができます。エージェントへの呼び出し自体はまだ利用できません。SF 製品チームからのこのコメントを参照してください - https://trailhead.salesforce.com/trailblazer-community/feed/0D5KX000000P2os0AC

PostmanにEinstein Generative AIのコレクション(βー版)が提供されていました

Models REST API は、Einstein Trust Layer を介してアプリケーションを大規模言語モデル (LLM) に接続します。それはあなたに次のことをさせます:

  • AI プロンプトをスタンドアロンまたは会話の一部として実行する
  • 埋め込みを作成する
  • 生成された応答についてフィードバックを提供します。

設定
Models API には、Salesforce 組織上の Einstein Generative AI へのアクセスが必要です。この機能を備えた組織がない場合は、Trailhead から Einstein AI Playground 組織を取得して実験できます。

  1. このコレクションをフォークします。
  2. この手順のステップ 1 (はい、ステップ 1 のみです!) に従って、Salesforce 組織に接続アプリケーションを作成します。
  3. 接続アプリケーションからコンシューマ キーとコンシューマ シークレットの値をコピーし、それぞれ clientId と clientSecret コレクション変数に貼り付けます。
  4. [設定] から [私のドメイン] に移動し、現在の私のドメイン URL の値を authDomain コレクション変数にコピーします。
  5. オプション: サポートされているモデルのリストからモデルを選択し、その API 名を取得して、modelName コレクション変数に保存します。新しい値を入力しない場合は、デフォルトで sfdc_ai__DefaultGPT35Turbo (GPT 3.5 Turbo) が使用されます。
  6. コレクション変数を保存します。
  7. Postman コレクションの [Authorization] タブを開き、画面の下部にある [Get New Access Token] をクリックします。
  8. 「トークンを使用」をクリックします。
  9. 「テキストの生成」リクエストを選択し、「送信」をクリックして、コレクションが適切に設定されていることを確認します。

変数のリファレンス

コレクションは次の必須変数に依存します。

変数 説明
authDomain Salesforce Org domain without https://. See My Domain in Salesforce Setup for value.
clientId Connected App Consumer Key.
clientSecre Connected App Consumer Secret.
modelName API name of one of the supported Gen AI models.
_baseUrl The Models API base URL. Do not modify this value.
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?