You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
# my_aws_tools
2
2
3
-
**Author:** r3-yamauchi
4
-
**Version:** 1.0.5
3
+
**Author:** r3-yamauchi
4
+
**Version:** 1.0.6
5
5
**Type:** tool
6
6
7
7
English | [Japanese](https://github.com/r3-yamauchi/dify-my-aws-tools-plugin/blob/main/readme/README_ja_JP.md)
@@ -55,7 +55,7 @@ This project is distributed under the Apache License 2.0. See `LICENSE` for the
55
55
56
56
### Amazon Bedrock
57
57
58
-
-**Bedrock Retrieve** – Calls the `bedrock-agent-runtime` Retrieve API to run semantic or hybrid searches against a selected Knowledge Base. You can switch metadata filters, result counts, and Bedrock Reranking models (cohere.rerank-v3-5 / amazon.rerank-v1), and receive outputs as JSON or ranked text.
58
+
-**Bedrock Retrieve** – Calls the `bedrock-agent-runtime` Retrieve API to run semantic or hybrid searches against a selected Knowledge Base. You can switch metadata filters, result counts, Bedrock Reranking models (cohere.rerank-v3-5 / amazon.rerank-v1), and apply optional Guardrails via `guardrail_id` / `guardrail_version`, and receive outputs as JSON or ranked text.
59
59
60
60
```json
61
61
{
@@ -84,17 +84,17 @@ This project is distributed under the Apache License 2.0. See `LICENSE` for the
84
84
85
85
-**Apply Guardrail** – Uses Bedrock Runtime `apply_guardrail` with these features:
86
86
- Inputs: `content` array (multiple texts and/or images via bytes or S3 URI) or a single `text` that is auto-chunked into 1000-character pieces and wrapped as content.
87
-
-`source`: PREPROCESS (default) or POSTPROCESS to target pre/post LLM stages.
87
+
-`source`: INPUT (default) or OUTPUT to target pre/post LLM stages.
88
88
- Outputs: action, processedOutputs (masked), outputs (raw), assessments, warnings/actionReasons; returned as human-readable text plus a JSON blob.
89
89
- Long-text protection via chunking aligned with Guardrails billing/limits.
90
90
91
91
#### Apply Guardrail example (multi-text)
92
92
93
93
```json
94
94
{
95
-
"guardrail_id": "gr-123",
96
-
"guardrail_version": "2",
97
-
"source": "PREPROCESS",
95
+
"guardrail_id": "ab1cd2e3f45g",
96
+
"guardrail_version": "1",
97
+
"source": "INPUT",
98
98
"content": [
99
99
{ "text": { "text": "User message 1" } },
100
100
{ "text": { "text": "User message 2" } }
@@ -106,9 +106,9 @@ This project is distributed under the Apache License 2.0. See `LICENSE` for the
Copy file name to clipboardExpand all lines: tools/apply_guardrail.yaml
+71-58Lines changed: 71 additions & 58 deletions
Original file line number
Diff line number
Diff line change
@@ -4,108 +4,121 @@ identity:
4
4
label:
5
5
en_US: Content Moderation Guardrails
6
6
zh_Hans: 内容审查护栏
7
-
ja_JP: コンテンツモデレーションガードレール
7
+
ja_JP: ガードレールによるコンテンツモデレーション
8
8
description:
9
9
human:
10
10
en_US: "Content Moderation Guardrails utilizes the ApplyGuardrail API, a feature of Guardrails for Amazon Bedrock. This API is capable of evaluating input prompts and model responses for all Foundation Models (FMs), including those on Amazon Bedrock, custom FMs, and third-party FMs. By implementing this functionality, organizations can achieve centralized governance across all their generative AI applications, thereby enhancing control and consistency in content moderation."
11
11
zh_Hans: "内容审查护栏采用 Guardrails for Amazon Bedrock 功能中的 ApplyGuardrail API 。ApplyGuardrail 可以评估所有基础模型(FMs)的输入提示和模型响应,包括 Amazon Bedrock 上的 FMs、自定义 FMs 和第三方 FMs。通过实施这一功能, 组织可以在所有生成式 AI 应用程序中实现集中化的治理,从而增强内容审核的控制力和一致性。"
12
12
ja_JP: "Amazon Bedrock Guardrails の ApplyGuardrail API を利用し、ユーザー入力やモデル出力を横断的に審査できるコンテンツモデレーションツールです。Bedrock 標準モデルやカスタム/サードパーティ FM を統合的に管理し、生成 AI アプリ全体の統制と一貫性を高めます。"
13
13
llm: "Content Moderation Guardrails utilizes the ApplyGuardrail API, a feature of Guardrails for Amazon Bedrock. This API is capable of evaluating input prompts and model responses for all Foundation Models (FMs), including those on Amazon Bedrock, custom FMs, and third-party FMs. By implementing this functionality, organizations can achieve centralized governance across all their generative AI applications, thereby enhancing control and consistency in content moderation."
14
14
parameters:
15
-
- name: aws_access_key_id
16
-
type: string
17
-
required: false
18
-
label:
19
-
en_US: AWS Access Key ID
20
-
ja_JP: AWS アクセスキー ID
21
-
human_description:
22
-
en_US: Override the provider Access Key ID for this tool if needed.
23
-
ja_JP: 必要に応じてプロバイダー設定を上書きする Access Key ID。
24
-
form: form
25
-
26
-
- name: aws_secret_access_key
27
-
type: string
28
-
required: false
29
-
label:
30
-
en_US: AWS Secret Access Key
31
-
ja_JP: AWS シークレットアクセスキー
32
-
human_description:
33
-
en_US: Override the provider Secret Access Key for this tool if needed.
34
-
ja_JP: 必要に応じてプロバイダー設定を上書きするシークレットキー。
35
-
form: form
36
-
37
-
- name: aws_region
38
-
type: string
39
-
required: false
40
-
label:
41
-
en_US: AWS Region
42
-
ja_JP: AWS リージョン
43
-
human_description:
44
-
en_US: Override the default AWS Region for this tool.
45
-
ja_JP: このツール固有の AWS リージョンを指定します。
46
-
form: form
47
-
48
15
- name: guardrail_id
49
16
type: string
50
17
required: true
51
18
label:
52
19
en_US: Guardrail ID
53
20
zh_Hans: Guardrail ID
54
-
ja_JP: ガードレール ID
21
+
ja_JP: "Amazon Bedrock ガードレール の ID"
55
22
human_description:
56
-
en_US: Please enter the ID of the Guardrail that has already been created on Amazon Bedrock, for example 'qk5nk0e4b77b'.
llm_description: Please enter the ID of the Guardrail that has already been created on Amazon Bedrock, for example 'ab1cd2e3f45g'.
60
27
form: form
28
+
61
29
- name: guardrail_version
62
30
type: string
63
-
required: true
31
+
required: false
64
32
label:
65
33
en_US: Guardrail Version Number
66
34
zh_Hans: Guardrail 版本号码
67
-
ja_JP: ガードレールのバージョン
35
+
ja_JP: "適用するガードレールのバージョン"
68
36
human_description:
69
-
en_US: Please enter the published version of the Guardrail ID that has already been created on Amazon Bedrock. This is typically a version number, such as 2.
llm_description: Please enter the published version of the Guardrail ID that has already been created on Amazon Bedrock. This is typically a version number, such as 2.
37
+
en_US: "Guardrail version (numeric or DRAFT). Defaults to DRAFT when omitted."
llm_description: Optional single text to review. Will be chunked and wrapped into the content array.
96
75
form: llm
97
76
98
77
- name: content
99
78
type: string
100
79
required: false
101
80
label:
102
-
en_US: Content array (JSON)
103
-
ja_JP: content 配列(JSON)
81
+
en_US: "Content array (JSON)"
82
+
ja_JP: "content 配列(JSON)"
104
83
human_description:
105
84
en_US: "JSON array of items: {\"text\": {\"text\": \"...\"}} or {\"image\": {\"format\": \"png|jpeg\", \"source\": {\"bytes\": \"...\" | \"s3Uri\": \"s3://...\"}}}. Use this for multiple texts or images."
0 commit comments