@langchain/anthropic 0.3.11 → 0.3.12

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.
@@ -105,6 +105,14 @@ function _formatContent(content) {
105
105
  ...(cacheControl ? { cache_control: cacheControl } : {}),
106
106
  };
107
107
  }
108
+ else if (contentPart.type === "document") {
109
+ // PDF
110
+ return {
111
+ type: "document",
112
+ source: contentPart.source,
113
+ ...(cacheControl ? { cache_control: cacheControl } : {}),
114
+ };
115
+ }
108
116
  else if (textTypes.find((t) => t === contentPart.type) &&
109
117
  "text" in contentPart) {
110
118
  // Assuming contentPart is of type MessageContentText here
@@ -101,6 +101,14 @@ function _formatContent(content) {
101
101
  ...(cacheControl ? { cache_control: cacheControl } : {}),
102
102
  };
103
103
  }
104
+ else if (contentPart.type === "document") {
105
+ // PDF
106
+ return {
107
+ type: "document",
108
+ source: contentPart.source,
109
+ ...(cacheControl ? { cache_control: cacheControl } : {}),
110
+ };
111
+ }
104
112
  else if (textTypes.find((t) => t === contentPart.type) &&
105
113
  "text" in contentPart) {
106
114
  // Assuming contentPart is of type MessageContentText here
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/anthropic",
3
- "version": "0.3.11",
3
+ "version": "0.3.12",
4
4
  "description": "Anthropic integrations for LangChain.js",
5
5
  "type": "module",
6
6
  "engines": {