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

[BUG] uploading a too large file as full file upload is not raised in the chat as an error #3725

Open
bodzebod opened this issue Dec 17, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@bodzebod
Copy link

Describe the bug
When enabling full file upload in an agent flow, I can upload a file for asking questions about it.
However, if the context size appears to be too large, nothing is raised to the chat, i.e no error and no message. The chat just stops with no response. However, in the logs, I can see the error.

To Reproduce
Steps to reproduce the behavior:

  1. Create an agent flow with a supervisor, a worker, and their dependencies
  2. Configure the agent flow to enable full file upload
  3. Upload a large text file to the chat
  4. Ask a question about it

Expected behavior
If an error is raised internally, it should be also raised to the chat so that the user can be aware that there is a technical issue.

Screenshots
See in the chat, there's no response:
image

But there is an error "string too long" in the logs:

2024-12-17 15:42:42 [VERBOSE]: [llm/error] [1:chain:LangGraph > 3:chain:supervisor > 4:chain:RunnableLambda > 5:chain:RunnableSequence > 8:llm:ChatOpenAI] [3.12s] LLM run errored with error: "400 Invalid 'messages[1].content': string too long. Expected a string with maximum length 1048576, but got a string with length 8045636 instead.\n\nError: 400 Invalid 'messages[1].content': string too long. Expected a string with maximum length 1048576, but got a string with length 8045636 instead.\n    at APIError.generate (/usr/local/lib/node_modules/flowise/node_modules/openai/error.js:45:20)\n    at OpenAI.makeStatusError (/usr/local/lib/node_modules/flowise/node_modules/openai/core.js:293:33)\n    at OpenAI.makeRequest (/usr/local/lib/node_modules/flowise/node_modules/openai/core.js:337:30)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async /usr/local/lib/node_modules/flowise/node_modules/@langchain/openai/dist/chat_models.cjs:1558:29\n    at async RetryOperation._fn (/usr/local/lib/node_modules/flowise/node_modules/p-retry/index.js:50:12)"
2024-12-17 15:42:42 [VERBOSE]: [chain/error] [1:chain:LangGraph > 3:chain:supervisor > 4:chain:RunnableLambda > 5:chain:RunnableSequence] [3.56s] Chain run errored with error: "400 Invalid 'messages[1].content': string too long. Expected a string with maximum length 1048576, but got a string with length 8045636 instead.\n\nError: 400 Invalid 'messages[1].content': string too long. Expected a string with maximum length 1048576, but got a string with length 8045636 instead.\n    at APIError.generate (/usr/local/lib/node_modules/flowise/node_modules/openai/error.js:45:20)\n    at OpenAI.makeStatusError (/usr/local/lib/node_modules/flowise/node_modules/openai/core.js:293:33)\n    at OpenAI.makeRequest (/usr/local/lib/node_modules/flowise/node_modules/openai/core.js:337:30)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async /usr/local/lib/node_modules/flowise/node_modules/@langchain/openai/dist/chat_models.cjs:1558:29\n    at async RetryOperation._fn (/usr/local/lib/node_modules/flowise/node_modules/p-retry/index.js:50:12)"
2024-12-17 15:42:42 [VERBOSE]: [chain/error] [1:chain:LangGraph > 3:chain:supervisor > 4:chain:RunnableLambda] [3.61s] Chain run errored with error: "Aborted!\n\nError: Aborted!\n    at agentNode (/usr/local/lib/node_modules/flowise/node_modules/flowise-components/dist/nodes/multiagents/Supervisor/Supervisor.js:614:15)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async RunnableLambda.supervisorNode [as func] (/usr/local/lib/node_modules/flowise/node_modules/flowise-components/dist/nodes/multiagents/Supervisor/Supervisor.js:582:57)\n    at async /usr/local/lib/node_modules/flowise/node_modules/@langchain/langgraph/node_modules/@langchain/core/dist/runnables/base.cjs:1531:34"
2024-12-17 15:42:42 [VERBOSE]: [chain/error] [1:chain:LangGraph > 3:chain:supervisor] [3.69s] Chain run errored with error: "Aborted!\n\nError: Aborted!\n    at agentNode (/usr/local/lib/node_modules/flowise/node_modules/flowise-components/dist/nodes/multiagents/Supervisor/Supervisor.js:614:15)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async RunnableLambda.supervisorNode [as func] (/usr/local/lib/node_modules/flowise/node_modules/flowise-components/dist/nodes/multiagents/Supervisor/Supervisor.js:582:57)\n    at async /usr/local/lib/node_modules/flowise/node_modules/@langchain/langgraph/node_modules/@langchain/core/dist/runnables/base.cjs:1531:34"
2024-12-17 15:42:42 [VERBOSE]: [chain/error] [1:chain:LangGraph] [3.97s] Chain run errored with error: "Aborted!\n\nError: Aborted!\n    at agentNode (/usr/local/lib/node_modules/flowise/node_modules/flowise-components/dist/nodes/multiagents/Supervisor/Supervisor.js:614:15)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async RunnableLambda.supervisorNode [as func] (/usr/local/lib/node_modules/flowise/node_modules/flowise-components/dist/nodes/multiagents/Supervisor/Supervisor.js:582:57)\n    at async /usr/local/lib/node_modules/flowise/node_modules/@langchain/langgraph/node_modules/@langchain/core/dist/runnables/base.cjs:1531:34"

Flow
Test Agent Agents (1).json

Setup

  • Installation: docker-compose
  • Flowise Version: 2.2.2
  • OS: Linux
  • Browser: Edge

Additional context

@bodzebod bodzebod changed the title [BUG] uploading a too large file is not raised in the chat as an error [BUG] uploading a too large file as full file upload is not raised in the chat as an error Dec 17, 2024
@HenryHengZJ HenryHengZJ added the enhancement New feature or request label Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants