diff --git a/README.md b/README.md index be9be90..5b8ea5c 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,12 @@ More details: `docs/guides/configuration.md`. ## Usage examples +- Set a default model (so you don’t pass `-m` each time): + ```bash + openwebui config set defaults.model llama3.2:latest + openwebui chat send -p "Hello" # uses the default model + ``` + - Non-streaming chat with JSON output: ```bash openwebui chat send -m my-model -p "Summarize" --no-stream --json diff --git a/openwebui_cli/commands/chat.py b/openwebui_cli/commands/chat.py index 83e6c45..71e91c4 100644 --- a/openwebui_cli/commands/chat.py +++ b/openwebui_cli/commands/chat.py @@ -35,7 +35,7 @@ def send( None, "--history-file", help="Load conversation history from JSON file" ), ) -> None: - """Send a chat message.""" + """Send a chat message (starts a new chat unless --chat-id is provided).""" obj = ctx.obj or {} config = load_config() @@ -204,8 +204,11 @@ def list_chats( limit: int = typer.Option(20, "--limit", "-n", help="Number of chats to show"), archived: bool = typer.Option(False, "--archived", help="Show archived chats"), ) -> None: - """List conversations (v1.1 feature - placeholder).""" - console.print("[yellow]Chat list will be available in v1.1[/yellow]") + """List conversations (placeholder; server pagination not yet wired).""" + console.print( + "[yellow]Chat list is not implemented yet.[/yellow] " + "Pagination will be added in a future release." + ) @app.command() diff --git a/openwebui_cli/http.py b/openwebui_cli/http.py index 211ba8f..290272c 100644 --- a/openwebui_cli/http.py +++ b/openwebui_cli/http.py @@ -242,8 +242,17 @@ def handle_request_error(error: Exception) -> None: " - The server might be overloaded" ) elif isinstance(error, httpx.RequestError): + url_msg = "" + try: + request_url = error.request.url # may raise if request is unset + url_msg = f" (URL: {request_url!s})" + except Exception: + url_msg = "" raise NetworkError( - f"Request failed: {error}\nCheck your network connection and server configuration." + f"Request failed: {error}{url_msg}\n" + "Check your network connection and server configuration. " + "Use --verbose to see more details." ) else: + # Bubble up unknown errors unchanged (e.g., typer.Exit for graceful exits) raise error