Skip to content

Commit 58be5f7

Browse files
committed
app 対応
1 parent 854251b commit 58be5f7

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,13 @@ cd ./agent/
165165
`run.sh` および `main.py` にはいくつかのオプションがあります。
166166

167167
```bash
168-
# --system-prompt <ファイル名>: カスタムシステムプロンプトファイルを指定
169-
# -f, --file <ファイル名>: 処理対象のオブジェクトリストファイルを指定(デフォルト: object_list.ini)
168+
# --mode custom: agent/prompts/custom/custon.txt に記載のプロンプトで動作します。
169+
# (run.sh のみで動作) -f, --file <ファイル名>: 処理対象のオブジェクトリストファイルを指定(デフォルト: object_list.ini)
170170
# --avoid-throttling: Bedrockのトークン制限エラー時に自動リトライ及び token 使用量に応じた sleep を有効化
171171

172172
# カスタムシステムプロンプト
173-
uv run main.py --system-prompt custom_prompt.txt
174-
./run.sh --system-prompt custom_prompt.txt
173+
uv run main.py --mode custom
174+
./run.sh --mode custom
175175

176176
# 一括変換のオブジェクト一覧指定
177177
./run.sh -f custom_object_list.ini
@@ -200,7 +200,7 @@ uv run main.py --avoid-throttling
200200
cd ./agent # リポジトリルートディレクトリがカレントディレクトリの前提です
201201

202202
# アプリケーションの変換
203-
# 例) uv run main.py --prompt "<ソースの配置場所> <アプリ名> <テスト名>" --system-prompt "system_prompt_app.txt"
203+
# 例) uv run main.py --prompt "<ソースの配置場所> <アプリ名> <テスト名>" --mode "app"
204204
uv run main.py --prompt "../application/employee-mgmt/application employee-mgmt test01" --mode "app"
205205

206206
```

agent/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def main():
118118
"--mode",
119119
type=str,
120120
default="db_object",
121-
help="db_object or app",
121+
help="db_object or app or custom",
122122
)
123123
parser.add_argument(
124124
"--avoid-throttling",

agent/prompts/custom/custom.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
あなたはユーザーの望みを叶える親切な AI エージェントです
2-
持っているツールを駆使してユーザーの要望に応えてください
1+
与えられた Oracle の DB Object をデータベースから抽出して PostgreSQL に変換して実行してください
2+
変換後の SQL は ./result/{オブジェクトの名前}.sql に保存してください

agent/run.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
trap 'echo "\nInterrupted. Exiting..."; exit 1' INT
55

66
# Parse options
7-
SYSTEM_PROMPT_OPT=""
7+
MODE_OPT=""
88
CONFIG_FILE="object_list.ini"
99
AVOID_THROTTLING=""
1010
while [[ $# -gt 0 ]]; do
1111
case $1 in
12-
--system-prompt)
13-
SYSTEM_PROMPT_OPT="--system-prompt $2"
12+
--mode)
13+
MODE_OPT="--mode $2"
1414
shift 2
1515
;;
1616
-f|--file)
@@ -38,7 +38,7 @@ while IFS= read -r line; do
3838
fi
3939

4040
echo "Processing: $line"
41-
if uv run main.py --prompt "$line" $SYSTEM_PROMPT_OPT $AVOID_THROTTLING; then
41+
if uv run main.py --prompt "$line" $MODE_OPT $AVOID_THROTTLING; then
4242
# Comment out the processed line (macOS compatible)
4343
if [[ "$OSTYPE" == "darwin"* ]]; then
4444
# macOS (BSD sed)

0 commit comments

Comments
 (0)