硬编码改为配置文件
This commit is contained in:
@@ -12,11 +12,14 @@ import os
|
||||
import sys
|
||||
|
||||
from agent import generate
|
||||
from agent.config import load_config
|
||||
|
||||
DEFAULT_RULES_DIR = os.path.join(os.path.dirname(__file__), 'rules')
|
||||
|
||||
|
||||
def main():
|
||||
cfg = load_config()['api']
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
description='COBOLテストデータ生成Agent'
|
||||
)
|
||||
@@ -27,11 +30,11 @@ def main():
|
||||
parser.add_argument('--cpy', required=True, help='COPYBOOK 格納ディレクトリ')
|
||||
parser.add_argument('--db-md', required=True, help='DB 定義書 .md のパス')
|
||||
parser.add_argument('--output', default='output', help='出力ディレクトリ')
|
||||
parser.add_argument('--api-key', default='sk-6156cccdc9c14d949cf5bfc5afc67a03',
|
||||
help='DeepSeek API Key')
|
||||
parser.add_argument('--model', default='deepseek-v4-flash', help='API モデル名')
|
||||
parser.add_argument('--api-key', default=cfg['api_key'],
|
||||
help='DeepSeek API Key(默认读取 config.json 或环境变量 DEEPSEEK_API_KEY)')
|
||||
parser.add_argument('--model', default=cfg['model'], help='API モデル名')
|
||||
parser.add_argument('--rules', default=DEFAULT_RULES_DIR, help='ルール格納ディレクトリ')
|
||||
parser.add_argument('--max-tokens', type=int, default=32768,
|
||||
parser.add_argument('--max-tokens', type=int, default=cfg['max_tokens'],
|
||||
help='API 生成トークン上限')
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
Reference in New Issue
Block a user