docs: mention default model; clarify chat help; improve request error message
This commit is contained in:
parent
59c36403b5
commit
245a7e1f88
3 changed files with 22 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue