Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 'label' undefined errors for sequential agents #3585

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

px-amaac
Copy link

@px-amaac px-amaac commented Nov 27, 2024

Simple Flow: Follow part of video on sequential flows until 9:15 where LLM Node setup is complete.
https://www.youtube.com/watch?v=3ZmBq8_4vCs&list=PL4HikwTaYE0H7wBxhvQqxYcKOkZ4O3zXh

Stack trace:
Error: Cannot read properties of undefined (reading 'label') flowise:dev: at buildAgentGraph (\Flowise\packages\server\dist\utils\buildAgentGraph.js:402:19) flowise:dev: at async utilBuildAgentResponse (\Flowise\packages\server\dist\utils\buildChatflow.js:435:31) flowise:dev: at async utilBuildChatflow (\Flowise\packages\server\dist\utils\buildChatflow.js:198:20) flowise:dev: at async createAndStreamInternalPrediction (\Flowise\packages\server\dist\controllers\internal-predictions\index.js:33:29) flowise:dev: 2024-11-26 13:50:21 [ERROR]: [server]: Error: Error buildAgentGraph - Cannot read properties of undefined (reading 'label') flowise:dev: Error: Error buildAgentGraph - Cannot read properties of undefined (reading 'label') flowise:dev: at buildAgentGraph (\Flowise\packages\server\dist\utils\buildAgentGraph.js:408:15) flowise:dev: at async utilBuildAgentResponse (\Flowise\packages\server\dist\utils\buildChatflow.js:435:31) flowise:dev: at async utilBuildChatflow (\Flowise\packages\server\dist\utils\buildChatflow.js:198:20) flowise:dev: at async createAndStreamInternalPrediction (\Flowise\packages\server\dist\controllers\internal-predictions\index.js:33:29) flowise:dev: 2024-11-26 13:50:21 [ERROR]: [server]: Error: Error buildAgentGraph - Cannot read properties of undefined (reading 'label') flowise:dev: Error: Error buildAgentGraph - Cannot read properties of undefined (reading 'label') flowise:dev: at utilBuildAgentResponse (\Flowise\packages\server\dist\utils\buildChatflow.js:541:15) flowise:dev: at async utilBuildChatflow (\Flowise\packages\server\dist\utils\buildChatflow.js:198:20) flowise:dev: at async createAndStreamInternalPrediction (\Flowise\packages\server\dist\controllers\internal-predictions\index.js:33:29)

Commit adds some optional chaining around 2 reads of 'label' property.

Without this change some usage of sequential agents requires a memory node to not hit a runtime error when trying to access 'label'.

Commit adds some optional chaining around 2 reads of 'label'
property.
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