You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey @RyanfCooper! I'm here to help you with any bugs, questions, or contributions you have. Let's tackle this together! 🤖
The error you're encountering, "too many values to unpack (expected 2)," in the 'Prompt' component might be related to how the payload is structured or processed. The issue could arise from the way the files are being handled or passed to the 'Prompt' component.
Here are a few things to check and try:
Payload Structure: Ensure that the payload structure for the files is correct. The files field should be a list of file objects, each containing file_type, file_name, and file_content as base64 encoded content. The current payload seems to have a string for files instead of a list of objects. It should look like this:
Session ID Handling: Verify that the session ID is correctly linked and used in the workflow. The session_id is crucial for managing chat inputs and outputs, ensuring they are associated with the correct session [1].
Prompt Component: Check the 'Prompt' component's configuration to ensure it correctly handles the inputs from 'Chat Input' and 'Chat Memory'. The 'Prompt' component should be set up to receive the user_message and context without any issues [2].
Error Handling: If the error persists, consider enabling error handling in the system to get more detailed error messages. This might help identify the exact point of failure in the 'Prompt' component [3].
By ensuring the payload is correctly structured and the components are properly configured, you should be able to resolve the error.
Bug Description
If I set a session ID and try to pass an image file in chat input it throws an error (does the same for API curl command).
Payload being sent: {
"output_type": "chat",
"input_type": "chat",
"input_value": "what is this?",
"session_id": "2311",
"tweaks": {
"ChatInput-71EqU": {
"sender": "User",
"sender_name": "User",
"should_store_message": true,
"files": "41bdad19-e6c8-4bcc-b788-25836e273806/2024-10-17_22-49-43_Screenshot 2024-10-17 at 11.15.47 AM.png"
},
"ChatOutput-wvrFo": {
"data_template": "{text}",
"input_value": "",
"sender": "Machine",
"sender_name": "AI",
"should_store_message": true
},
"Memory-MnvrM": {
"n_messages": 100,
"order": "Ascending",
"sender": "Machine and User",
"sender_name": "User",
"template": "{sender_name}: {text}"
}
}
}
POST.../api/v1/run/41bdad19-e6c8-4bcc-b788-25836e273806?stream=false 500 (Internal Server Error)
Error Details: {"detail":"{"message":"Error running graph: Error building Component Prompt: \n\ntoo many values to unpack (expected 2)","traceback":null,"description":null,"code":null,"suggestion":null}"}
Reproduction
Expected behavior
I'd expect it to work like default memory does but for session_id.
Who can help?
No response
Operating System
Linux/Mac
Langflow Version
1.0.18
Python Version
3.10
Screenshot
No response
Flow File
No response
The text was updated successfully, but these errors were encountered: