Skip to content

Bugfix/Missing Reasoning Item#6237

Open
HenryHengZJ wants to merge 3 commits intomainfrom
bugfix/Missing-Reasoning-Item
Open

Bugfix/Missing Reasoning Item#6237
HenryHengZJ wants to merge 3 commits intomainfrom
bugfix/Missing-Reasoning-Item

Conversation

@HenryHengZJ
Copy link
Copy Markdown
Contributor

  • pass langchain message instance as a whole to avoid missing reasoning item
  • add normalizeMessagesForStorage function to convert LangChain message instances into plain JSON objects, improving database storage efficiency and UI readability

…ng item

- add `normalizeMessagesForStorage` function to convert LangChain message instances into plain JSON objects, improving database storage efficiency and UI readability
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the normalizeMessagesForStorage utility to convert LangChain message instances into plain JSON objects, ensuring cleaner database storage by removing internal metadata. The Agent class has been updated to utilize this normalization and to simplify the addition of LLM responses to the message history. A review comment identifies a missing mapping for the developer role in the normalization logic, which is necessary for consistency with newer model roles.

Comment thread packages/components/nodes/agentflow/utils.ts
- Added a button in NodeExecutionDetails to toggle visibility of all available tools, improving user experience.
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.

Error in Agent node: 400 Item 'msg_xxxxx' of type 'message' was provided without its required 'reasoning' item: 'rs_xxxx'

1 participant