Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,7 @@ Configuration values can be set from config file, env var or command line flag,
| Verbose | `verbose: true` | `RUNPROMPT_VERBOSE=1` | `--verbose` |
| Chat | `chat: true` | `RUNPROMPT_CHAT=1` | `--chat` |
| LLM timeout | `timeout: 120` | `RUNPROMPT_TIMEOUT=120` | `--timeout 120` |
| Insecure | `insecure: true` | `RUNPROMPT_INSECURE=1` | `--insecure` |

### API keys

Expand Down Expand Up @@ -605,6 +606,8 @@ export BASE_URL="http://localhost:11434/v1"

When a custom base URL is set, the provider prefix in the model string is ignored and the OpenAI-compatible API format is used.

Use `--insecure` or `insecure: true` to disable TLS certificate verification when targeting self-signed endpoints.

### Verbose mode

Use `-v` or set `verbose: true` to see request/response details:
Expand Down
6 changes: 6 additions & 0 deletions runprompt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import glob
import base64
import mimetypes
import socket
import ssl

# Try to use PyYAML if available, otherwise use minimal parser
try:
Expand All @@ -49,6 +50,7 @@ CONFIG_KEYS = {
"openai_base_url", "openai_api_base", "cache", "cache_dir",
"safe_yes", "verbose", "anthropic_api_key", "openai_api_key",
"google_api_key", "openrouter_api_key", "chat", "chat_history", "history_file", "timeout",
"insecure",
}

PROVIDERS = {
Expand Down Expand Up @@ -176,6 +178,8 @@ def init_config(args):
for key, value in args.overrides.items():
args_dict[normalize_key(key)] = value
CONFIG["args"] = args_dict
if get_conf("insecure"):
ssl._create_default_https_context = ssl._create_unverified_context


def get_timeout():
Expand Down Expand Up @@ -623,6 +627,8 @@ def parse_args(args):
help="Interactive chat mode: prompt for input after each response")
parser.add_argument("--timeout", type=float, metavar="SECONDS",
help="LLM request timeout in seconds")
parser.add_argument("--insecure", action="store_true",
help="Disable TLS certificate verification")
parser.add_argument("--read", "--file", action="append", default=[],
metavar="FILE",
help="Read file(s) into context (supports globs)")
Expand Down
Loading