Carried over from #126 and originally requested by @nicolascian.
When Responses use the file search tool, callers currently have to clean citation markers from output text themselves. The SDK already exposes structured annotation data, so this should be handled without asking users to maintain fragile regular expressions.
Desired behavior
- Provide a convenience helper that returns output text with file-citation markers removed.
- Use structured annotation positions/types rather than parsing natural language with a regex.
- Preserve the existing raw
output_text behavior.
- Define behavior for multiple, adjacent, overlapping, and Unicode-indexed annotations.
- Clarify whether the helper handles only
file_citation annotations or all visible citation types.
- Add documentation and tests.
Source: #126.
Carried over from #126 and originally requested by @nicolascian.
When Responses use the file search tool, callers currently have to clean citation markers from output text themselves. The SDK already exposes structured annotation data, so this should be handled without asking users to maintain fragile regular expressions.
Desired behavior
output_textbehavior.file_citationannotations or all visible citation types.Source: #126.