Amazon
Bundles 包含支援特定第三方整合的 自訂Components,與 AgentBuilder 搭配使用。
此頁面描述 Amazon bundle 中可用的Components。
Amazon Bedrock
此Components使用 Amazon Bedrock LLM 生成文字。
它可以輸出 Model Response (Message) 或 Language Model (LanguageModel)。
具體來說,Language Model 輸出是根據Components參數配置的 ChatBedrock 實例。
當您想要將 Amazon Bedrock 模型用作另一個 LLM 驅動Components的 LLM 時,請使用 Language Model 輸出,例如 Agent 或 Smart Function Components。
如需詳細資訊,請參閱語言模型Components。
Amazon Bedrock 參數
某些參數在視覺編輯器中預設為隱藏。 您可以透過 Components的標頭選單 中的 Controls 修改所有參數。
| Name | Type | Description |
|---|---|---|
| input | String | 輸入參數。文字生成的輸入字串。 |
| system_message | String | 輸入參數。要傳遞給模型的系統訊息。 |
| stream | Boolean | 輸入參數。是否串流回應。僅在聊天中有效。預設值:false。 |
| model_id | String | 輸入參數。要使用的 Amazon Bedrock 模型。 |
| aws_access_key_id | SecretString | 輸入參數。AWS 存取金鑰,用於驗證。 |
| aws_secret_access_key | SecretString | 輸入參數。AWS 秘密金鑰,用於驗證。 |
| aws_session_token | SecretString | 輸入參數。您 AWS 帳戶的工作階段金鑰。 |
| credentials_profile_name | String | 輸入參數。要使用的 AWS 認證設定檔名稱。 |
| region_name | String | 輸入參數。您的 Bedrock 資源所在的 AWS 區域。預設值:us-east-1。 |
| model_kwargs | Dictionary | 輸入參數。要傳遞給模型的其他關鍵字引數。 |
| endpoint_url | String | 輸入參數。Bedrock 服務的自訂端點 URL。 |
Amazon Bedrock Embeddings
Amazon Bedrock Embeddings Components用於從 Amazon Bedrock 載入嵌入模型。
如需在FLOW中使用嵌入模型Components的詳細資訊,請參閱嵌入模型Components。
Amazon Bedrock Embeddings 參數
某些參數在視覺編輯器中預設為隱藏。 您可以透過 Components的標頭選單 中的 Controls 修改所有參數。
| Name | Type | Description |
|---|---|---|
| model_id | String | 輸入參數。要呼叫的模型 ID,例如 amazon.titan-embed-text-v1。這相當於 list-foundation-models API 中的 modelId 屬性。 |
| aws_access_key_id | SecretString | 輸入參數。AWS 存取金鑰,用於驗證。 |
| aws_secret_access_key | SecretString | 輸入參數。AWS 秘密金鑰,用於驗證。 |
| aws_session_token | SecretString | 輸入參數。您 AWS 帳戶的工作階段金鑰。 |
| credentials_profile_name | String | 輸入參數。~/.aws/credentials 或 ~/.aws/config 中具有存取金鑰或角色資訊的 AWS 認證設定檔名稱。 |
| region_name | String | 輸入參數。要使用的 AWS 區域,例如 us-west-2。如果未提供,則回退到 AWS_DEFAULT_REGION 環境變數或 ~/.aws/config 中指定的區域。 |
| endpoint_url | String | 輸入參數。要設定除預設 AWS 端點以外的特定服務端點的 URL。 |
S3 Bucket Uploader
S3 Bucket Uploader Components將檔案上傳到 Amazon S3 儲存桶。
它設計用於處理來自 File 或 Directory Components的 Data 輸入。
如果您上傳來自其他Components的 Data,請在生產環境中執行FLOW之前測試結果。
需要 boto3 套件,該套件包含在您的 AgentBuilder 安裝中。
此Components會產生日誌,但不會將輸出發送到FLOW。
S3 Bucket Uploader 參數
某些參數在視覺編輯器中預設為隱藏。 您可以透過 Components的標頭選單 中的 Controls 修改所有參數。
| Name | Type | Description |
|---|---|---|
| AWS Access Key ID | SecretString | 輸入參數。AWS 存取金鑰 ID,用於驗證。 |
| AWS Secret Key | SecretString | 輸入參數。AWS 秘密金鑰,用於驗證。 |
| Bucket Name | String | 輸入參數。要上傳檔案的 S3 儲存桶名稱。 |
| Strategy for file upload | String | 輸入參數。檔案上傳策略。Store Data(預設值)會迭代 Data 輸入,記錄檔案路徑和文字內容,如果檔案路徑和文字內容都可用,則將每個檔案上傳到指定的 S3 儲存桶。Store Original File 會迭代資料輸入列表,從每個資料項目中擷取檔案路徑,如果檔案路徑可用,則將檔案上傳到指定的 S3 儲存桶,並記錄正在上傳的檔案路徑。 |
| Data Inputs | Data | 輸入參數。要迭代並在指定的 S3 儲存桶中作為檔案上傳的 Data 輸入。 |
| S3 Prefix | String | 輸入參數。S3 儲存桶中檔案將上傳的可選前綴(資料夾路徑)。 |
| Strip Path | Boolean | 輸入參數。上傳時是否剝離檔案路徑。預設值:false。 |