memory

package
v0.7.19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package memory extracts the reserved <memory>...</memory> writeback block from an LLM's output.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Extract

func Extract(output string) (string, string, bool)

Extract returns (publishedOutput, memoryContent, found). When multiple blocks are present, the last one is chosen. All blocks are stripped from the published output.

func ExtractOutputBlocks

func ExtractOutputBlocks(output string) (map[string]string, string)

ExtractOutputBlocks extracts named <output name="...">...</output> blocks. Returns a map of name→content and the remaining text with all output blocks stripped. If no blocks are present, the original text is returned as remaining with an empty map.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL