From 0ae92f503afdec63a4ebb8f63c07b89650e6c85d Mon Sep 17 00:00:00 2001 From: vanshtaneja23 <155813476+vanshtaneja23@users.noreply.github.com> Date: Tue, 7 Jul 2026 01:08:56 -0600 Subject: [PATCH] docs: fix f-string prefix and typo in plugin-hooks example Co-Authored-By: Claude Opus 4.8 --- docs/plugins/plugin-hooks.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/plugins/plugin-hooks.md b/docs/plugins/plugin-hooks.md index edd32837d..c924e13b3 100644 --- a/docs/plugins/plugin-hooks.md +++ b/docs/plugins/plugin-hooks.md @@ -241,7 +241,7 @@ Fragment loader plugins differ from template loader plugins in that you can stac A fragment loader can return one or more string fragments or attachments, or a mixture of the two. The fragments will be concatenated together into the prompt string, while any attachments will be added to the list of attachments to be sent to the model. -The `prefix` specifies the loader. The `argument` will be passed to that registered callback.. +The `prefix` specifies the loader. The `argument` will be passed to that registered callback. The callback works in a very similar way to template loaders, but returns either a single `llm.Fragment`, a list of `llm.Fragment` objects, a single `llm.Attachment`, or a list that can mix `llm.Attachment` and `llm.Fragment` objects. @@ -278,8 +278,8 @@ def my_fragment_loader(argument: str) -> llm.Fragment: def my_fragment_loader(argument: str) -> list[llm.Fragment]: "Docs go here." return [ - llm.Fragment("Fragment 1 content", "my-fragments:{argument}"), - llm.Fragment("Fragment 2 content", "my-fragments:{argument}"), + llm.Fragment("Fragment 1 content", f"my-fragments:{argument}"), + llm.Fragment("Fragment 2 content", f"my-fragments:{argument}"), llm.Attachment(path="/path/to/image.png"), ] ```