mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
VertexAI Claude 3.5 Sonnet v2 Error when Sending a Message with Files #110
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @lema-founders on GitHub (Mar 22, 2025).
Self Checks
Dify version
v1.1.0
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
✔️ Expected Behavior
Model recognizing the file and using it to generate LLM output
❌ Actual Behavior
[vertex_ai] Error: PluginInvokeError: {"args":{"description":"[models] Error: 'list' object has no attribute 'strip'"},"error_type":"InvokeError","message":"[models] Error: 'list' object has no attribute 'strip'"}
@lema-founders commented on GitHub (Mar 22, 2025):
Might be because Dify chatflow and / workflow isn't making the file upload call properly to VertexAI? https://cloud.google.com/vertex-ai/docs/reference/rest
@dosubot[bot] commented on GitHub (Mar 22, 2025):
The error you're encountering,
PluginInvokeError: 'list' object has no attribute 'strip', suggests that there might be an issue with how the file data is being processed or formatted before being sent to the Vertex AI API. This could be due to the way Dify's chatflow is handling the file input or how it's interfacing with the Vertex AI API.Here are a few things to consider:
File Handling in Dify: Ensure that the file input is correctly configured in the Dify chatflow. The 'File List' type should be set up to handle the specific file types you are working with, and the files should be stored in conversational variables as needed [1].
API Integration: Verify that the API call to Vertex AI is correctly formatted. The error message indicates that a list is being processed where a string is expected, possibly in a part of the code where a file path or content is being handled. Check if the file data is being converted to the expected format before making the API call.
Debugging the Error: Look into the part of the code where the file data is being prepared for the API call. Ensure that any list of files is being iterated over and processed individually, and that string operations like
strip()are not being mistakenly applied to a list object.Vertex AI API Documentation: Review the Vertex AI API documentation to ensure that the endpoints and methods being used are correct for your use case. The documentation provides details on how to import files and handle chat completions, which might be relevant for your setup [2].
By addressing these areas, you should be able to identify and resolve the issue with the file upload process in your Dify chatflow.
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other