Skip to content

Conversation

enitrat
Copy link
Contributor

@enitrat enitrat commented Oct 5, 2025

Closes #8901 - a bug cause field markers to not be detected if not at the beginning of a line.

Approach

Replaced the line-by-line parsing approach with regex-based solution using re.split() with a capturing group on field marker pattern. We then iterate, alternating between field names (odd indices) and their content (even indices), making parsing more robust to LLM answers formatting.

Testing

Added a new test_chat_adapter_same_line_markers test that validates handling of multiple inline markers on the same line.

@enitrat enitrat changed the title fix: ChatAdapter now handles inline field markers fix: ChatAdapter handling of inline field markers Oct 5, 2025
@chenmoneygithub chenmoneygithub self-requested a review October 5, 2025 20:24
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.

[Bug] ChatAdapter fails to parse field markers not separated by newlines

1 participant