Open deathemperor opened 1 month ago
Hey @deathemperor! I'm here to help you with any bugs, questions, or contributions you have for LangChain.js. Let's work together to solve this issue!
The issue you're encountering seems to be related to the incorrect MIME type being set for a PDF file when using a GCS URI. The MIME type is being set to "image/png" instead of "application/pdf". This can cause problems when the file is processed, as the system expects an image rather than a PDF.
In LangChain.js, the MIME type is typically set when creating a Blob
object. If the MIME type is not correctly set or overridden, it can lead to such issues. The buildSetMetadata
method in the BlobStoreGoogleCloudStorageBase
class is responsible for setting the MIME type in the metadata, using the mimetype
property of the MediaBlob
object [1].
To resolve this, you should ensure that the MIME type is correctly specified when creating the Blob
or when setting the metadata. If the issue persists, it might be necessary to check the implementation details of how the MIME type is being set or overridden in your specific use case.
To continue talking to Dosu, mention @dosu.
Checked other resources
Example Code
Error Message and Stack Trace (if applicable)
Description
Trying to pass gcs uri
System Info
"@langchain/core": "^0.3.9", "@langchain/google-vertexai": "^0.1.0",