diff --git a/src/oss/langchain/messages.mdx b/src/oss/langchain/messages.mdx index 0ea5d8029..5e826c095 100644 --- a/src/oss/langchain/messages.mdx +++ b/src/oss/langchain/messages.mdx @@ -977,7 +977,11 @@ it as output. Below we show short examples of input messages featuring multimoda const message = new HumanMessage({ content: [ { type: "text", text: "Describe the content of this image." }, - { type: "image", url: "https://example.com/path/to/image.jpg" }, + { + type: "image", + source_type: "url", + url: "https://example.com/path/to/image.jpg" + }, ], }); @@ -987,8 +991,8 @@ it as output. Below we show short examples of input messages featuring multimoda { type: "text", text: "Describe the content of this image." }, { type: "image", + source_type: "base64", data: "AAAAIGZ0eXBtcDQyAAAAAGlzb21tcDQyAAACAGlzb2...", - mimeType: "image/jpeg", }, ], }); @@ -997,7 +1001,7 @@ it as output. Below we show short examples of input messages featuring multimoda const message = new HumanMessage({ content: [ { type: "text", text: "Describe the content of this image." }, - { type: "image", fileId: "file-abc123" }, + { type: "image", source_type: "id", id: "file-abc123" }, ], }); ``` @@ -1007,7 +1011,7 @@ it as output. Below we show short examples of input messages featuring multimoda const message = new HumanMessage({ content: [ { type: "text", text: "Describe the content of this document." }, - { type: "file", url: "https://example.com/path/to/document.pdf" }, + { type: "file", source_type: "url", url: "https://example.com/path/to/document.pdf" }, ], }); @@ -1017,8 +1021,8 @@ it as output. Below we show short examples of input messages featuring multimoda { type: "text", text: "Describe the content of this document." }, { type: "file", + source_type: "base64", data: "AAAAIGZ0eXBtcDQyAAAAAGlzb21tcDQyAAACAGlzb2...", - mimeType: "application/pdf", }, ], }); @@ -1027,7 +1031,7 @@ it as output. Below we show short examples of input messages featuring multimoda const message = new HumanMessage({ content: [ { type: "text", text: "Describe the content of this document." }, - { type: "file", fileId: "file-abc123" }, + { type: "file", source_type: "id", id: "file-abc123" }, ], }); ``` @@ -1039,8 +1043,8 @@ it as output. Below we show short examples of input messages featuring multimoda { type: "text", text: "Describe the content of this audio." }, { type: "audio", + source_type: "base64", data: "AAAAIGZ0eXBtcDQyAAAAAGlzb21tcDQyAAACAGlzb2...", - mimeType: "audio/wav", }, ], }); @@ -1049,7 +1053,7 @@ it as output. Below we show short examples of input messages featuring multimoda const message = new HumanMessage({ content: [ { type: "text", text: "Describe the content of this audio." }, - { type: "audio", fileId: "file-abc123" }, + { type: "audio", source_type: "id", id: "file-abc123" }, ], }); ``` @@ -1061,8 +1065,8 @@ it as output. Below we show short examples of input messages featuring multimoda { type: "text", text: "Describe the content of this video." }, { type: "video", + source_type: "base64", data: "AAAAIGZ0eXBtcDQyAAAAAGlzb21tcDQyAAACAGlzb2...", - mimeType: "video/mp4", }, ], }); @@ -1071,7 +1075,7 @@ it as output. Below we show short examples of input messages featuring multimoda const message = new HumanMessage({ content: [ { type: "text", text: "Describe the content of this video." }, - { type: "video", fileId: "file-abc123" }, + { type: "video", source_type: "id", id: "file-abc123" }, ], }); ```