@langchain/google-genai 0.1.7 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -53,6 +53,14 @@ function messageContentMedia(content) {
53
53
  },
54
54
  };
55
55
  }
56
+ if ("mimeType" in content && "fileUri" in content) {
57
+ return {
58
+ fileData: {
59
+ mimeType: content.mimeType,
60
+ fileUri: content.fileUri,
61
+ },
62
+ };
63
+ }
56
64
  throw new Error("Invalid media content");
57
65
  }
58
66
  function convertMessageContentToParts(message, isMultimodalModel) {
@@ -48,6 +48,14 @@ function messageContentMedia(content) {
48
48
  },
49
49
  };
50
50
  }
51
+ if ("mimeType" in content && "fileUri" in content) {
52
+ return {
53
+ fileData: {
54
+ mimeType: content.mimeType,
55
+ fileUri: content.fileUri,
56
+ },
57
+ };
58
+ }
51
59
  throw new Error("Invalid media content");
52
60
  }
53
61
  export function convertMessageContentToParts(message, isMultimodalModel) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/google-genai",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "Google Generative AI integration for LangChain.js",
5
5
  "type": "module",
6
6
  "engines": {