Skip to content

Formatting chatbot output code correctly - #6

Open
bwhewe-13 wants to merge 1 commit into
lanl:mainfrom
bwhewe-13:feat/chatbot-output-formatting
Open

Formatting chatbot output code correctly#6
bwhewe-13 wants to merge 1 commit into
lanl:mainfrom
bwhewe-13:feat/chatbot-output-formatting

Conversation

@bwhewe-13

Copy link
Copy Markdown

Improves JSON response handling in the chat/agent output pipeline:

  • agents.py: clarify the retry prompt sent when a response fails JSON validation, explicitly instructing the model to preserve original content verbatim (including code blocks) rather than summarizing or truncating it while fixing JSON structure/escaping.
  • json_parsing.py: make extract_json_block's brace-matching string-aware, so braces inside quoted strings (including escaped quotes) are no longer miscounted as JSON structure.
  • basewf.md: add a workflow rule directing the agent to use the write_file action for file-creation requests instead of pasting full file contents into chat messages.

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.

1 participant