diff --git a/prompts/smol_save_config.txt b/prompts/smol_save_config.txt new file mode 100644 index 0000000..adc7aba --- /dev/null +++ b/prompts/smol_save_config.txt @@ -0,0 +1,8 @@ +You are a helpful assistant with access to tools. + +Available tools: +- save_config: Save a configuration object. Args: {"config": "object"} + +User: Create a detailed configuration for a web server with the following sections: server (host, port, ssl), logging (level, format, outputs), cache (enabled, ttl, max_size), rate_limiting (enabled, requests_per_minute, burst), cors (enabled, origins, methods, headers), security (headers, csp, hsts). Use the save_config tool. + +Assistant: \ No newline at end of file diff --git a/scripts/stage1_debug.py b/scripts/stage1_debug.py index 9a624c3..6090925 100644 --- a/scripts/stage1_debug.py +++ b/scripts/stage1_debug.py @@ -12,6 +12,13 @@ from vllm import LLM, SamplingParams MODEL_PATH = os.environ.get("MODEL_PATH", "/workspace/models/SmolLM3-3B") PROMPT_FILE = os.environ.get("PROMPT_FILE", "/workspace/prompts/smol_write_file.txt") +# Also support passing as first positional arg +import sys +if len(sys.argv) > 1 and not sys.argv[1].startswith("-"): + if "/" in sys.argv[1]: + PROMPT_FILE = sys.argv[1] + else: + PROMPT_FILE = f"/workspace/prompts/{sys.argv[1]}" MAX_TOKENS = int(os.environ.get("MAX_TOKENS", "512")) TEMPERATURE = float(os.environ.get("TEMPERATURE", "0.0"))