fix: Template updates to fix broken edges#8785
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThe updates modify the "Basic Prompt Chaining" and "Basic Prompting" starter project JSON configurations by regenerating node and edge IDs, updating node types and input field definitions, adjusting UI metadata, and aligning input/output types and icons for the LanguageModelComponent. No core logic changes were made to the underlying Python component. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant ChatInput
participant LanguageModelComponent
participant ChatOutput
User->>ChatInput: Submit input
ChatInput->>LanguageModelComponent: Pass input_value/system_message
LanguageModelComponent->>ChatOutput: Output (text_output/model_output)
ChatOutput->>User: Display response
Possibly related PRs
Suggested labels
✨ Finishing Touches🧪 Generate Unit Tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Actionable comments posted: 0
🔭 Outside diff range comments (1)
src/backend/base/langflow/initial_setup/starter_projects/Basic Prompt Chaining.json (1)
785-807:ChatOutput.input_valueswitched toMessageInputbut still acceptsData/DataFrame
MessageInputinternally validates payloads asstr|Message|list[Message]; passing aDataobject will now raiseTypeError.
If the node is meant to visualise arbitrary structured data, revert toHandleInputor provide a custom MessageInput subclass that widens the allowed types.
🧹 Nitpick comments (4)
src/backend/base/langflow/initial_setup/starter_projects/Basic Prompt Chaining.json (2)
25-30: High-ASCII “œ” characters inside the auto-generated edge idThe new id strings (
reactflow__edge-…) embed curly-brace payload re-encoded with the “œ” glyph.
Those non-ASCII bytes occasionally trip URL-encoding when the canvas is shared via query-string or stored in some SQL variants.Consider URL-safe base64 or plain JSON stringify instead of the current replacement scheme.
1417-1430:copy_fieldis not a recognised MultilineInput attribute
"copy_field": falseis introduced forsystem_message, but the MultilineInput spec (seelangflow/io/fields.py) does not include this flag.
Unknown keys are silently dropped in the UI, so the new property adds noise without any effect.Either remove the key or implement support on the front-end if clipboard cloning is required.
src/backend/base/langflow/initial_setup/starter_projects/Basic Prompting.json (2)
1188-1191: Global version bumped to 1.5.0 but node-levellf_versionfields stay at 1.4.2The project’s
last_tested_versionis now1.5.0, yet every node template still advertises"lf_version": "1.4.2".
This mismatch can confuse automated migration scripts or UI upgrade prompts. Consider updating the per-node fields as part of the template regeneration.- "lf_version": "1.4.2" + "lf_version": "1.5.0"
510-524: Node id still prefixed with “undefined-” – tidy up for clarityThe README note uses an id like
undefined-qkI8p. While it works technically, it signals that the generator had no prefix.
Regenerating with a meaningful prefix (e.g.,ReadMe-qkI8p) improves readability when debugging large flows.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/backend/base/langflow/initial_setup/starter_projects/Basic Prompt Chaining.json(42 hunks)src/backend/base/langflow/initial_setup/starter_projects/Basic Prompting.json(19 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/backend_development.mdc:0-0
Timestamp: 2025-06-30T14:39:17.428Z
Learning: Starter project files are auto-formatted after langflow run; these changes can be committed or ignored
Learnt from: ogabrielluiz
PR: langflow-ai/langflow#0
File: :0-0
Timestamp: 2025-06-26T19:43:18.260Z
Learning: In langflow custom components, the `module_name` parameter is now propagated through template building functions to add module metadata and code hashes to frontend nodes for better component tracking and debugging.
src/backend/base/langflow/initial_setup/starter_projects/Basic Prompt Chaining.json (5)
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/backend_development.mdc:0-0
Timestamp: 2025-06-30T14:39:17.428Z
Learning: Starter project files are auto-formatted after langflow run; these changes can be committed or ignored
Learnt from: ogabrielluiz
PR: langflow-ai/langflow#0
File: :0-0
Timestamp: 2025-06-26T19:43:18.260Z
Learning: In langflow custom components, the `module_name` parameter is now propagated through template building functions to add module metadata and code hashes to frontend nodes for better component tracking and debugging.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/testing.mdc:0-0
Timestamp: 2025-06-30T14:41:58.837Z
Learning: Applies to {src/backend/tests/**/*.py,tests/**/*.py} : Test Langflow's 'Message' objects and chat functionality by asserting correct properties and structure.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/testing.mdc:0-0
Timestamp: 2025-06-30T14:41:58.837Z
Learning: Applies to {src/backend/tests/**/*.py,tests/**/*.py} : Use 'MockLanguageModel' for testing language model components without external API calls.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-30T14:40:50.836Z
Learning: Use clear, recognizable, and consistent icon names for both backend and frontend (e.g., 'AstraDB', 'Postgres', 'OpenAI').
src/backend/base/langflow/initial_setup/starter_projects/Basic Prompting.json (7)
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/backend_development.mdc:0-0
Timestamp: 2025-06-30T14:39:17.428Z
Learning: Starter project files are auto-formatted after langflow run; these changes can be committed or ignored
Learnt from: ogabrielluiz
PR: langflow-ai/langflow#0
File: :0-0
Timestamp: 2025-06-26T19:43:18.260Z
Learning: In langflow custom components, the `module_name` parameter is now propagated through template building functions to add module metadata and code hashes to frontend nodes for better component tracking and debugging.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/frontend_development.mdc:0-0
Timestamp: 2025-06-23T12:46:42.048Z
Learning: Custom React Flow node types should be implemented as memoized components, using Handle components for connection points and supporting optional icons and labels.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-23T12:46:52.420Z
Learning: When implementing a new component icon in Langflow, ensure the icon name is clear, recognizable, and used consistently across both backend (Python 'icon' attribute) and frontend (React/TypeScript mapping).
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/testing.mdc:0-0
Timestamp: 2025-06-30T14:41:58.837Z
Learning: Applies to {src/backend/tests/**/*.py,tests/**/*.py} : Test Langflow's 'Message' objects and chat functionality by asserting correct properties and structure.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/testing.mdc:0-0
Timestamp: 2025-06-30T14:41:58.837Z
Learning: Applies to {src/backend/tests/**/*.py,tests/**/*.py} : Use 'MockLanguageModel' for testing language model components without external API calls.
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-06-30T14:40:50.836Z
Learning: Use clear, recognizable, and consistent icon names for both backend and frontend (e.g., 'AstraDB', 'Postgres', 'OpenAI').
🔇 Additional comments (7)
src/backend/base/langflow/initial_setup/starter_projects/Basic Prompt Chaining.json (5)
24-31: Edge handle “type” still declared as"str"whileinputTypes=["Message"]Several newly-generated edge objects (see also lines 55-60, 83-88, 111-116, 139-144, 167-172, 195-200) keep the legacy
"type": "str"flag although the corresponding port advertises Message semantics.
The front-end usually infers socket compatibility by comparinginputTypes/output_types; keeping"str"here can silently disable run-time validation and break drag-and-drop auto-filtering.- "type": "str" + "type": "Message"Please run
langflow validate --starter-projectto ensure every source/target handle pair shares the exact same declared type.
1308-1329: Consistency check – upstream edges now deliver aMessage, not rawstrGood catch replacing
MessageTextInputwithMessageInput; this aligns the LanguageModelComponent with the new chat-first API.
1384-1385: Icon enum updated toGoogleGenerativeAI– LGTMThe new value matches the rebranded icon set and will render correctly in both dark/light themes.
1680-1681: Duplicate provider icon update – no further actionSame remark as above; duplication across nodes is expected in starter projects.
2110-2112: Viewport zoom/offset tweaked – ignorePure layout change generated by auto-formatter—safe to commit.
src/backend/base/langflow/initial_setup/starter_projects/Basic Prompting.json (2)
25-30: Edge IDs use non-standard “œ” delimiters – verify they still round-tripThe edge id and handle strings now embed curly‐brace JSON fragments separated by
œ.
If any consumer expects valid JSON or URI-encoded text, these characters may break parsing or URL generation.- "id": "reactflow__edge-ChatInput-SzjnT{œdataType… + // e.g. encode as base64 or URI-safe string, or keep plain JSON without custom delimitersPlease confirm that the front-end and import/export paths still accept this format after the change.
1073-1075: New provider icon “GoogleGenerativeAI” – ensure front-end mapping exists
options_metadata.iconwas updated fromGoogleGenerativeAI.
Double-check that the React icon map (usuallysrc/frontend/icons.tsor similar) contains this key, or the dropdown may render a missing icon placeholder.
|
Basic prompt and prompt chaining are fixed. SEO Keyword still needs the fix @edwinjosechittilappilly |
|
Adding the SEO Keyword fixes! |
* update llm component * template updates * Update SEO Keyword Generator.json
* update llm component * template updates * Update SEO Keyword Generator.json
* update llm component * template updates * Update SEO Keyword Generator.json




Template Updates
Summary by CodeRabbit
New Features
Enhancements
Style