Skip to content

Conversation

@butschster
Copy link
Collaborator

@butschster butschster commented Mar 13, 2025

This PR introduces a ContentBuilder system that replaces string concatenation in source fetchers with a more structured, maintainable approach to content generation. The implementation follows the builder pattern to create a fluent API for building content blocks.


Add custom tags to TextSource for better content identification

This PR introduces a new tag property to the TextSource class, allowing users to provide custom identifiers for text content blocks. The tag replaces the hardcoded "TEXT CONTENT" label in the generated output, making it easier to identify and distinguish between different sections of content.

Example

Before:

// TEXT CONTENT:
# API Documentation

This document provides an overview of the API.
// END OF TEXT CONTENT
----------------------------------------------------------

After (with custom tag):

// INTRO:
# API Documentation

This document provides an overview of the API.
// END OF INTRO
----------------------------------------------------------

Introduces a new ContentBuilder system that provides a more structured approach to building and formatting output content. This replaces the string concatenation approach previously used in source fetchers.
- Add 'tag' property to TextSource with default value 'INSTRUCTION'

This change allows users to provide descriptive tags for text content blocks,
making it easier to identify different sections in the generated output.
@butschster butschster merged commit 1919238 into main Mar 13, 2025
7 of 8 checks passed
@butschster butschster deleted the feature/content-builder branch March 13, 2025 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants