Skip to content

Commit

Permalink
--xl/--extract-last in docs, refs #717
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Jan 24, 2025
1 parent 6ef69fc commit 256027f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ llm logs -r
Use `-x/--extract` to extract and return the first fenced code block from the selected log entries:

```bash
llm logs -x
llm logs --extract
```
Or `--xl/--extract-last` for the last fenced code block:
```bash
llm logs --extract-last
```

Add `--json` to get the log messages in JSON instead:
Expand Down
2 changes: 2 additions & 0 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ def my_function():
````
It will extract and returns just the content of that block, excluding the fenced coded delimiters. If there are no fenced code blocks it will return the full response.

Use `--xl/--extract-last` to return the last fenced code block instead of the first.

The entire response including explanatory text is still logged to the database, and can be viewed using `llm logs -c`.

(usage-attachments)=
Expand Down

0 comments on commit 256027f

Please sign in to comment.